Bug fixed duplicating layers

This commit is contained in:
Luis Fernando Molina committed 2020-01-14 20:11:07 +01:00
1 parent 182be1fc21
commit 8d769cc9f7
1 file changed
+6 -7
+6 -7
View File
@@ -154,8 +154,8 @@ function newProductsPanel () {
}
}
function onLayerStatusChanged (pLayer) {
thisObject.container.eventHandler.raiseEvent('Layer Status Changed', pLayer)
function onLayerStatusChanged (layer) {
thisObject.container.eventHandler.raiseEvent('Layer Status Changed', layer)
}
function getLoadingLayers () {
@@ -255,11 +255,10 @@ function newProductsPanel () {
function removeNext () {
for (let i = 0; i < thisObject.layers.length; i++) {
let layer = thisObject.layers[i]
if (layer.session !== undefined) {
thisObject.layers.splice(i, 1)
localLayers.push(layer)
removeNext()
}
thisObject.layers.splice(i, 1)
localLayers.push(layer)
removeNext()
}
}
}