Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lines with gaps appear filled in legend #770

Closed
1ec5 opened this issue Feb 7, 2023 · 0 comments · Fixed by #774
Closed

Lines with gaps appear filled in legend #770

1ec5 opened this issue Feb 7, 2023 · 0 comments · Fixed by #774
Labels
bug Something isn't working highway-lines

Comments

@1ec5
Copy link
Member

1ec5 commented Feb 7, 2023

A road under construction is depicted as a double line at high zoom levels, but in the legend, the double line appears filled in:

A-35

This is because the road construction line layer specifies the line-gap-width paint property:

https://github.com/ZeLonewolf/openstreetmap-americana/blob/820a1fe4c206c60cb32a12ea9ff83cef4be94e49/src/layer/construction.js#L48-L56

The legend currently uses this property to calculate the overall width of the line feature for sizing the generated SVG image, but it doesn’t actually separate the line into two lines:

https://github.com/ZeLonewolf/openstreetmap-americana/blob/b21979c3cb15066d362936c3abe53425e93b51d3/src/js/legend_control.js#L381-L389

@1ec5 1ec5 added bug Something isn't working highway-lines labels Feb 7, 2023
@1ec5 1ec5 closed this as completed in #774 Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working highway-lines
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant