From bbdaee6bfef24425b533d67ba13adb838403b792 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 10 Jan 2024 10:06:35 +0800
Subject: [PATCH] 地图修改

---
 src/views/toCarryOutLegislativeReforms/components/locationMap.vue |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/components/locationMap.vue b/src/views/toCarryOutLegislativeReforms/components/locationMap.vue
index fdda51b..7d6e68e 100644
--- a/src/views/toCarryOutLegislativeReforms/components/locationMap.vue
+++ b/src/views/toCarryOutLegislativeReforms/components/locationMap.vue
@@ -105,12 +105,13 @@
         })
       } else {
         this.map.clearMap()
-        let marker = new AMap.Marker({
+        that.marker = new AMap.Marker({
           map: map,
-          position: this.$parent.position
+          position: that.$parent.position
         })
-        marker.setMap(map)
-        marker.setAnimation('AMAP_ANIMATION_BOUNCE')
+        that.marker.setMap(map)
+        that.map.setCenter(that.$parent.position)
+        that.marker.setAnimation('AMAP_ANIMATION_BOUNCE')
         this.placeSearchName = this.$parent.address
       }
     },

--
Gitblit v1.8.0