[英]Google Static Maps API V2 for business on Android
I am trying to use Google Static Maps API V2 for business on Android. 我正在尝试将Google Static Maps API V2用于Android上的业务。 Firstly, generated signature using client Id and Crypto Key, and made the below call to Google on Android device. 首先,使用客户端ID和加密密钥生成签名,并在Android设备上向Google调用以下内容。 (Modified client id) (修改后的客户端ID)
http://maps.googleapis.com/maps/api/staticmap?center=51.52574%2C-0.07724&zoom=15&size=510x271&sensor=false&scale=2&client=gme-XXXXXXXXX&signature=DVEffwz-at_xWsarlhLLjURWfaA http://maps.googleapis.com/maps/api/staticmap?center=51.52574%2C-0.07724&zoom=15&size=510x271&sensor=false&scale=2&client=gme-XXXXXXXXX&signature=DVEffwz-at_xWsarlhLLjURWfaA
But I have the below error message. 但我有以下错误消息。
The Google Maps API server rejected your request. Google Maps API服务器拒绝了您的请求。 Unable to authenticate the request. 无法验证请求。 Provided 'signature' is not valid for the provided client ID. 提供的“签名”对提供的客户端ID无效。 Learn more: https://developers.google.com/maps/documentation/business/webservices/auth 了解详情: https : //developers.google.com/maps/documentation/business/webservices/auth
However I can open correct map on desktop browser using that url, so the signature and url is fine. 但是我可以使用该URL在桌面浏览器上打开正确的地图,因此签名和网址很好。 I think I need to set something else, but I do not know what I should set up more. 我想我需要设置其他东西,但我不知道我应该设置更多。
If anyone has this experience, please let me know how to setup Google Static Maps API V2 for business on Android. 如果有人有这方面的经验,请告诉我如何在Android上设置Google Static Maps API V2 for business。
Thanks in advance. 提前致谢。
this is the format that my URL is in, maybe you have it wrong 这是我的网址所在的格式,也许你错了
URL = "http://maps.google.com/maps/api/staticmap?center=" +lati
+ "," + longi + "&zoom=18&size=400x380&maptype=hybrid&sensor=false&
key=AIzaSyCWRdg8Kiy7CI9tsKjt57bbTIrV_L6QQ3c";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.