diff --git a/assets/src/legacy/switcher-layers-actions.js b/assets/src/legacy/switcher-layers-actions.js index d22ae05b99..6250336b9e 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+= '';