npm install vue-amap -D 在main.js importVueAMapfrom"vue-amap";Vue.use(VueAMap);VueAMap.initAMapApiLoader({key:"高德地图的key",// 这里写你申请的高德地图的keyplugin: ["AMap.Autocomplete","AMap.Geocoder","AMap.Geolocation"],v:"1.4.15",uiVersion:"1.1"});window._AMapSecurityConfig= {sec...
Vue.use(AmapVue); AmapVue.config.key ='您申请的key值'; AmapVue.config.version ='2.0';// 默认2.0,这里可以不修改 AmapVue.config.plugins = [ "AMap.Scale",//右下角缩略图插件 比例尺 "AMap.PolyEditor",//编辑 折线多,边形 "AMap.CircleEditor",//圆形编辑器插件, "AMap.RectangleEditor",//...
项目中需要加载地图, 选择使用高徳地图(更易懂易用稳定些)1.首先需要在高徳地图官网申请一个开发者账号 得到一个key2.在vue2 的index.html 中加载高徳js库