Commit 960dbc29 authored by 吴春's avatar 吴春

1

parent 86052e66
......@@ -19,13 +19,15 @@ export default {
},
methods: {
createMap() {
if (!BMapGL) {
return;
}
let map = new BMapGL.Map("baidu-map"); // 创建地图实例
let point = new BMapGL.Point(116.404, 39.915); // 创建点坐标
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
this.map = map;
if (this.map) {
this.map.clearOverlays()
}
let map = new BMap.Map("baidu-map"); // 创建地图实例
let point = new BMapGL.Point(116.404, 39.915); // 创建点坐标
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
var marker = new BMap.Marker(point); //标记点
map.addOverlay(marker);
this.map = map;
},
addMarker() {
let icon = require(`../../assets/img/info-time.png`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment