【问题标题】:google geocoding api not as accurate as google maps using address谷歌地理编码 API 不如使用地址的谷歌地图准确
【发布时间】:2016-03-13 13:28:15
【问题描述】:

我有很多例子,其中谷歌地图返回确切位置,而地理编码无法找到完全匹配并且仅提供接近匹配的纬度/经度,这对我的目的没有好处。

示例:谷歌地图中的“1729 state road 8, auburn, 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 进行地理编码!

【问题讨论】:

  • 类似问题HERE。那里的建议是,使用 Places API 或库可能会比使用地理编码获得更好的结果。

标签: google-maps google-maps-api-3 geocoding google-geocoding-api


【解决方案1】:

在阅读了很多答案后,我发现了这个解决方案,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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-28
    • 1970-01-01
    • 2016-12-17
    • 1970-01-01
    相关资源
    最近更新 更多