Skip to content

Commit a87cfd1

Browse files
SharglutDevnicolaswurtz
authored andcommitted
front: fix layers order on map
1 parent d7579b7 commit a87cfd1

File tree

7 files changed

+28
-14
lines changed

7 files changed

+28
-14
lines changed

front/src/applications/editor/Map.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ const MapUnplugged: FC<PropsWithChildren<MapProps>> = ({
206206
attributionControl={false}
207207
touchZoomRotate
208208
maxPitch={85}
209-
terrain={{ source: 'terrain', exaggeration: terrain3DExaggeration }}
209+
terrain={
210+
terrain3DExaggeration
211+
? { source: 'terrain', exaggeration: terrain3DExaggeration }
212+
: undefined
213+
}
210214
doubleClickZoom={false}
211215
interactive
212216
cursor={cursor}

front/src/applications/referenceMap/Map.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ function Map() {
123123
interactiveLayerIds={defineInteractiveLayers()}
124124
touchZoomRotate
125125
maxPitch={85}
126-
terrain={{ source: 'terrain', exaggeration: terrain3DExaggeration }}
126+
terrain={
127+
terrain3DExaggeration
128+
? { source: 'terrain', exaggeration: terrain3DExaggeration }
129+
: undefined
130+
}
127131
>
128132
<VirtualLayers />
129133
<AttributionControl customAttribution={CUSTOM_ATTRIBUTION} />
@@ -149,6 +153,7 @@ function Map() {
149153
/>
150154
</>
151155
)}
156+
152157
<Platforms
153158
colors={colors[mapStyle]}
154159
layerOrder={LAYER_GROUPS_ORDER[LAYERS.PLATFORMS.GROUP]}

front/src/assets/mapstyles/OSMStyle.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,10 @@
10471047
"type": "fill-extrusion",
10481048
"minzoom": 0,
10491049
"paint": {
1050-
"fill-extrusion-color": "#aaa",
1051-
"fill-extrusion-height": ["get", "render_height"],
1052-
"fill-extrusion-base": ["get", "render_min_height"],
1053-
"fill-extrusion-opacity": 0.6
1050+
"fill-extrusion-color": "#aaa",
1051+
"fill-extrusion-height": ["get", "render_height"],
1052+
"fill-extrusion-base": ["get", "render_min_height"],
1053+
"fill-extrusion-opacity": 0.6
10541054
}
10551055
},
10561056
{

front/src/common/Map/Consts/colors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const colors: Record<string, Theme> = {
5656
halo: '#eee',
5757
},
5858
platform: {
59-
fill: '#e05206',
59+
fill: '#e9b996',
6060
},
6161
pn: {
6262
text: '#712b2b',

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function Platforms(props: PlatformsProps) {
1616

1717
const platformsParams: LayerProps = {
1818
id: 'osm/platforms',
19-
type: 'fill-extrusion',
19+
type: 'fill',
2020
source: 'openmaptiles',
2121
'source-layer': 'transportation',
2222
filter: [
@@ -26,10 +26,7 @@ function Platforms(props: PlatformsProps) {
2626
['==', 'subclass', 'platform'],
2727
],
2828
paint: {
29-
'fill-extrusion-color': colors.platform.fill,
30-
'fill-extrusion-height': 2,
31-
'fill-extrusion-base': 1,
32-
'fill-extrusion-opacity': 0.4,
29+
'fill-color': colors.platform.fill,
3330
},
3431
};
3532

front/src/modules/simulationResult/components/SimulationResultsMap.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,11 @@ const Map: FC<MapProps> = ({ setExtViewport }) => {
247247
interactiveLayerIds={interactiveLayerIds}
248248
touchZoomRotate
249249
maxPitch={85}
250-
terrain={{ source: 'terrain', exaggeration: terrain3DExaggeration }}
250+
terrain={
251+
terrain3DExaggeration
252+
? { source: 'terrain', exaggeration: terrain3DExaggeration }
253+
: undefined
254+
}
251255
onLoad={handleLoadFinished}
252256
>
253257
<VirtualLayers />

front/src/modules/trainschedule/components/ManageTrainSchedule/Map.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ function Map() {
171171
interactiveLayerIds={defineInteractiveLayers()}
172172
touchZoomRotate
173173
maxPitch={85}
174-
terrain={{ source: 'terrain', exaggeration: terrain3DExaggeration }}
174+
terrain={
175+
terrain3DExaggeration
176+
? { source: 'terrain', exaggeration: terrain3DExaggeration }
177+
: undefined
178+
}
175179
>
176180
<VirtualLayers />
177181
<AttributionControl position="bottom-right" customAttribution={CUSTOM_ATTRIBUTION} />

0 commit comments

Comments
 (0)