Mapstraction Google Geocode 调用返回错误代码 610
我有这个 js 代码,我使用 Mapstraction 库来显示 GMap 并通过 mapstraction 使用它的地理编码器服务。
最近,每当我尝试发出地理编码服务调用时,我都会收到错误 610
。 http 代码是 200
正常,但是返回的 json
如下:
_xdc_._8gxa9q7ci && _xdc_._8gxa9q7ci( {
"Status": {
"code": 610,
"request": "geocode"
}
})
Chromium 的检查器显示请求字符串如下:
output:json
oe:utf-8
q:nehru place, , delhi,110048, in
mapclient:jsapi
hl:en
callback:_xdc_._8gxa9q7ci
即使使用新生成的 api 密钥,问题仍然存在!使用新钥匙和旧钥匙都可以很好地加载地图!
因此,如果有人遇到类似的 mapstraction 问题,请告诉我解决方法(如果有)。
我注意到的另一件事是我的旧密钥有 86 个字符长,而我的新密钥只有 39 个字符长。对此方向的任何见解将不胜感激。我花了一整天的时间试图让它再次工作。
更新:我注意到密钥长度为 86 个字符,请求字符串也具有 key: MYKEY 参数。而对于 39 个字符长的密钥,它不存在!
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.
I have recently started getting error 610
whenever I try to issue the geocode service call. The http code is 200
ok however the json
returned is as follows:
_xdc_._8gxa9q7ci && _xdc_._8gxa9q7ci( {
"Status": {
"code": 610,
"request": "geocode"
}
})
Chromium's inspector shows the request string as follows:
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! 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.
Another thing that I have noticed is that my old key is 86 characters long whereas my new key is only 39 characters long. 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. Whereas with the 39 character long key, it's not there!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mapstraction 似乎需要 86 个字符的 api 密钥才能与 GMap API v2 正常工作。
我猜 36 个字符的 API 密钥适用于 v3。
如果我转到 API 控制台,为我的域生成的 86 个字符密钥不会显示在那里。然而,生成 86 个字符 api 密钥的链接有点难以获取。
生成后,我通过 Mapstraction 对 GMap 地理编码器的调用现在工作正常。
这是生成 v2 API 密钥的链接
http://code.google.com/apis/maps/signup.html
请记住滚动到页面底部以填写正确的网址。
至于Mapstraction,我认为最新版本应该可以使用新的36个字符的API密钥!
Mapstraction seems to require a 86 character api key to work properly with GMap API v2.
The 36 character API key is for v3 I guess.
If I goto the API console, the 86 character keys generated for my domains isn't shown there. However, the link to generate the 86 character api key is a bit hard to get.
Once generated, my calls to GMap's Geocoder via Mapstraction are working fine now.
Here's the link to generate the v2 API key
http://code.google.com/apis/maps/signup.html
Remember to scroll to the bottom of the page to fill in the correct url.
As for Mapstraction, I think the latest version should be able to use the new 36 character API key!