TransWikia.com

Google Places Autocomplete Limit Suggestions to Local Area

Geographic Information Systems Asked by eamon1234 on January 7, 2021

I’m not sure if this is the right place to ask, but can I limit the suggestions that Google Places Autocomplete find to say 5 km of a certain location? If I’m in Dublin I don’t want to see suggestions in Canada!

https://google-developers.appspot.com/maps/documentation/javascript/examples/places-autocomplete

2 Answers

You can set the country that you searching in it in the google request. Just add to your url request the parameter:

 &components=country:kw

Answered by Ahmed A. Shafik on January 7, 2021

I've used the location=lat,lon parameter, but can't find it in the documentation anymore. There is a locationbias parameter, though.

https://developers.google.com/places/web-service/search

Answered by Berend on January 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP