Skip to content

Commit

Permalink
Fix export layer with accent
Browse files Browse the repository at this point in the history
Fix #3660
  • Loading branch information
nboisteault committed Aug 21, 2023
1 parent 35b0086 commit fffe034
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions assets/src/legacy/switcher-layers-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,12 @@ var lizLayerActionButtons = function() {
&& featureTypes.length != 0 ) {
var exportFormats = lizMap.getVectorLayerResultFormat();
var options = '';
for ( var i=0, len=exportFormats.length; i<len; i++ ) {
var format = exportFormats[i];
for ( const format of exportFormats ) {
options += '<option value="'+format+'">'+format+'</option>';
}
// 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+= ' <dt>'+lizDict['layer.metadata.export.title']+'</dt>';
html+= '<dd>';
html+= '<select class="exportLayer '+isBaselayer+'">';
Expand All @@ -196,7 +182,6 @@ var lizLayerActionButtons = function() {
html+= ' <dd>'+metadatas.abstract+'</dd>';
}


// Actions
if (metadatas.actions) {
html+= ' <dt>'+lizDict['action.title']+'</dt>';
Expand Down

0 comments on commit fffe034

Please sign in to comment.