Correct getBounds when not on the map

This commit is contained in:
danzel
2012-10-19 10:07:42 +13:00
parent ae3c859e65
commit e3ca8eb153
+1 -1
View File
@@ -220,7 +220,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (this._topClusterLevel) {
bounds.extend(this._topClusterLevel._bounds);
} else {
for (var i = this._needsClustering.length; i >= 0; i--) {
for (var i = this._needsClustering.length - 1; i >= 0; i--) {
bounds.extend(this._needsClustering[i].getLatLng());
}
}