-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dynamic line previews in line preset icons #5888
Conversation
…e line styling in the map
Fix lint errors
It sounds crazy and I've checked your maths ( |
@SilentSpike Are you seeing this in the images or live? Now I'm worried that certain browsers or screens don't like the partial-pixel alignment. |
@quincylvania I noticed it particularly in the residential road image, then checked a live instance and see the same. Edit: Scratch that, I realised that's not a true test since I had zoomed the page there. However, here is a screen shot I just took at default zoom running a live instance where the difference is clearly visible: I checked your images and there actually isn't a difference where I thought I saw one. So it must be monitor specific. |
Maybe try -
Retina screens should handle the half pixel alignment ok - non retina screens would blur it. Also SVG strokes are measured from the center of the stroke OH and I'd draw those vertices as svg circles, not rounded divs. Actually that's probably the real issue and the lines are probably fine. |
- Render vertices with SVG - Add viewBox to SVG - Don't reload static parts of the SVG on every update - Use dimensions that are friendly for low-res displays - Use nicer-looking stroke dash patterns for ferry routes and railways
@bhousel Thanks for the tips! I implemented them and this should be ready for review. @SilentSpike I changed the line casing in the icons to use full-pixel increments, which I think was the problem. Let me know if you're still seeing issues. I updated the railways screenshot so you can check that, or preferably on live. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, and you can merge it whenever you're happy with it 😄
Are you going to do the relation ones too?
Closes #5839. Re: #5873, #5882.
This PR does not address embedded geometry in relation icons.
stroke-dasharray
could probably be improved for railways, ferry routesNicer icons when using line preset as areas:
A selection of the new icons: