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.

This commit is contained in:
danzel
2013-10-14 10:11:41 +13:00
parent bfecd7c64d
commit 23cc34156a
+1 -1
View File
@@ -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());