Put options on objectStack for xml formats

This commit is contained in:
tsauerwein
2014-08-19 09:42:44 +02:00
parent e7864be2be
commit b30ed6b934
12 changed files with 90 additions and 95 deletions

View File

@@ -105,17 +105,18 @@ ol.format.WFS.prototype.readFeatures;
* @inheritDoc
*/
ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
var objectStack = [{
var context = {
'featureType': this.featureType_,
'featureNS': this.featureNS_
}];
};
goog.object.extend(context, this.getReadOptions(node,
goog.isDef(opt_options) ? opt_options : {}));
var objectStack = [context];
var features = ol.xml.pushParseAndPop([],
ol.format.GML.FEATURE_COLLECTION_PARSERS, node, objectStack);
if (!goog.isDef(features)) {
features = [];
}
ol.format.XMLFeature.transformFeaturesWithOptions(
features, false, this.getReadOptions(node, opt_options));
return features;
};