From ba0c2146cac507a7592a7ddc827e18b662514bda Mon Sep 17 00:00:00 2001 From: danzel Date: Tue, 28 Oct 2014 09:26:04 +1300 Subject: [PATCH] Return the whole map bounds instead of our size for _getExpandedVisibleBounds so they are always valid --- src/MarkerClusterGroup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index ac5add87e..03e42750d 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -871,7 +871,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ //Gets the maps visible bounds expanded in each direction by the size of the screen (so the user cannot see an area we do not cover in one pan) _getExpandedVisibleBounds: function () { if (!this.options.removeOutsideVisibleBounds) { - return this.getBounds(); + return this._map.getBounds(); } var map = this._map,