|
|
@ -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]) |
|
|
|
|
|
|
|