mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
When initially adding layers, skip layers that are already added. Fixes adding the same layer multiple times before adding the MarkerClusterGroup to the map. Refs #44
This commit is contained in:
@@ -283,7 +283,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
}
|
||||
|
||||
for (var i = 0, l = this._needsClustering.length; i < l; i++) {
|
||||
this._addLayer(this._needsClustering[i], this._maxZoom);
|
||||
var layer = this._needsClustering[i];
|
||||
if (layer.__parent) {
|
||||
continue;
|
||||
}
|
||||
this._addLayer(layer, this._maxZoom);
|
||||
}
|
||||
this._needsClustering = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user