Skip to content

Commit a7d5f88

Browse files
committed
front: kps: add to editor
1 parent 0bfc005 commit a7d5f88

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

front/src/common/Map/Layers/GeoJSONs.tsx

+21
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
import { getPSLSignsLayerProps, getPSLSignsMastLayerProps } from './extensions/SNCF/SNCF_PSL_SIGNS';
4545
import { LayerContext } from './types';
4646
import { getCatenariesProps, getCatenariesTextParams } from './Catenaries';
47+
import configKPLabelLayer from './configKPLabelLayer';
4748
import OrderedLayer from './OrderedLayer';
4849

4950
const SIGNAL_TYPE_KEY = 'extensions_sncf_installation_type';
@@ -146,6 +147,17 @@ function getSignalLayers(context: LayerContext, prefix: string): LayerProps[] {
146147
return [
147148
{ ...getSignalMatLayerProps(context), id: `${prefix}geo/signal-mat` },
148149
{ ...getPointLayerProps(context), id: `${prefix}geo/signal-point` },
150+
{
151+
...configKPLabelLayer({
152+
colors: context.colors,
153+
fieldName: 'extensions_sncf_kp',
154+
minzoom: 12,
155+
isSignalisation: true,
156+
sourceLayer: context.sourceTable || '',
157+
}),
158+
id: `${prefix}geo/signal-kp`,
159+
filter: ['in', 'extensions_sncf_installation_type', ...context.symbolsList],
160+
} as LayerProps,
149161
].concat(
150162
context.symbolsList.map((symbol) => {
151163
const props = getSignalLayerProps(context, symbol);
@@ -212,6 +224,15 @@ function getPSLSignsLayers(context: LayerContext, prefix: string): LayerProps[]
212224
id: `${prefix}geo/psl-signs-mast`,
213225
minzoom: POINT_ENTITIES_MIN_ZOOM,
214226
},
227+
{
228+
...configKPLabelLayer({
229+
colors: context.colors,
230+
minzoom: 9.5,
231+
isSignalisation: true,
232+
sourceLayer: 'psl_signs',
233+
}),
234+
id: `${prefix}geo/psl-signs-kp`,
235+
},
215236
];
216237
}
217238

0 commit comments

Comments
 (0)