Support adding markers while we aren't on the map.

This commit is contained in:
danzel
2012-08-20 10:38:59 +12:00
parent 439394c1d8
commit 492d8a0d27
+6
View File
@@ -93,8 +93,14 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!this._topClusterLevel) {
this._generateInitialClusters();
} else if (this._needsClustering.length > 0) {
for (var i = this._needsClustering.length - 1; i >= 0; i--) {
this.addLayer(this._needsClustering[i]);
}
this._needsClustering = [];
}
this._map.on('zoomend', this._zoomEnd, this);
this._map.on('moveend', this._moveEnd, this);