【问题标题】:google.loader.ClientLocation returning emply strings for address itemsgoogle.loader.ClientLocation 返回地址项的 emply 字符串
【发布时间】:2011-07-11 19:47:32
【问题描述】:

为什么 Google API 加载程序客户端地址位置多年来一直为工作国家/地区返回空字符串?。 对象在此处,但地址项为空。

在 API 密钥之后。

google.load("maps",'3',{other_params:'sensor=true'});  
google.setOnLoadCallback(function()
{
    if (google.loader.ClientLocation)  
    {  
google.loader.ClientLocation.address.city is ""  
google.loader.ClientLocation.address.region is ""  
google.loader.ClientLocation.address.country_code is ""  
google.loader.ClientLocation.latitude is OK  
google.loader.ClientLocation.longitude is OK  

【问题讨论】:

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


    【解决方案1】:

    Google.load.ClientLocation 不再受 Google 团队开发人员的支持。 load.ClientLocation 只返回一个非常糟糕的准确纬度和经度,没有更多的地址项​​。

    这很糟糕,因为现在如果用户不接受使用 HTML5 返回地理位置,您需要使用 IPlocation 来搜索国家和城市。

    我认为像谷歌这样的伟大公司非常自私,许多网站需要提供识别城市、国家、语言的内容作为最低限度和ClientLocation 功能,这是一种更简单的方式。现在要做到这一点,您需要调用导航器向用户询问,获取纬度,经度并使用外部调用另一个服务来查看简单的国家代码!。这不是为了简化我的应用程序。国家或城市位置不像 GPS 位置在 100 m 这是许多开发人员和用户的基本功能。干杯。

    见:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-27
      • 1970-01-01
      • 2011-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多