From f16dcfc1e6763601da9598dfe5a0405255be5ef7 Mon Sep 17 00:00:00 2001
From: liuqimichale <123456lq>
Date: Thu, 13 Dec 2018 11:56:59 +0800
Subject: [PATCH] 引入地图
---
index.html | 1 +
src/views/mapsection.vue | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/index.html b/index.html
index 63df500..3a88b49 100644
--- a/index.html
+++ b/index.html
@@ -8,6 +8,7 @@
监控
+
diff --git a/src/views/mapsection.vue b/src/views/mapsection.vue
index c20ed7c..795945b 100644
--- a/src/views/mapsection.vue
+++ b/src/views/mapsection.vue
@@ -30,6 +30,7 @@
+
- 紧张
- 正常
@@ -81,17 +82,32 @@ export default {
bounce:true,//取消达到边界的缓冲效果
})
})
+ this.baiduMap()
},
methods: {
currentPark(item, index) {
console.log(item)
this.currentIndex = index
+ },
+ baiduMap () {
+ var map = new BMap.Map('allmap')
+ var point = new BMap.Point(111.742579, 40.818675)
+ map.centerAndZoom(point, 12)
+ var marker = new BMap.Marker(point) // 创建标注
+ map.addOverlay(marker) // 将标注添加到地图中
}
}
}