Alberto Bini
Alberto Bini

Reputation: 11

How to get the same result of google maps using google places api

I have to implement a restaurant location service by using the google places api like this:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=43.7666321,11.2546258&rankby=distance&type=restaurant&key=[API_KEY]

but the result are very different from the near by search using google maps:

https://www.google.it/maps/search/Ristoranti/@43.7666321,11.2546258,15z/data=!4m8!2m7!3m6!1sRistoranti!2sPlaza+Hotel+Lucchesi,+Lungarno+della+Zecca+Vecchia,+38,+50122+Firenze!3s0x132a53f8014b2cd1:0xe324c61f3f21ebce!4m2!1d11.2633806!2d43.7666092?hl=it

I've also tried the Radar Search Request but it doesn't work either.

Upvotes: 0

Views: 436

Answers (1)

Mayank Nimje
Mayank Nimje

Reputation: 593

You can use google map PlacesService.

service = new google.maps.places.PlacesService(map);
service.nearbySearch(request, callback);

For more details on parameter and how to use it, Check: https://developers.google.com/maps/documentation/javascript/places

Upvotes: 1

Related Questions