Combine railway line layers with dashes#1000
Open
hiddewie wants to merge 12 commits into
Open
Conversation
Fixes #979 Enabled by maplibre/maplibre-gl-js#1235 and maplibre/maplibre-gl-js#5812. Supported since Maplibre GL JS version 5.8.0. See https://maplibre.org/maplibre-style-spec/layers/#line-dasharray We can combine duplicated map layers that use different dashes. The `line-dasharray` supports a data-driven style. We still have to duplicate dashed lines and non-dashed lines, because `line-cap` is not data-driven. For lines with a dasharray, the line cap should be `butt` while for non-dashed lines the line cap should be `round`.
…to combine-dasharrays # Conflicts: # proxy/js/styles.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR number 1000 🎉
Fixes #979
Enabled by maplibre/maplibre-gl-js#1235 and maplibre/maplibre-gl-js#5812. Supported since Maplibre GL JS version 5.8.0.
See https://maplibre.org/maplibre-style-spec/layers/#line-dasharray
We can combine duplicated map layers that use different dashes. The
line-dasharraysupports a data-driven style.We still have to duplicate dashed lines and non-dashed lines, because
line-capis not data-driven. For lines with a dasharray, the line cap should bebuttwhile for non-dashed lines the line cap should beround.Deduplicating railway lines with dashes will cause the map style to contain less layers, causing the map to load quicker. Less layers will also cause the map to show tiles quicker, because less layers have to be evaluated for each feature on the map.
Layer differences:
View diff with whitespace disabled: https://github.com/hiddewie/OpenRailwayMap-vector/pull/1000/changes?w=1