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+= '';