From fe0fb288aa25cc29abee577b2ab523e99bcedc27 Mon Sep 17 00:00:00 2001 From: Horat1us Date: Thu, 19 Apr 2018 20:32:35 +0300 Subject: [PATCH 1/2] Update markerclusterer.js --- src/markerclusterer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markerclusterer.js b/src/markerclusterer.js index 554fcec..3d28b8f 100755 --- a/src/markerclusterer.js +++ b/src/markerclusterer.js @@ -695,7 +695,7 @@ MarkerClusterer.prototype.repaint = function() { // Remove the old clusters. // Do it in a timeout so the other clusters have been drawn first. - window.setTimeout(function() { + setTimeout(function() { for (var i = 0, cluster; cluster = oldClusters[i]; i++) { cluster.remove(); } From db6a3be24cab839f0ea531892435813d09dd6d89 Mon Sep 17 00:00:00 2001 From: Horat1us Date: Thu, 19 Apr 2018 20:42:50 +0300 Subject: [PATCH 2/2] Update markerclusterer.js --- src/markerclusterer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/markerclusterer.js b/src/markerclusterer.js index 3d28b8f..d7b3ad2 100755 --- a/src/markerclusterer.js +++ b/src/markerclusterer.js @@ -1267,7 +1267,9 @@ ClusterIcon.prototype.createCss = function(pos) { // Export Symbols for Closure // If you are not going to compile with closure then you can remove the // code below. -window['MarkerClusterer'] = MarkerClusterer; +if (typeof window !== 'undefined') { + window['MarkerClusterer'] = MarkerClusterer; +} MarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker; MarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers; MarkerClusterer.prototype['clearMarkers'] =