Search code examples
javascriptgoogle-mapsgoogle-maps-api-2

Locating Nearest Places JSON response in Google Map


I want to do one application which searches for the nearest places in iphone, I found a link in Google http://code.google.com/apis/maps/documentation/places/#PlaceSearches.

I have gone through it, and i have used the below URL for getting the JSON response,

https://maps.googleapis.com/maps/api/place/search/xml?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=MY_KEY

I got the status code as "REQUEST_DENIED"

{
   "html_attributions" : [ ],
   "results" : [ ],
   "status" : "REQUEST_DENIED"
}

Can anyone please help me to fix this ? I have refereed few links in stack overflow but nowhere i found any solutions.


Solution

  • I think you need to have an API key. Their documentation states it is generally because of a lack of the sensor parameter, obviously it is included in your request. so the only other logical option is that you need an API key.