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

Possibility for markers to link to other markers #1563 #1863

Closed

Conversation

yschopfer19
Copy link

This implementation introduces a feature allowing markers to be linked, specifically through their popups. This functionality also ensures an easy navigation between their popups.

Changes Made:

  1. When creating a marker with a popup, users can now specify a linked marker using "linked_marker" and assign a name with "linked_marker_name".
  2. A clickable link is added to the popup. When clicked:
  • The current popup closes.
  • The linked marker gets centered, and its popup opens.
  1. If you have only specified the linked marker, it has a standard name. However, if you specified the name, the link is named after the given name.

Related Issue: #1563

@Conengmo
Copy link
Member

Thank you for your effort on this @yschopfer19! I’ve thought about it and I’ve come to the conclusion I’m not going to merge this, because it’s too much of an edge case to include it in the base marker class. We try to keep these base classes close to the functionality of Leaflet, and don’t overload them too much. I hope you can appreciate our effort to keep Folium maintainable, part of that is being picky with what new complexity we allow.

I do however see some other uses for this:

  • I think your approach could be adapted to using the Folium library instead of being a part of it. Then, it would make a great advanced example in the documentation.
  • You could host a ‘linkable marker class’ as a Folium plugin in a repo of your own, we would then link to it from our documentation. We already do this with some other repos.

If you want to write that documentation case, I’d be glad to help getting that in the docs.

@Conengmo Conengmo closed this Feb 19, 2024
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