0

executing this:

$curl "http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false"

returns this:

{
   "results" : [],
   "status" : "ZERO_RESULTS"
}

Why doesn't it work?

Cheers!

Vivek
  • 322
  • 1
  • 13

1 Answers1

0

Not sure, but I get the same results when I hit that URL directly in the browser. It may have something to do with that being the sample address that is shown in Geocoding Responses section of the Google Maps API Web Services Dev Guide. Maybe they turned it off because it was getting overloaded?

I even tried a version of that address that has been URL encoded:

http://maps.googleapis.com/maps/api/geocode/json?address=1600%20Amphitheatre%20Parkway%2C%20Mountain%20View%2C%20CA&sensor=false

but get the same result as the original attempt.

I can tell you that if you go directly to http://maps.google.com/maps and key in: 1600 Amphitheatre Parkway, Mountain View, CA, you do get results.

At any rate, your URL is basically formatted correctly and should work. Try a different address, formatted the same way, and you will get results. This worked fine for me:

http://maps.googleapis.com/maps/api/geocode/json?address=Wrigley+Field&sensor=false

Some follow up, I'm not sure where you were trying to run your code, but if it was in a jsFiddle, you may be interested in this question: JQuery won't get json?

Community
  • 1
  • 1
Sean Mickey
  • 7,618
  • 2
  • 32
  • 58
  • Did you really mean a place in Georgia, and not the baseball counterpart? :D I think this JSON service is unreliable and one should use the JavaScript API. – Heitor Chang May 16 '12 at 20:56
  • @HeitorChang Of course I meant the baseball reference :) but I was really just trying to verify that anything else would work. Agreed. I don't generally use the Web Services interface; I use JavaScript as well. But actually, I guess what I get back makes perfect sense; it is probably the closest valid _address_. I really should have used the PlacesLibrary for something like: `Wrigley Field`. – Sean Mickey May 16 '12 at 21:00