Merge pull request #1346 from ahocevar/set-srsname
Set the srs name when writing GetFeature
This commit is contained in:
@@ -600,8 +600,9 @@
|
||||
* @property {string} featureNS The namespace URI used for features.
|
||||
* @property {string} featurePrefix The prefix for the feature namespace.
|
||||
* @property {Array.<string>} featureTypes The feature type names.
|
||||
* @property {string|undefined} srsName SRS name. No srsName attribute will be
|
||||
* set on geometries when this is not provided.
|
||||
* @property {string|undefined} srsName SRS name. For WFS 1.1.0, this is
|
||||
* required. In WFS 1.0.0, no srsName attribute will be set on geometries
|
||||
* when this is not provided.
|
||||
* @property {string|undefined} handle Handle.
|
||||
* @property {string|undefined} outputFormat Output format.
|
||||
* @property {number} maxFeatures Maximum number of features to fetch.
|
||||
|
||||
@@ -648,6 +648,7 @@ ol.parser.ogc.Filter_v1.prototype.setFeatureType = function(featureType) {
|
||||
ol.parser.ogc.Filter_v1.prototype.setSrsName = function(srsName) {
|
||||
this.srsName = srsName;
|
||||
if (goog.isDefAndNotNull(this.gmlParser_)) {
|
||||
this.gmlParser_.srsName = this.srsName;
|
||||
this.gmlParser_.applyWriteOptions({},
|
||||
/** @type {ol.parser.GMLWriteOptions} */ ({srsName: srsName}));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -47,6 +47,9 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
||||
if (goog.isDef(options.maxFeatures)) {
|
||||
node.setAttribute('maxFeatures', options.maxFeatures);
|
||||
}
|
||||
if (goog.isDef(options.srsName)) {
|
||||
this.setSrsName(options.srsName);
|
||||
}
|
||||
}
|
||||
for (var i = 0, ii = options.featureTypes.length; i < ii; i++) {
|
||||
options.featureType = options.featureTypes[i];
|
||||
|
||||
Reference in New Issue
Block a user