I'm setting up a custom autocomplete field where I show locations from Google Places and events from my database that match the search query. For this reason, I'm using the Google Places Autocomplete Service to get the query predictions rather than plugging in the Places Autocomplete directly into my textfield.
The problem is I can't figure out how to filter Places Autocomplete suggestions by country using the AutoComplete service.
I've tried:
var service = new google.maps.places.AutocompleteService(null, {
types: ['cities'],
componentRestrictions: {country: "au"}
});
but it still shows autocomplete options from Germany and France:(
Any suggestions?