Skip to content

Commit

Permalink
Merge pull request 3liz#4153 from rldhont/fix-attributetable-layer-in…
Browse files Browse the repository at this point in the history
…-restricted-group

[Bugfix] JS - layer in a restricted group is not available
  • Loading branch information
rldhont authored Feb 2, 2024
2 parents f567d7c + 27868d8 commit 991b1e2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion assets/src/legacy/attributeTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ var lizAttributeTable = function() {
var typeName = featureType.getElementsByTagName('Name')[0].textContent;
// layername
var layername = lizMap.getNameByTypeName( typeName );
if ( !layername || layername == undefined )
if ( !layername || layername == undefined ) {
continue;
}
// Check layername
// if layer is in a restricted group, the layer wil not be available
if (!lizMap.mainLizmap.state.layersAndGroupsCollection.layerNames.includes(layername)) {
continue;
}
// lizmap internal js cleaned name
var cleanName = lizMap.cleanName(layername);
// lizmap config file layer name
Expand Down

0 comments on commit 991b1e2

Please sign in to comment.