
高德开发者地图 快速使用报错
从 高德 开发者平台上,下载的快速地图,在本地打不开,报错GET file://webapi.amap.com/maps?v=1.3&key=e07ffdf58c8e8672037bef0d6cae7d4a net::ERR_FILE_NOT_FOUNDmaps2.html:74Uncaught ReferenceError: AMap is not definedat maps2.htm
·
从 高德 开发者平台上,下载的快速地图,在本地打不开,报错
GET file://webapi.amap.com/maps?v=1.3&key=e07ffdf58c8e8672037bef0d6cae7d4a net::ERR_FILE_NOT_FOUND
maps2.html:74
Uncaught ReferenceError: AMap is not defined
at maps2.html:74:6
at maps2.html:87:4
可能原因, file://webapi.amap.com/maps 替换成 http://webapi.amap.com/maps,会提示
将地图版本提升 至1.45,
在html中 JS前引入自己的密钥和 key值
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: '密钥',
}
</script>
<!-- 获取地理位置 -->
<script type="text/javascript"
src="http://webapi.amap.com/maps?v=1.4.15&key=自己的key值&plugin=AMap.Autocomplete,AMap.PlaceSearch">
</script>
更多推荐
所有评论(0)