【问题标题】:Google Geocoding returning totally different result from Google Map谷歌地理编码返回与谷歌地图完全不同的结果
【发布时间】:2013-08-28 11:19:48
【问题描述】:

对于位置

澳大利亚维多利亚州查尔斯拉筹伯 P-12 学院

Google 地图会显示该学院的确切位置。

但是,当通过 GEOCODE API 请求时, http://maps.googleapis.com/maps/api/geocode/json?address=Charles+La+Trobe+P-12+College,Victoria,Australia&sensor=false

或在他们的演示页面上 https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple

上面的地址得到的结果与确切位置相去甚远。

有什么想法吗?

【问题讨论】:

    标签: google-maps 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
    

    【讨论】:

      【解决方案2】:

      Google 地图上的条目是“地点”,而不是地理编码结果。

      Charles La Trobe P-12 College
      235 Kingsbury Dr, Macleod Victoria 3085, Australia ‎
      +61 3 9223 1400 ‎ · vic.edu.au 
      

      Places API 找到 correct location (as the first result)。地理编码器返回澳大利亚维多利亚的结果 (-37.4713077, 144.7851531),这是它可以在您提供的字符串中找到的最佳“地址”。

      http://www.geocodezip.com/v3_example_geo2.asp?addr1=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&addr2=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&place=1&geocode=2

      【讨论】:

        猜你喜欢
        • 2012-04-10
        • 1970-01-01
        • 2015-10-21
        • 1970-01-01
        • 1970-01-01
        • 2016-04-10
        • 1970-01-01
        • 2015-06-27
        • 1970-01-01
        相关资源
        最近更新 更多