@@ -22,12 +22,12 @@ import {
22
22
import { PslSignFeature , RangeEditionState , TrackState } from '../types' ;
23
23
import { ExtendedEditorContextType } from '../../editorContextTypes' ;
24
24
import EntitySumUp from '../../../components/EntitySumUp' ;
25
- import { LayerType } from '../../types' ;
26
25
27
26
export const SpeedSectionEditionLayers : FC = ( ) => {
28
27
const dispatch = useDispatch ( ) ;
29
28
const { t } = useTranslation ( ) ;
30
29
const {
30
+ editorState : { editorLayers } ,
31
31
renderingFingerprint,
32
32
state : { entity, trackSectionsCache, hoveredItem, interactionState, mousePosition } ,
33
33
setState,
@@ -97,8 +97,6 @@ export const SpeedSectionEditionLayers: FC = () => {
97
97
return [ ...pslLayers , ...pslSignLayers ] ;
98
98
} , [ isPSL , mapStyle , showIGNBDORTHO , layersSettings , issuesSettings ] ) ;
99
99
100
- const layers = useMemo ( ( ) => new Set ( [ 'track_sections' ] ) as Set < LayerType > , [ ] ) ;
101
-
102
100
// Here is where we handle loading the TrackSections attached to the speed section:
103
101
useEffect ( ( ) => {
104
102
const trackIDs = entity . properties ?. track_ranges ?. map ( ( range ) => range . track ) || [ ] ;
@@ -217,7 +215,7 @@ export const SpeedSectionEditionLayers: FC = () => {
217
215
< >
218
216
< GeoJSONs
219
217
colors = { colors [ mapStyle ] }
220
- layers = { layers }
218
+ layers = { editorLayers }
221
219
selection = { selection }
222
220
fingerprint = { renderingFingerprint }
223
221
layersSettings = { layersSettings }
0 commit comments