Skip to content

Commit

Permalink
[api] Fix getFeaturesFromIds when GMF and WMS layers do not have the …
Browse files Browse the repository at this point in the history
…same name
  • Loading branch information
arnaud-morvan committed Feb 21, 2020
1 parent ebff3be commit d001189
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/src/Querent.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ export function getFeaturesFromIds(layer, ids) {
return;
}

const featureIds = ids.map(id => `${layer}.${id}`);
let featureIds = [];
for(let wmsLayer of overlayDef.layer.childLayers) {
featureIds = featureIds.concat(ids.map(id => `${wmsLayer.name}.${id}`));
}

const params = {
'FEATUREID': featureIds.join(','),
'MAXFEATURES': ids.length,
'MAXFEATURES': featureIds.length,
'REQUEST': 'GetFeature',
'SERVICE': 'WFS',
'TYPENAME': layer,
'TYPENAME': overlayDef.layer.layers,
'VERSION': '1.0.0'
};
const url = olUriAppendParams(overlayDef.ogcServer.urlWfs, params);
Expand Down

0 comments on commit d001189

Please sign in to comment.