From c28a716e47cfb8aa90e9d33ac9ef90cda18c970f Mon Sep 17 00:00:00 2001 From: dattarzadeh Date: Thu, 30 Mar 2017 21:50:23 -0700 Subject: [PATCH] Trigger event when Clusterer redraw method called Having an event trigger here will allow the developer to know when the MarkerClusterer is finishing redrawing, and perform additional operations (e.g. manually updating the cluster icons). The paradigm of different clustering icons for 'larger' clusters isn't what we were looking for. The developer can now: google.maps.event.addListener(myMap, 'clusters_redrawn', function () { // Work... }); --- src/markerclusterer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/markerclusterer.js b/src/markerclusterer.js index 554fcec..e8836ea 100755 --- a/src/markerclusterer.js +++ b/src/markerclusterer.js @@ -708,6 +708,7 @@ MarkerClusterer.prototype.repaint = function() { */ MarkerClusterer.prototype.redraw = function() { this.createClusters_(); + google.maps.event.trigger(this.map_, 'clusters_redrawn', this.clusters_); };