I use MarkerClustererPlus for clustering markers on google map (v3)
Is there a way to toggle clustering with a function. Namely I dont wont to effect markers, but only toggle visibility of cluster icons.
For showing it we have property - repaint, but I couldnt find the property to hide clusters.
set the map-option of the markerClusterer
clustererObject.setOptions({map:null});//hides the clusterIcons
clustererObject.setOptions({map:mapObject});//restores the clusterIcons
Note: when you set the map to null all clustered markers will appear as markers, I'm not sure if this is the desired behaviour
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With