From 9f4377423031c0aa824851ec37325050abf361ea Mon Sep 17 00:00:00 2001 From: nboisteault Date: Tue, 8 Oct 2024 14:26:28 +0200 Subject: [PATCH] Fix: base layer (i) information - stop working Fix #4506 --- assets/src/legacy/switcher-layers-actions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/src/legacy/switcher-layers-actions.js b/assets/src/legacy/switcher-layers-actions.js index 5b43777f7a..476686cb25 100644 --- a/assets/src/legacy/switcher-layers-actions.js +++ b/assets/src/legacy/switcher-layers-actions.js @@ -149,8 +149,11 @@ var lizLayerActionButtons = function() { } } // Opacity - const currentLayerState = lizMap.mainLizmap.state.rootMapGroup.getMapLayerOrGroupByName(aName); - if (!currentLayerState.singleWMSLayer) { + let isSingleWMSLayer = false; + if (!metadatas.isBaselayer) { + isSingleWMSLayer = lizMap.mainLizmap.state.rootMapGroup.getMapLayerOrGroupByName(aName).singleWMSLayer; + } + if (!isSingleWMSLayer) { html+= '
'+lizDict['layer.metadata.opacity.title']+'
'; html+= '
'; html+= '';