Don't try extend bounds by an invalid bounds, doesn't work on leaflet versions earlier than Leaflet/Leafet@ef17f99708, to be removed when 0.6 is released.

This commit is contained in:
danzel
2013-06-25 09:03:53 +12:00
parent 8d1f51adda
commit 80e2496045
+5 -1
View File
@@ -278,7 +278,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}
}
bounds.extend(this._nonPointGroup.getBounds());
//TODO: Can remove this isValid test when leaflet 0.6 is released
var nonPointBounds = this._nonPointGroup.getBounds();
if (nonPointBounds.isValid()) {
bounds.extend(nonPointBounds);
}
return bounds;
},