googleapis geocode APPROXIMATE and wrong location

↘锁芯ラ 提交于 2019-12-12 02:29:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!