Is there a way to change the Z Order of the markers? When we have markers that are near each other, its difficult to see the other ones. I was considering to randomly change their Z order so that the markers show differently with each update.
Asked
Active
Viewed 164 times
1
-
I hate maps where it's not enough to zoom to max. to comfortably click a certain marker (and sometimes you just have to give up clicking on it). That's why so called [spiderfiers](http://jawj.github.io/OverlappingMarkerSpiderfier/demo.html) were invented (even better if they show a [single point cluster](http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-spiderfier.html) instead of bush of points). Though I have no clue about support of this feature in GMLib. – TLama Sep 02 '15 at 08:20
-
@TLama, IMO, spiderfier is a bad design workaround. Point clustering is a perfect. – Free Consulting Sep 02 '15 at 14:54
-
1@Free, yes, clusters are cool, but they still may need to break at some point. Consider how to handle markers on the exactly same position. At that point there's not much to do, I'd say. Either you'll un-spiderfy the markers from the cluster, or show them *as one* using some sort of side menu which will bring to front the one that you choose (which might be less confusing than *spiders*). That's what I've implemented not so long ago (a *popup* menu which was bringing to front marker for hovered item fading out the others from the cluster). – TLama Sep 02 '15 at 15:13
-
GMLib not implements any of this solutions (you are free to implement it and send me the solution ;-) ). In order to change the ZOrder, you only need to change the order of Markers into the TCollection – cadetill Sep 07 '15 at 07:27