Skip to content

Make DivIcon and CustomIcon work with the new Marker approach #2119

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 2 commits into
base: main
Choose a base branch
from

Conversation

Conengmo
Copy link
Member

@Conengmo Conengmo commented Mar 21, 2025

Earlier we made this change for Marker and Icon (#2068), where the Icon template no longer adds itself to its parent. Instead, the Marker contains code to add its icon to itself. This makes it so that an icon can be reused for multiple markers.

At the time we didn't also apply this to DivIcon and CustomIcon. But it works for them in the same way and solves the same issue.

This should close #744 and also close #1885.

TODO

  • This PR should fix the regression introduced by Fix icon when passing Marker to GeoJson #2086, where marker.add_child(icon) broke.

  • This PR needs some rigorous tests to make sure it works robustly for all cases, like passing icon as a parameter, or doing marker.add_child(icon) or icon.add_to(marker).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants