fix(map): 修复Cesium地图选择器在禁用状态下仍获取位置的问题
parent
ef395ceab1
commit
38f7594cf7
|
|
@ -86,13 +86,15 @@ const MapSelector = (props) => {
|
||||||
if (longitude && latitude) {
|
if (longitude && latitude) {
|
||||||
addMarkPoint({ longitude, latitude });
|
addMarkPoint({ longitude, latitude });
|
||||||
}
|
}
|
||||||
getLongitudeAndLatitude((error, coords) => {
|
if (!disable) {
|
||||||
if (error)
|
getLongitudeAndLatitude((error, coords) => {
|
||||||
return;
|
if (error)
|
||||||
const { longitude, latitude } = coords;
|
return;
|
||||||
setCurrentLatitude(latitude);
|
const { longitude, latitude } = coords;
|
||||||
setCurrentLongitude(longitude);
|
setCurrentLatitude(latitude);
|
||||||
});
|
setCurrentLongitude(longitude);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 初始化地图
|
// 初始化地图
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue