Verified fix

This commit is contained in:
Björn Harrtell
2020-08-11 16:09:43 +02:00
parent 0484e45c89
commit 1335937ddd
2 changed files with 8 additions and 3 deletions

View File

@@ -150,7 +150,11 @@ class GMLBase extends XMLFeature {
objectStack,
this
);
} else if (localName == 'featureMembers' || localName == 'featureMember') {
} else if (
localName == 'featureMembers' ||
localName == 'featureMember' ||
localName == 'member'
) {
const context = objectStack[0];
let featureType = context['featureType'];
let featureNS = context['featureNS'];
@@ -214,7 +218,7 @@ class GMLBase extends XMLFeature {
}
parsersNS[featureNS[p]] = parsers;
}
if (localName == 'featureMember') {
if (localName == 'featureMember' || localName == 'member') {
features = pushParseAndPop(undefined, parsersNS, node, objectStack);
} else {
features = pushParseAndPop([], parsersNS, node, objectStack);

View File

@@ -1528,12 +1528,13 @@ describe('ol.format.WFS', function () {
expect(serialized).to.xmleql(parse(getFeatureComplexXml));
});
it('can parse a basic GetFeature response', function () {
it('can parse basic GetFeature response', function () {
const wfs = new WFS({
version: '2.0.0',
});
const features = wfs.readFeatures(parse(getFeatureSimpleXmlResponse));
expect(features.length).to.be(1);
expect(features[0]).to.be.an(Feature);
});
});
});