Skip to content

Combine similar map layers with dasharrays #979

@hiddewie

Description

@hiddewie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions