1

This is a followup question to another I recently had about the Google Maps API.

The following request returns zero results...

http://maps.googleapis.com/maps/api/geocode/json?address=801+BALTIMORE+STREET%2c+Hanover%2c+PA%2c+17331&sensor=false

However, from http://maps.google.com the following address locates correctly...

801 Baltimore Street, Hanover, PA

From the previous question the answer was because the result returned from maps is a "place" and not an "address".

My new question is how can you tell maps is returning a "place" vs and "address"? Is there something in the URL or the response that gives this away?

2 Answers 2

1

If you look at the response on Google Maps, notice the "3 reviews", that is a places entry. The way the entry reads also indicates it to me:

Giant
801 Baltimore St, Hanover, PA ‎
(717) 632-6673 ‎ · giantfoodstores.com
3 reviews 

It seems that the link above doesn't work the first time, but if you click on the "search" it finds it.

2
  • thanks, this tells us an explanation, but still we don't have a way to fix this. also the explanation is still kind of unfortunate: basically my understanding is that googlemaps web actually uses 2 underlying services to present you results: address search (geocoding) and search inside items of "places", where it possibly does a simply textual match on the address. but if u just change the street number slightly, google maps web is still able to give you interpolated address along the same street, so it sort of implies it's using some geocoding correctly, so why not API? Nov 21, 2014 at 18:25
  • pasting my duplicate question link stackoverflow.com/questions/27052088/… Nov 21, 2014 at 18:26
0

geocodezip:

thanks for the response.

assuming that the google maps web utilizes the places API, I tried to get the same result from places API.

for this address: 526+Kawailoa+Road,Kailua,Oahu,HI+96734 google maps does find the correct location. but geocoding API fails, so I try the places API:

curl -v 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=526+Kawailoa+Road,Kailua,Oahu,HI+96734&key=MY_API_KEY'

it returns a empty list. so why does the maps web page finds it but neither places API nor geocoding API finds it?

Thanks Yang

1
  • Have you found a solution, I have the same problem with Université d'Ottawa, Ottawa, ON, Canada Dec 4, 2015 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.