Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict user in google place api in 5 Km area given location lat lng

I want to set google place auto complete text box, but I want the user only to see those places listed, which are in under 5 Km by set location. I don't talk about near-by search. I tried google map API, but it does not show correctly. I used this API.

like image 685
Anand Jain Avatar asked Oct 10 '16 12:10

Anand Jain


1 Answers

Make Request like this

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=5000&type=restaurant&keyword=cruise&key=AIzaSyB4sfadiVrHjkVPONVpLTLTwWnCaaWq6ok

For more information refer this link

like image 173
MIkka Marmik Avatar answered Oct 10 '22 08:10

MIkka Marmik