Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limiting result in country with Google Place autocomplete?

I just tried this demo, but I can't find how to limit result in country. I also checked getAutocompletePredictions in com.google.android.gms.location.places.GeoDataApi, but I can't found any document to implement limiting country.

I also searched some questions in SO; apparently it's JavaScript and needs to add some "optional param". So how to add optional param in this request?

like image 564
quangson91 Avatar asked Oct 31 '22 06:10

quangson91


1 Answers

https://developers.google.com/places/webservice/search

  1. you can add the country name in the query , such as "in australia" to limit search in australia

or

2 . add a radius parameter to limit the search

like image 138
chings228 Avatar answered Nov 12 '22 15:11

chings228