赞
踩
<script type="text/javascript">window._AMapSecurityConfig = {
securityJsCode: "「你申请的安全密钥」",
};
// 以Nginx反向代理为例
location /_AMapService/ {
set $args "$args&jscode=你的安全密钥";
proxy_pass https://restapi.amap.com/;
}
// index.html中引入
<script type="text/javascript">window._AMapSecurityConfig = {
serviceHost: "你的代理服务器域名或地址/_AMapService",
//例如 :serviceHost:'http://1.1.1.1:80/_AMapService',
};
SERVICE_NOT_AVAILABLE,PLEASE CONTACT api@autonavi.com
通过查看高德的具体错误码描述
有个输出: 使用 JSAPI 安全模式,代理服务请以_AMapService 作为一级路由
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。