Verified fix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user