Dealing with overlapping popups?

23 views
Skip to first unread message

David G

unread,
Sep 15, 2022, 10:21:35 AM9/15/22
to Leaflet
I have a map with multiple markers, users can choose to toggle popups on all markers which display additional information about the marker they are associated with.

It's often the case I have a large number of markers in close proximity such that popups overlap on the map.

Is there a recommended way to deal with this (either a feature I haven't found or a strategy someone else has thought of)?

For example, something that would use logic to determine that plugins overlap and if so, try an alternative position relative to the parent marker for the popup?

Arnie Shore

unread,
Sep 15, 2022, 12:15:43 PM9/15/22
to leafl...@googlegroups.com

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leaflet-js/65de8454-f9e2-4984-b270-5a1427eb5f9bn%40googlegroups.com.

Arnie Shore

unread,
Sep 15, 2022, 12:20:30 PM9/15/22
to leafl...@googlegroups.com
Actually, lots more at https://leafletjs.com/plugins.html


Mark Lawton

unread,
Sep 15, 2022, 3:25:51 PM9/15/22
to leafl...@googlegroups.com
yes. lots of plugins for this exact problem.  i use one quite nicely on my site


Look at the Tournament called English Premier League to see the clusters in action.

It’s a great plug in and handles all of the logic for you.



Reply all
Reply to author
Forward
0 new messages