Skip to content

Commit 1f5d6ae

Browse files
committed
Add dashed line support to PathLayer in Map
Introduced dashed line rendering for PathLayer using PathStyleExtension. Lines are now dashed unless the 'peak_mass_flow' property is present, improving visual distinction of features.
1 parent 4cb2676 commit 1f5d6ae

File tree

1 file changed

+6
-1
lines changed
  • src/features/map/components/Map

1 file changed

+6
-1
lines changed

src/features/map/components/Map/Map.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
PolygonLayer,
88
TextLayer,
99
} from '@deck.gl/layers';
10-
import { DataFilterExtension } from '@deck.gl/extensions';
10+
import { DataFilterExtension, PathStyleExtension } from '@deck.gl/extensions';
1111

1212
import positron from 'constants/mapStyles/positron.json';
1313
import no_label from 'constants/mapStyles/positron_nolabel.json';
@@ -227,6 +227,11 @@ const useMapLayers = (onHover = () => {}) => {
227227
7 * scale,
228228
),
229229
getLineColor: edgeColour,
230+
getDashArray: (f) =>
231+
f.properties['peak_mass_flow'] ? [0, 0] : [8, 4],
232+
dashJustified: true,
233+
dashGapPickable: true,
234+
extensions: [new PathStyleExtension({ dash: true })],
230235
updateTriggers: {
231236
getLineWidth: [scale, min, max],
232237
},

0 commit comments

Comments
 (0)