vue中引入高德地图,水滴定位点
1.安装vue-amap
npm install vue-amap --save
2.在入口文件main.js引入
import AMap from 'vue-amap';
Vue.use(AMap);
AMap.initAMapApiLoader({
// 高德key
key: '你的key',
// 插件集合 (插件按需引入)
plugin: ['AMap.Geolocation'],
})
3.组件代码
<template>
<div class="amap-
原创
2021-09-02 14:31:08 ·
367 阅读 ·
0 评论