Skip to content

Convert more markers to SVG #5764

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hlfan
Copy link
Contributor

@hlfan hlfan commented Mar 7, 2025

Description

  • Makes all1 markers SVGs with a similar structure. (addresses retina compatible icons #850 (comment))
  • Changes the note markers' ✔️, ❌ & ➕ to be drawn with a reused stroke instead of areas to reduce file size and to enable an easier switch to SVG marker elements for more dynamic pins in the future.
  • Continues to use marker-shadow.png from leaflet

Footnotes

  1. not the yellow marker as I don't have the colours for that one

@AntonKhorev
Copy link
Collaborator

Is it more clear from the routing icons, which one is start/finish? Maybe the start icon doesn't need to be changed?

@AntonKhorev
Copy link
Collaborator

By the way https://antonkhorev.github.io/msvgen/

I'm trying to parametrize the markers by currentColor for situations where several markers are to be displayed at the same time, like search results. Still haven't done gradients.

@hlfan
Copy link
Contributor Author

hlfan commented Mar 7, 2025

If you mean you need to create the gradients' stops from currentColor to use these like for the directions icons (meaning without JS) that would need color-mix or the relative color functions which have only been available in css for less than a year.
But given that parametrication building these from templates with Ruby could be a big later addition.

@hlfan hlfan force-pushed the marker-overhaul branch from 52f735e to 59dcd82 Compare March 7, 2025 14:56
@hlfan hlfan marked this pull request as draft March 14, 2025 01:56
@hlfan hlfan force-pushed the marker-overhaul branch 4 times, most recently from de43fe5 to 9197668 Compare March 14, 2025 17:44
@hlfan
Copy link
Contributor Author

hlfan commented Mar 15, 2025

Still haven't done gradients.

I've also fiddled around a bit, trying to make a marker-based solution here.
Still trying to get rid of the mask as a gradient workaround.

@hlfan hlfan force-pushed the marker-overhaul branch 2 times, most recently from 278a0c4 to aa6f26b Compare March 18, 2025 06:08
@hlfan hlfan marked this pull request as ready for review March 18, 2025 06:09
@hlfan
Copy link
Contributor Author

hlfan commented Mar 18, 2025

I've decided to reduce this PR to just the conversion of the SVG pins. While modularizing and parametrizing the markers is a commendable effort, it shouldn't be part of this PR, but the next step instead.
I've removed from this PR:

  • the marker renaming
  • the two new direction markers
  • the resizing to 25x40
  • the new marker outline paths since they have a noticeable jump in curvature
  • the gradient domain extension

@hlfan hlfan force-pushed the marker-overhaul branch from aa6f26b to 5a361fc Compare March 20, 2025 22:56
@hlfan hlfan changed the title Overhaul markers Convert more markers to SVG Mar 26, 2025
@hlfan hlfan force-pushed the marker-overhaul branch 2 times, most recently from 43c9495 to 981b5ff Compare March 26, 2025 09:10
@hlfan hlfan force-pushed the marker-overhaul branch from 981b5ff to 04029c8 Compare April 1, 2025 05:39
@hlfan hlfan marked this pull request as draft April 1, 2025 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants