1

For an application I'm developing, I need to find the nearest bus stops using the Google Maps API. How would I accomplish this?

The place search API just returns REQUEST_DENIED, so that isn't much help.

https://maps.googleapis.com/maps/api/place/search/json?key=AIzaSyCNutXaoPSvdgAboAp7CYLZ2S5oVv_Fe7o&location=52.069858,4.291111&radius=1000&sensor=false

http://puu.sh/zUUa

Kara
  • 6,115
  • 16
  • 50
  • 57
Overv
  • 8,433
  • 2
  • 40
  • 70

1 Answers1

2

I suspect that REQUEST_DENIED gives you a clue that your query is well-formed, but there is something invalid. If it's not the lack of the sensor parameter, it must be the key you provided. I don't have a key myself to test it, and Google refuses to give it saying the URL I provided is invalid... I can only suggest you to double-check your key, and maybe try with another account.

EDIT: Now I've managed to get my key and found your mistake: you forgot to put https, not http, in your request.

Bruno Kim
  • 2,300
  • 4
  • 17
  • 27
  • I tried https, but it made no difference. Here is the one including my API key (browser app, referer agnostic): https://maps.googleapis.com/maps/api/place/search/json?key=AIzaSyCNutXaoPSvdgAboAp7CYLZ2S5oVv_Fe7o&location=52.069858,4.291111&radius=1000&sensor=false API console: http://puu.sh/zUUa – Overv Jun 10 '12 at 03:32
  • 1
    Try it with my new key: AIzaSyDx6XG_qYpWzpeF6rwZ7EWO9Kxriy_vzgc , which works for me. I'll delete it in 24 hours, btw. I have no clue either - the best I found at SO says to activate it at the **Services** pane: http://stackoverflow.com/questions/10385990/request-denied-google-maps-api-v3-places-error . Also, are you using a dedicated Places API key? That was a problem here: http://stackoverflow.com/questions/8833085/request-denied-in-responce-of-google-places-api-request-sensor-true . – Bruno Kim Jun 10 '12 at 22:25
  • I've enabled it in the API console now and the graph displays traffic when I use my API key, but I still get a REQUEST_DENIED. Your key works fine. – Overv Jun 11 '12 at 07:22
  • Nevermind, generating an entirely new key fixed the problem. Thanks for the help! – Overv Jun 11 '12 at 07:23