Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

高德地图API 12月更新加入了密匙 #671

Open
Ya115321 opened this issue Dec 28, 2021 · 2 comments
Open

高德地图API 12月更新加入了密匙 #671

Ya115321 opened this issue Dec 28, 2021 · 2 comments

Comments

@Ya115321
Copy link

vueamap很好用啊,什么时候进行更新将高德的jscode加入啊,或者有没有解决方案啊

@12865ji-hui
Copy link

在项目的入口文件index.html文件中手写配置

<script type="text/javascript"> window._AMapSecurityConfig = { serviceHost:'您的代理服务器域名或地址/_AMapService', // 例如 :serviceHost:'http://1.1.1.1:80/_AMapService', } </script> <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=您申请的key值"></script>

参考:https://lbs.amap.com/api/javascript-api/guide/abc/prepare

@huang70
Copy link

huang70 commented Apr 28, 2022

按照高德的教程在main.js中加入密钥就可以高德教程
我目前使用JSAPI key搭配静态安全密钥以明文设置,高德教程中有两种方式,注意大小写,我之前大小写没认真看弄了好久
window._AMapSecurityConfig = {
securityJsCode:'您申请的安全密钥',
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants