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