diff --git a/src/views/counter/map.vue b/src/views/counter/map.vue index 0f5e6da..5a76518 100644 --- a/src/views/counter/map.vue +++ b/src/views/counter/map.vue @@ -61,7 +61,7 @@ export default { } ], zoom: 16, - center: [114.186739, 22.250872], + center: [], markers: [], plugin: ['ToolBar', { pName: 'MapType', @@ -90,6 +90,7 @@ export default { this.coordinate = [113.203460828994, 22.64902452257] } // console.log(this.coordinate) + this.center = this.coordinate this.flag = true }) } @@ -110,6 +111,7 @@ export default { this.markers.push(entry) }) this.zoom = 11 + this.center = [114.186739, 22.250872] this.flag = true } }