diff --git a/assets/src/legacy/switcher-layers-actions.js b/assets/src/legacy/switcher-layers-actions.js index 4c2249bd45..4ef53c7aff 100644 --- a/assets/src/legacy/switcher-layers-actions.js +++ b/assets/src/legacy/switcher-layers-actions.js @@ -161,26 +161,12 @@ var lizLayerActionButtons = function() { && featureTypes.length != 0 ) { var exportFormats = lizMap.getVectorLayerResultFormat(); var options = ''; - for ( var i=0, len=exportFormats.length; i'+format+''; } // Export layer // Only if layer is in attribute table - var showExport = false; - if( options != '' ) { - for (const featureType of featureTypes) { - var typeName = featureType.getElementsByTagName('Name')[0].textContent; - if ( typeName == aName ) { - showExport = true; - continue; - } else if (typeName == aName.split(' ').join('_') ) { - showExport = true; - continue; - } - } - } - if( showExport ) { + if( options != '' && lizMap.mainLizmap.initialConfig.attributeLayers.layerNames.includes(aName) ) { html+= '
'+lizDict['layer.metadata.export.title']+'
'; html+= '
'; html+= '