谷歌地理编码api不如使用地址的谷歌地图准确

mar*_*ing 6 google-maps geocoding google-maps-api-3 google-geocoding-api

我有很多例子,谷歌地图返回确切的位置,而地理编码找不到完全匹配,只提供一个匹配纬度/经度,这对我的目的没有好处.

例如:谷歌地图中的"1729国道8,奥本,IN 46706"将我完全放在沃尔玛配送中心上.

使用地理编码.....通过 http://gmaps-samples.googlecode.com/svn/trunk/geocoder/singlegeocode.html

或手动

通过https://maps.googleapis.com/maps/api/geocode/json?address=1729+state+road+8,+auburn,+IN,+46706&key=[your_key_here]

距离几英里远的地方......

我不明白为什么差异,因为我将使用地理编码等表达MAP,并且许多例子在两者之间不匹配.我需要通过MAPS进行地理编码!

Adi*_*ngh 3

在阅读了大量答案后,我发现了这个解决方案,Gecoder用于查找最近的邮政地址。要获取本地商户数据,请使用 Google Places API

https://developers.google.com/places/web-service/search#PlaceSearchRequests

可以这样做

https://maps.googleapis.com/maps/api/place/textsearch/json?query=someplacename&key=key
Run Code Online (Sandbox Code Playgroud)