Skip to content Skip to sidebar Skip to footer

Spacing Out Markers In Map Component

Currently I'm using MapboxGL as my map component. I have a group of markers clustered in the same spot, which makes it hard to see the markers. I want an algorithm that checks if t

Solution 1:

What you are trying to do is not really adapted on a dynamic map because the elements would have to be repositioned permanently on the map during a move (ouch!)

The most relevant would be to use the principle of clusters which is perfect for the concern of grouping points. https://docs.mapbox.com/mapbox-gl-js/example/cluster-html/

With all the style options in mapbox you can easily make something graphically acceptable in the spirit of what you want to do. Here are some ideas: https://medium.com/@droushi/mapbox-cluster-icons-based-on-cluster-content-d462a5a3ad5c

Post a Comment for "Spacing Out Markers In Map Component"