简体   繁体   English

Mapstraction Google Geocode调用返回错误代码610

[英]Mapstraction Google Geocode call returns error code 610

I have this js code where I am using the Mapstraction library to show GMap and use it's geocoder service via mapstraction as well. 我有这个js代码,正在使用Mapstraction库显示GMap并通过mapstraction使用它的地址解析器服务。

I have recently started getting error 610 whenever I try to issue the geocode service call. 每当我尝试发出地理编码服务呼叫时,我最近都开始收到error 610 The http code is 200 ok however the json returned is as follows: http code is 200但是返回的json如下:

_xdc_._8gxa9q7ci && _xdc_._8gxa9q7ci( {
  "Status": {
    "code": 610,
    "request": "geocode"
  }
})

Chromium's inspector shows the request string as follows: Chromium的检查器显示请求字符串,如下所示:

output:json
oe:utf-8
q:nehru place, , delhi,110048, in
mapclient:jsapi
hl:en
callback:_xdc_._8gxa9q7ci

The issue remains even with a newly generated api key! 即使使用新生成的api密钥,问题仍然存在! The map loads just fine with the new key as well as the old key! 使用新密钥和旧密钥都可以很好地加载地图!

So if anyone has run into a similar issue with mapstraction then do let me know the workarounds if any. 因此,如果有人遇到mapstraction的类似问题,请告诉我解决方法(如果有)。

Another thing that I have noticed is that my old key is 86 characters long whereas my new key is only 39 characters long. 我注意到的另一件事是我的旧密钥长86个字符,而我的新密钥长39个字符。 Any insights in this direction would be greatly appreciated. 对此方向的任何见解将不胜感激。 I have spent an entire day trying to get it to work again. 我花了一整天的时间让它重新工作。

Update: I have noticed that with a key length of 86 characters, the request string has key: MYKEY param as well. 更新:我注意到密钥长度为86个字符,请求字符串也具有密钥:MYKEY参数。 Whereas with the 39 character long key, it's not there! 而使用39个字符的长键,则不存在!

Mapstraction seems to require a 86 character api key to work properly with GMap API v2. Mapstraction似乎需要86个字符的api密钥才能与GMap API v2一起正常使用。

The 36 character API key is for v3 I guess. 我猜这是36个字符的API密钥,用于v3。

If I goto the API console, the 86 character keys generated for my domains isn't shown there. 如果我转到API控制台,则不会显示为我的域生成的86个字符键。 However, the link to generate the 86 character api key is a bit hard to get. 但是,生成86个字符的api密钥的链接有些困难。

Once generated, my calls to GMap's Geocoder via Mapstraction are working fine now. 生成后,我通过Mapstraction对GMap的Geocoder的调用现在工作正常。

Here's the link to generate the v2 API key http://code.google.com/apis/maps/signup.html 这是生成v2 API密钥的链接http://code.google.com/apis/maps/signup.html

Remember to scroll to the bottom of the page to fill in the correct url. 切记滚动至页面底部以填写正确的URL。

As for Mapstraction, I think the latest version should be able to use the new 36 character API key! 至于Mapstraction,我认为最新版本应该可以使用新的36个字符的API密钥!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM