[GIS] Google Maps MarkerClusterer – Remove all clusters

clusteringgoogle mapsmarkerspostgispostgresql

So, I have a PostGreSQL DB with 317 datapoints – all spatially enabled through PostGIS. I have queried this using PHP as GeoJSON and overlaid it on Google Maps (using a converting routine). I have also used the MarkerClusterer extension available in google Maps api to cluster all the markers.

Now, I want to remove all the clusters from the map, to display other data. How do I do this?

My markers are stored in an array called markers = []; and the marker clusterer is called like this markerCluster = new MarkerClusterer(map, markers);. I'm not able to find the right function to do this. MarkerClusterer link – http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html

Best Answer

Check out the speed test code sample that they provide. That has an option to toggle the marker cluster on or off: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/examples/speed_test_example.html

Related Question