Make sure ol.format.GML2 is usable for WFS 1.0 requests as well
This commit is contained in:
@@ -27,6 +27,10 @@ ol.format.GML2 = function(opt_options) {
|
||||
|
||||
goog.base(this, options);
|
||||
|
||||
this.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
|
||||
'featureMember'] =
|
||||
ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readFeaturesInternal);
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
@@ -101,9 +101,15 @@ ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
|
||||
var localName = ol.xml.getLocalName(node);
|
||||
var features;
|
||||
if (localName == 'FeatureCollection') {
|
||||
features = ol.xml.pushParseAndPop(null,
|
||||
this.FEATURE_COLLECTION_PARSERS, node,
|
||||
objectStack, this);
|
||||
if (node.namespaceURI === 'http://www.opengis.net/wfs') {
|
||||
features = ol.xml.pushParseAndPop([],
|
||||
this.FEATURE_COLLECTION_PARSERS, node,
|
||||
objectStack, this);
|
||||
} else {
|
||||
features = ol.xml.pushParseAndPop(null,
|
||||
this.FEATURE_COLLECTION_PARSERS, node,
|
||||
objectStack, this);
|
||||
}
|
||||
} else if (localName == 'featureMembers' || localName == 'featureMember') {
|
||||
var context = objectStack[0];
|
||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||
|
||||
Reference in New Issue
Block a user