You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It may be a common use case that a marker might relate to other relevant makers. It would be great if a marker's popup could contain links to other markers.
Describe the solution you'd like
Have a standard way to include in a popup links to other markers. The link, once activated, would:
deactivate its own marker's popup,
center the map view on the target marker,
and activate the target marker's popup.
Describe alternatives you've considered
Just referencing the other marker by an id, with no link, but that is confusing, awkward, unwieldy, and impractical for the end user, which not only would have to keep in mind an id but also have to search for it around the map.
Additional context
That would make it possible for users to easily navigate between relevant markers.
However, activating markers by links might not be a feature that leaflet.js itself supports, I haven't checked yet.
The text was updated successfully, but these errors were encountered:
I wanted to let you know that I implemented the possibility to link markers. Now, users can include links to other markers in a popup, which, when activated, closes the current popup, centers the map view on the target marker, and opens the target marker's popup.
You can see the changes I made in the #1863.
I hope this implementation meets your requirements. I would appreciate any feedback you may have.
thanks for the implementation! It is appreciated. I have yet to find some time to try it out in practice, but from your description and code it already does seem pretty good and useful.
It could be even better if we could define our own custom markup. That is, by just using an identifier in the link within a popup's markup (e.g. <a href="#marker-2">go to marker popup 2</a>, it would then create the navigation and activation as you've described. That way authors would have more flexibility when creating the popup content.
Is your feature request related to a problem? Please describe.
It may be a common use case that a marker might relate to other relevant makers. It would be great if a marker's popup could contain links to other markers.
Describe the solution you'd like
Have a standard way to include in a popup links to other markers. The link, once activated, would:
Describe alternatives you've considered
Just referencing the other marker by an id, with no link, but that is confusing, awkward, unwieldy, and impractical for the end user, which not only would have to keep in mind an id but also have to search for it around the map.
Additional context
That would make it possible for users to easily navigate between relevant markers.
However, activating markers by links might not be a feature that leaflet.js itself supports, I haven't checked yet.
The text was updated successfully, but these errors were encountered: