0
votes

I'm going nuts on this one. I used Places Autocomplete before and that worked like a charm. e.g: https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&location=53.6020,53.6020&input=mcdonalds&key=

Now I'm trying to use the search in a range of 1000m of the users location, but I keep getting ZERO RESULTS. Can someone see, what I can't?

https://maps.googleapis.com/maps/api/place/search/json?location=53.6020,53.6020&radius=1000&keyword=mcdonalds&sensor=false&key=

Thanx in advice!

1
I did it in autocomplete and it seems to give result maps.googleapis.com/maps/api/place/autocomplete/… - JustWe

1 Answers

1
votes

You have to specify a type of search in your URL (i.e. /nearbysearch/, /textsearch/, etc)

try this:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=53.6020,53.6020&radius=1000&keyword=mcdonalds&sensor=false&key=

Also, don't forget to append your API key to the URL :)

Lastly, for debugging purposes, try to use a different latitude,longitude coordinate and see if that works (i.e. use the lat/lng for New York City).