Until recently, map styles that use line-dasharray to display a dashed line, could not use feature properties to style the dash.
Since maplibre/maplibre-gl-js#1235 and maplibre/maplibre-gl-js#5812, this is supported since Maplibre GL JS version 5.8.0. See https://maplibre.org/maplibre-style-spec/layers/#line-dasharray.
Currently, similar map layers (e.g. railway lines) are duplicated entirely because they have a different dash. For example current lines, proposed lines, lines under construction and disused lines. We can now combine these duplicated style layers into a single layer, saving style size, parsing time and rendering time.
Until recently, map styles that use
line-dasharrayto display a dashed line, could not use feature properties to style the dash.Since maplibre/maplibre-gl-js#1235 and maplibre/maplibre-gl-js#5812, this is supported since Maplibre GL JS version 5.8.0. See https://maplibre.org/maplibre-style-spec/layers/#line-dasharray.
Currently, similar map layers (e.g. railway lines) are duplicated entirely because they have a different dash. For example current lines, proposed lines, lines under construction and disused lines. We can now combine these duplicated style layers into a single layer, saving style size, parsing time and rendering time.