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); + }); + } }; // 初始化地图