npm install -S vue-bmap-gl
npm install -S vue-mapvgl
import VueBMap from 'vue-bmap-gl';
import VueMapvgl from 'vue-mapvgl';
import 'vue-bmap-gl/dist/style.css';
Vue.use(VueBMap);
Vue.use(VueMapvgl);
VueBMap.initBMapApiLoader({
ak: '7Qbjkfc8YBylegUL8j1yY1pV3iNtxKxW',
v: '1.0'
});
npm i --save vue-baidu-map
import Vue from 'vue'
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
ak: 'YOUR_APP_KEY'
})
<template>
<baidu-map class="map">
</baidu-map>
</template>
<style>
.map {
width: 400px;
height: 300px;
}
</style>