Skip to content

Commit

Permalink
Merge pull request #4084 from 3liz/backport-4083-to-release_3_7
Browse files Browse the repository at this point in the history
[Backport release_3_7] [Bugfix] SelectionTool: Use typeName instead of featureType
  • Loading branch information
rldhont authored Jan 19, 2024
2 parents c0ef7b1 + eb5fc86 commit 588e4e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions assets/src/modules/SelectionTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ export default class SelectionTool {

for (const featureType of this.allFeatureTypeSelected) {
const lConfig = mainLizmap.config.layers[featureType];
let typeName = featureType;
if ('typename' in lConfig) {
typeName = lConfig.typename;
} else if ('shortname' in lConfig) {
typeName = lConfig.shortname;
}

// Yo avoid applying reverseAxis (not supported by QGIS GML Parser)
// Choose a srsName without reverseAxis
Expand All @@ -167,7 +173,7 @@ export default class SelectionTool {

let rFilter = lConfig?.request_params?.filter;
if( rFilter ){
rFilter = rFilter.replace( featureType + ':', '');
rFilter = rFilter.replace( typeName + ':', '');
spatialFilter = rFilter + ' AND ' + spatialFilter;
}

Expand All @@ -181,7 +187,7 @@ export default class SelectionTool {

const wfs = new WFS();
const wfsParams = {
TYPENAME: featureType,
TYPENAME: typeName,
EXP_FILTER: spatialFilter
};

Expand Down

0 comments on commit 588e4e8

Please sign in to comment.