0
votes

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.

2

2 Answers

1
votes

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.

0
votes

I used the same URL but substituted my server key for yours and got a valid response. Make sure that you are using a server key and not ip restricting the key.