【问题标题】:Google Maps API v3 and GeocodingGoogle Maps API v3 和地理编码
【发布时间】:2013-12-18 03:01:23
【问题描述】:

我使用 Google Maps API v3 进行在线计费,因为我使用的超出每日配额。

我在使用地理编码调用时遇到问题,我收到错误消息:

此站点或 IP 无权使用此 API 密钥。

使用我的 API 密钥正确调用:

https://maps.googleapis.com/maps/api/geocode/json?address=[ADDRESS]&sensor=false&language=it&key=[myApiKey]

地图 API v3 中是否不包含地理编码调用?我是否必须订阅其他一些不同的包才能允许地理编码请求?

【问题讨论】:

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


    【解决方案1】:

    请参考以下链接。

    http://jsfiddle.net/xJ26V/1/

     var geocoder = new google.maps.Geocoder();
           geocoder.geocode({ 'address': addresscity }, function (results, status) {
                    if (status == google.maps.GeocoderStatus.OK)                       
                        latitude = results[0].geometry.location.lat();
                        longitude = results[0].geometry.location.lng();
    }
    });
    

    【讨论】:

    【解决方案2】:

    如果您想为超出免费配额付费,您需要与 Google(Google Maps API for Business)签订合同。有关如何联系代表的信息,请访问此链接:

    https://developers.google.com/maps/licensing

    【讨论】:

      猜你喜欢
      • 2013-04-05
      • 1970-01-01
      • 2013-10-05
      • 1970-01-01
      • 2012-12-11
      • 2012-06-08
      • 2011-09-27
      • 2013-10-04
      • 2013-06-27
      相关资源
      最近更新 更多