From 15dced5e76e9a3ad57f11a5cb64bcede8a4fe31b Mon Sep 17 00:00:00 2001 From: xianfuxing Date: Tue, 28 Aug 2018 10:49:20 +0800 Subject: [PATCH] # add test positions --- src/views/counter/map.vue | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/views/counter/map.vue b/src/views/counter/map.vue index f7eecb5..8efbbc6 100644 --- a/src/views/counter/map.vue +++ b/src/views/counter/map.vue @@ -32,16 +32,36 @@ export default { flag: false, defaultPositions: [ { - name: '上海', - position: [121.59996, 31.197646] + name: '海洋公园', + position: [114.186739, 22.250872] }, { - name: '古镇', - position: [113.203698459202, 22.649173177084] + name: '香港大学', + position: [114.143472, 22.284105] + }, + { + name: '南丫北容村', + position: [114.126261, 22.22863] + }, + { + name: '大帽山', + position: [114.124105, 22.401088] + }, + { + name: '恒生管理学院', + position: [114.223565, 22.380771] + }, + { + name: '盐田', + position: [114.223565, 22.380771] + }, + { + name: '清水', + position: [114.312821, 22.301076] } ], zoom: 16, - center: [113.203698459202, 22.649173177084], + center: [114.186739, 22.250872], markers: [], plugin: ['ToolBar', { pName: 'MapType', @@ -74,11 +94,6 @@ export default { }) } }, - watch: { - '$route'(to, from) { - console.log(from) - } - }, created() { const mapClick = this.$store.getters.mapClick if (mapClick) { @@ -94,6 +109,7 @@ export default { entry.draggable = false this.markers.push(entry) }) + this.zoom = 11 this.flag = true } } @@ -102,7 +118,7 @@ export default {