diff --git a/externs/olx.js b/externs/olx.js index 056f68e92a..eb9455d462 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -1647,6 +1647,12 @@ olx.format.WFSWriteGetFeatureOptions.prototype.maxFeatures; */ olx.format.WFSWriteGetFeatureOptions.prototype.geometryName; +/** + * GML format to use within the WFS format. + * @type {ol.format.GML|undefined} + * @api + */ +olx.format.WFSWriteGetFeatureOptions.prototype.gmlFormat; /** * Extent to use for the BBOX filter. diff --git a/src/ol/format/gml/v2.js b/src/ol/format/gml/v2.js index 742d74ef30..2911f4f78d 100644 --- a/src/ol/format/gml/v2.js +++ b/src/ol/format/gml/v2.js @@ -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 ' + diff --git a/src/ol/format/wfsformat.js b/src/ol/format/wfsformat.js index 5ab27be9cb..bb4e2bab7f 100644 --- a/src/ol/format/wfsformat.js +++ b/src/ol/format/wfsformat.js @@ -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 = []; }