-3

I want to retrieve the nearest location to a latitude and longitude.

If I perform a get with the following url

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 am expecting it to return a JSON array.

However, I get an Access Denied result. I generated my key from the Google console.

Please let me know what I might be doing wrong.

Montdidier
  • 1,181
  • 1
  • 8
  • 21
user3917145
  • 1
  • 1
  • 2
  • create browser key and on Google Maps Geolocation API from Google Console – Mobi Aug 07 '14 at 07:03
  • REQUEST_DENIED This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https://code.google.com/apis/console i got above Error – user3917145 Aug 07 '14 at 07:29
  • Did you switch ON Google Maps Geolocation API from Google Console? If not please give a try. Check this as well http://stackoverflow.com/questions/24864687/place-api-for-android – Mobi Aug 07 '14 at 07:42
  • thanks for us replay i just activated "Google Maps JavaScript API v3" can u please let me know what all services i need to activate ?? – user3917145 Aug 09 '14 at 04:57

1 Answers1

1

For retrieving the current location of device you can go-through this answer and this answer.

Then get places near your location using Google's Place API and you can also refer this blog.

Community
  • 1
  • 1