【问题标题】:Geocode function returns 610 code and codestatus badkeyGeocode 函数返回 610 代码和 codestatus badkey
【发布时间】:2023-03-03 17:12:01
【问题描述】:

我在我的项目中使用 googlemaps.subgurim.net 谷歌地图。地理编码功能工作正常,直到 2013 年 3 月 8 日。在我遇到地理编码功能问题后,它返回代码 610 和代码状态 badkey。在这里,我将纬度和经度转换为人类可读的地址。现在它不起作用..如何解决这个问题...

GeoCode objAddress = new GeoCode();
objAddress = GMap1.getGeoCodeRequest(new GLatLng(12.55,77.55));
StringBuilder sb = new StringBuilder();
if (objAddress.valid)
{
    sb.Append(objAddress.Placemark.address.ToString());
    string address = sb.ToString();
    lblPlace.Text = address;
}

【问题讨论】:

  • 这意味着您的 API 密钥不正确,来自错误的 IP,或者您根本没有提供密钥。
  • 关注 Twitter 上说 Subgurim Maps @SubgurimMaps 我们使用的 v2 地理编码 API 似乎存在一些技术问题,我们正在调查这个问题。来源:twitter.com/SubgurimMaps/status/311750648616075264

标签: c# c#-3.0


【解决方案1】:

610 代码映射到这个错误:

The given key is either invalid or does not match the domain for which it was given.

听起来您的 API 密钥可能有问题。看看这个问题,因为它可能会解释更多:Google Geocoding v2 API stopped working suddenly

【讨论】:

    【解决方案2】:

    我有同样的问题,几天前的代码运行良好。

    Google 表示自 3 月 8 日起将停止使用其地理编码 API v2,但他们表示已将 EOL 推迟到 2013 年 9 月 8 日(请参阅https://developers.google.com/maps/documentation/geocoding/v2/

    API 密钥过去是可选的,但现在它不能在没有密钥或以前有效的密钥的情况下工作。

    看来唯一的解决方案是移植到 API v3。

    【讨论】:

      【解决方案3】:

      我从:http://en.googlemaps.subgurim.net/descargar.aspx 添加了新版本的 Gmaps.dll 版本 4.1.0.5 文件。 我将此文件添加到我项目的 bin 文件夹中。 在此之后,我将我的谷歌 API 密钥激活到谷歌 API V3。供参考,请参阅此链接: :https://developers.google.com/maps/documentation/javascript/tutorial

      在此之后,我的项目运行良好。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-04-07
        • 2013-01-01
        相关资源
        最近更新 更多