【问题标题】:Finding a location latitude and longitude based on the postal code and country code on google api根据google api上的邮政编码和国家代码查找位置纬度和经度
【发布时间】:2018-10-20 11:34:48
【问题描述】:

我们需要根据邮政编码查找位置纬度和经度的解决方案,所以我使用了谷歌地理编码和组件过滤。但是一旦某些邮政编码(2001,2003,2012,2014 等)没有过滤掉任何结果,我们可以为此提供解决方案,或者可以找到任何替代解决方案。

这是我尝试获取 json 数据的 url。

https://maps.googleapis.com/maps/api/geocode/json?address=AU&components=postal_code:2001&sensor=false&key=API-Key

【问题讨论】:

    标签: google-api google-geocoding-api


    【解决方案1】:

    您没有得到结果,因为其中一些邮政编码似乎对应于邮政信箱。

    您也可以使用 geocode.xyz

    例如:http://geocode.xyz/2001?region=AU

    澳大利亚 x,y z: -33.86318,151.20859 ??

    悉尼,悉尼,澳大利亚 2001 » 信心得分:0.5

    要获取 json 数据,请尝试:http://geocode.xyz/2001?region=AU&json=1

    { "standard" : { "addresst" : "SYDNEY", "stnumber" : {}, "prov" : "AU", "city" : "SYDNEY", "countryname" : "Australia", "postal" : "2001", "confidence" : "0.5" }, "longt" : "151.20859", "alt" : { "loc" : { "streets" : { "street_address" : { "staddress" : "SYDNEY", "stnumber" : "-" } }, "longt" : "151.20859", "city" : "SYDNEY", "cc" : {}, "latt" : "-33.86318" } }, "elevation" : {}, "latt" : "-33.86318"}

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-14
    • 2012-03-24
    • 2016-06-24
    • 2017-05-23
    • 1970-01-01
    相关资源
    最近更新 更多