Poniżej znajduje się przykład getQueryPredictions podane przez googleGoogle Places API - getQueryPredictions Ogranicz według kraju/miasta/państwa?
service.getQueryPredictions({input: 'pizza near'}, callback);
Czy istnieje sposób, aby ograniczyć wyniki dla danego kraju/miasta/stanu?
Druga funkcja/składnik ma możliwość zrobić to
var input = document.getElementById('searchTextField');
var options = { types: ['(cities)'], componentRestrictions: {country: 'fr'}};
autocomplete = new google.maps.places.Autocomplete(input, options);
Alright:/ Dzięki – user1809157