Browse Source

fix 建设的点出现在其他tab

dev
巴林闲侠 1 year ago
parent
commit
a1b704df79
  1. 14
      web/client/src/sections/quanju/containers/public/olMap.js

14
web/client/src/sections/quanju/containers/public/olMap.js

@ -43,6 +43,16 @@ const OlMap = (props) => {
olMap.closeOverlay('clickOpen')
olMap.closeOverlay('pointClickOpen')
olMap.removeGeometryLayer('geometry0')
if (tab != 'conserve') {
patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index)
})
}
if (tab != 'build') {
roadProjectList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_road_' + index)
})
}
}
}, [tab])
@ -282,10 +292,6 @@ const OlMap = (props) => {
layerName: 'geometry_patrol_' + index
});
});
} else if (tab != 'conserve' && olMap) {
patrolList.forEach((d, index) => {
olMap.removeGeometryLayer('geometry_patrol_' + index)
})
}
}, [patrolList, olMap, tab])

Loading…
Cancel
Save