fix(map): 修复Cesium地图选择器在禁用状态下仍获取位置的问题

master
LiuJiaNan 2026-03-16 15:42:00 +08:00
parent ef395ceab1
commit 38f7594cf7
1 changed files with 9 additions and 7 deletions

View File

@ -86,6 +86,7 @@ const MapSelector = (props) => {
if (longitude && latitude) { if (longitude && latitude) {
addMarkPoint({ longitude, latitude }); addMarkPoint({ longitude, latitude });
} }
if (!disable) {
getLongitudeAndLatitude((error, coords) => { getLongitudeAndLatitude((error, coords) => {
if (error) if (error)
return; return;
@ -93,6 +94,7 @@ const MapSelector = (props) => {
setCurrentLatitude(latitude); setCurrentLatitude(latitude);
setCurrentLongitude(longitude); setCurrentLongitude(longitude);
}); });
}
}; };
// 初始化地图 // 初始化地图