问题
The following request results in wrong (approx.) coordinates (about 600 meters from correct location): http://maps.googleapis.com/maps/api/geocode/json?address=Garbatyplatz+2+13187+Berlin&sensor=true
=> "lat" : 52.57206610, "lng" : 13.41266040 www.google.com/maps/preview#!q=52.57206610%2C+13.41266040
But if you look for the address directly in google maps, it is correct: https://www.google.de/maps/preview#!q=Garbatyplatz+2+13187+Berlin
Anybody an idea why the result is approx. and so much off?
回答1:
The Geocoder isn't finding that address, it is returning the result for the partial match: [ 0 ]: 13187 Berlin, Germany (52.5720661, 13.41266040000005)
What Google Maps is showing is a "place" result: Google Maps
That can be found using the Places API
来源:https://stackoverflow.com/questions/18064255/googleapis-geocode-approximate-and-wrong-location