From 23cc34156a6e13752d08d0821543df2e1a8ca8a4 Mon Sep 17 00:00:00 2001 From: danzel Date: Mon, 14 Oct 2013 10:10:14 +1300 Subject: [PATCH] Fix #260 - Zooming in on an area that wasn't inside what we are looking at would cause the newly visible markers not to appear. --- src/MarkerClusterGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 8a58a6ed8..4f33f0cc3 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -756,7 +756,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ //Merge and split any existing clusters that are too big or small _mergeSplitClusters: function () { - if (this._zoom < this._map._zoom) { //Zoom in, split + if (this._zoom < this._map._zoom && this._currentShownBounds.contains(this._getExpandedVisibleBounds())) { //Zoom in, split this._animationStart(); //Remove clusters now off screen this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, this._getExpandedVisibleBounds());