Update build

This commit is contained in:
danzel
2012-10-19 10:08:35 +13:00
parent 94a50d9654
commit 9e2581f544
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -221,6 +221,19 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
return this;
},
//Override FeatureGroup.getBounds as it doesn't work
getBounds: function () {
var bounds = new L.LatLngBounds();
if (this._topClusterLevel) {
bounds.extend(this._topClusterLevel._bounds);
} else {
for (var i = this._needsClustering.length - 1; i >= 0; i--) {
bounds.extend(this._needsClustering[i].getLatLng());
}
}
return bounds;
},
//Returns true if the given layer is in this MarkerClusterGroup
hasLayer: function (layer) {
if (this._needsClustering.length > 0) {
+1 -1
View File
File diff suppressed because one or more lines are too long