Add gmlFormat as option for WFS format
This commit is contained in:
@@ -30,7 +30,7 @@ goog.inherits(ol.format.GML.v2, ol.format.GML);
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
ol.format.GML.v2.schemaLocation_ = 'http://www.opengis.net/gml ' +
|
||||
|
||||
@@ -40,6 +40,13 @@ ol.format.WFS = function(opt_options) {
|
||||
*/
|
||||
this.featureNS_ = options.featureNS;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
*/
|
||||
this.gmlFormat_ = goog.isDef(options.gmlFormat) ?
|
||||
options.gmlFormat : new ol.format.GML();
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string}
|
||||
@@ -119,7 +126,8 @@ ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
goog.isDef(opt_options) ? opt_options : {}));
|
||||
var objectStack = [context];
|
||||
var features = ol.xml.pushParseAndPop([],
|
||||
ol.format.GML.FEATURE_COLLECTION_PARSERS, node, objectStack);
|
||||
ol.format.GML.FEATURE_COLLECTION_PARSERS, node,
|
||||
objectStack, this.gmlFormat_);
|
||||
if (!goog.isDef(features)) {
|
||||
features = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user