From ddd6bd55557b059cb78d820be03cf8149cba68c5 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Wed, 09 Apr 2025 10:02:01 +0800
Subject: [PATCH] feat: 返回当前定位

---
 src/views/Home/useMapAggregation/useMapAggregation.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/views/Home/useMapAggregation/useMapAggregation.js b/src/views/Home/useMapAggregation/useMapAggregation.js
index 8a00691..7cf680d 100644
--- a/src/views/Home/useMapAggregation/useMapAggregation.js
+++ b/src/views/Home/useMapAggregation/useMapAggregation.js
@@ -208,12 +208,12 @@
     const outlineGJson = await getOutLine(jsonPathPre, hierarchy)
     scalingJudgment.forEach(item => item.show && (item.outline = outlineGJson))
     const [longitude, latitude] = outlineGJson.features[0].properties.centroid
-    setCenterPosition({longitude, latitude})
-    flyTo({ longitude, latitude }, 0, scalingJudgment[(hierarchy.length - 3) * (-1)].height)
+    const height = scalingJudgment[(hierarchy.length - 3) * (-1)].height
+    setCenterPosition({longitude, latitude,height})
+    flyTo({ longitude, latitude }, 0, height)
   }
 
   const userAreaPosition = computed(() => store.state.home.userAreaPosition);
-  const currentAreaPosition = computed(() => store.state.home.currentAreaPosition);
 
   const setCenterPosition = (position) => {
     store.commit('setCurrentAreaPosition', position)

--
Gitblit v1.9.3