Compare commits

..

No commits in common. "cd3612f4e09c8877e8a3d572ab5f11357957f5d2" and "0c78009521ed7aa7288c6528fb7fb27b9521db41" have entirely different histories.

3 changed files with 8 additions and 32 deletions

View File

@ -570,12 +570,12 @@ const map = {
dispatch.runtime.setYyfa({})
}
if (
id === 3
|| id === 203
|| id === 205
|| id === 206
) {
if (
id === 3
|| id === 203
|| id === 205
|| id === 206
) {
dispatch.map.setLayerSetting({ dom: true });
// map.setLayoutProperty('卫星图', 'visibility', 'visible');
} else {
@ -741,6 +741,7 @@ const map = {
10, 0.4,
14, 0.8,
],
'text-allow-overlap': true,
'text-size': [
'interpolate', ['linear'], ['zoom'],
@ -764,14 +765,7 @@ const map = {
'visibility': 'visible',
});
map.getSource('关联站点').setData(parseGeoJSON(skdata))
}
if(id!==200&&id!==203&&id!==205&&id!==206){
const layer = map.getLayer('临时水库tz')
if(layer){
map.removeLayer('临时水库tz');
map.removeSource('临时水库tz');
}
}
}
})

View File

@ -88,16 +88,7 @@ function ARzSk({data}) {
"strarz": "4.66"
}];
useEffect(()=>{
return ()=>{
const map = window.__mapref;
const layer = map.getLayer('临时水库')
if(layer){
map.removeLayer('临时水库');
map.removeSource('临时水库');
}
}
},[])
const dispatch = useDispatch();
const flyTo = (record) => {

View File

@ -42,15 +42,6 @@ function DrpReal({ style }) {
useEffect(()=>{
getSkData()
// return ()=>{
// const map = window.__mapref;
// const layer = map.getLayer('临时水库tz')
// if(layer){
// map.removeLayer('临时水库tz');
// map.removeSource('临时水库tz');
// }
// }
},[])
const getSkData = async()=>{