I use MarkerClustererPlus to cluster markers on google map (v3)
Is there a way to switch clustering using a function. Namely, I do not use markers, but only switch the visibility of cluster icons.
To display it, we have the repaint property, but I could not find the property to hide the clusters.
set marker map parameter
clustererObject.setOptions({map:null});//hides the clusterIcons clustererObject.setOptions({map:mapObject});//restores the clusterIcons
Note: when you set the map to null, all cluster markers will be displayed as markers, I'm not sure if this is the desired behavior.
If you just want to hide all the clusters, then Dr. Mollet's answer works fine. If you want to hide only the subgroup / subsection of your map markers, then an update / rebuild is required.
Here is an extended example that can help others find this page through Google Search.
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.1.1/examples/advanced_example.html
Source: https://habr.com/ru/post/1486163/More articles:VBA - Excel: Vlookup crashes my program when no match is found - vbaHow to write an array to a text file in internal memory? - androidHow not to include layout.haml in sinatra app - ruby โโ| fooobar.comCompatible Views UICollectionView Header - iosRegular expression to remove quotes - javaHow to set border for each element of Gridview Image dynamically - androidGoogle Plugin for Eclipse 3.7 not showing up - eclipsejQuery sound fades and pauses, onclick fades into audio and resumes - jqueryError in recursively removing a function using a carriage - rIf the parameter is not passed, use the default value - c ++All Articles