From 38f7594cf7b5f3b14f55acd17d60fa17c02be687 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Mon, 16 Mar 2026 15:42:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(map):=20=E4=BF=AE=E5=A4=8DCesium=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E9=80=89=E6=8B=A9=E5=99=A8=E5=9C=A8=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=E4=BB=8D=E8=8E=B7=E5=8F=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map/MapSelector.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Map/MapSelector.js b/src/components/Map/MapSelector.js index 377b6ab..f971ccf 100644 --- a/src/components/Map/MapSelector.js +++ b/src/components/Map/MapSelector.js @@ -86,13 +86,15 @@ const MapSelector = (props) => { if (longitude && latitude) { addMarkPoint({ longitude, latitude }); } - getLongitudeAndLatitude((error, coords) => { - if (error) - return; - const { longitude, latitude } = coords; - setCurrentLatitude(latitude); - setCurrentLongitude(longitude); - }); + if (!disable) { + getLongitudeAndLatitude((error, coords) => { + if (error) + return; + const { longitude, latitude } = coords; + setCurrentLatitude(latitude); + setCurrentLongitude(longitude); + }); + } }; // 初始化地图