need the ability to set axisOrientation
We need to be able to set axisOrientation on the underlying GML parser of the Filter subparser of ol.parser.WFS*, also only options and no properties on the instance anymore
This commit is contained in:
@@ -580,6 +580,14 @@ ol.parser.ogc.Filter_v1.prototype.aggregateLogical_ = function(filters,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.parser.ogc.GML_v2|ol.parser.ogc.GML_v3}
|
||||
*/
|
||||
ol.parser.ogc.Filter_v1.prototype.getGmlParser = function() {
|
||||
return this.gml_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.parser.ogc.GML_v2|ol.parser.ogc.GML_v3} gml The GML parser to
|
||||
* use.
|
||||
|
||||
@@ -19,8 +19,7 @@ ol.ENABLE_WFS_1_1_0 = true;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.WFSOptions=} opt_options
|
||||
* Optional configuration object.
|
||||
* @param {Object=} opt_options Options which will be set on this object.
|
||||
* @extends {ol.parser.ogc.Versioned}
|
||||
*/
|
||||
ol.parser.ogc.WFS = function(opt_options) {
|
||||
|
||||
@@ -6,16 +6,9 @@ goog.require('ol.parser.XML');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.WFSOptions=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.parser.XML}
|
||||
*/
|
||||
ol.parser.ogc.WFS_v1 = function(opt_options) {
|
||||
if (goog.isDef(opt_options)) {
|
||||
this.featureTypes = opt_options.featureTypes;
|
||||
this.featurePrefix = opt_options.featurePrefix;
|
||||
this.featureNS = opt_options.featureNS;
|
||||
}
|
||||
ol.parser.ogc.WFS_v1 = function() {
|
||||
this.defaultNamespaceURI = 'http://www.opengis.net/wfs';
|
||||
// TODO set errorProperty
|
||||
this.readers = {};
|
||||
@@ -42,8 +35,8 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
||||
node.setAttribute('maxFeatures', options.maxFeatures);
|
||||
}
|
||||
}
|
||||
for (var i = 0, ii = this.featureTypes.length; i < ii; i++) {
|
||||
options.featureType = this.featureTypes[i];
|
||||
for (var i = 0, ii = options.featureTypes.length; i < ii; i++) {
|
||||
options.featureType = options.featureTypes[i];
|
||||
this.writeNode('Query', options, null, node);
|
||||
}
|
||||
this.setAttributeNS(
|
||||
@@ -57,6 +50,14 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
||||
goog.inherits(ol.parser.ogc.WFS_v1, ol.parser.XML);
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.parser.ogc.Filter_v1_0_0|ol.parser.ogc.Filter_v1_1_0}
|
||||
*/
|
||||
ol.parser.ogc.WFS_v1.prototype.getFilterParser = function() {
|
||||
return this.filter_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.parser.ogc.Filter_v1_0_0|ol.parser.ogc.Filter_v1_1_0} filter The
|
||||
* Filter parser to use.
|
||||
|
||||
@@ -9,12 +9,10 @@ goog.require('ol.parser.ogc.WFS_v1');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.WFSOptions=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.parser.ogc.WFS_v1}
|
||||
*/
|
||||
ol.parser.ogc.WFS_v1_0_0 = function(opt_options) {
|
||||
goog.base(this, opt_options);
|
||||
ol.parser.ogc.WFS_v1_0_0 = function() {
|
||||
goog.base(this);
|
||||
this.version = '1.0.0';
|
||||
this.schemaLocation = this.defaultNamespaceURI + ' ' +
|
||||
'http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd';
|
||||
@@ -43,23 +41,15 @@ ol.parser.ogc.WFS_v1_0_0 = function(opt_options) {
|
||||
});
|
||||
goog.object.extend(this.writers[this.defaultNamespaceURI], {
|
||||
'Query': function(options) {
|
||||
// TODO see if we really need properties on the instance
|
||||
/*goog.object.extend(options, {
|
||||
featureNS: this.featureNS,
|
||||
featurePrefix: this.featurePrefix,
|
||||
featureType: this.featureType,
|
||||
srsName: this.srsName,
|
||||
srsNameInQuery: this.srsNameInQuery
|
||||
});*/
|
||||
var prefix = goog.isDef(this.featurePrefix) ? this.featurePrefix +
|
||||
var prefix = goog.isDef(options.featurePrefix) ? options.featurePrefix +
|
||||
':' : '';
|
||||
var node = this.createElementNS('wfs:Query');
|
||||
node.setAttribute('typeName', prefix + options.featureType);
|
||||
if (goog.isDef(options.srsNameInQuery) && goog.isDef(options.srsName)) {
|
||||
node.setAttribute('srsName', options.srsName);
|
||||
}
|
||||
if (goog.isDef(this.featureNS)) {
|
||||
node.setAttribute('xmlns:' + this.featurePrefix, this.featureNS);
|
||||
if (goog.isDef(options.featureNS)) {
|
||||
node.setAttribute('xmlns:' + options.featurePrefix, options.featureNS);
|
||||
}
|
||||
if (goog.isDef(options.propertyNames)) {
|
||||
for (var i = 0, ii = options.propertyNames.length; i < ii; i++) {
|
||||
|
||||
@@ -9,12 +9,10 @@ goog.require('ol.parser.ogc.WFS_v1');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.WFSOptions=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.parser.ogc.WFS_v1}
|
||||
*/
|
||||
ol.parser.ogc.WFS_v1_1_0 = function(opt_options) {
|
||||
goog.base(this, opt_options);
|
||||
ol.parser.ogc.WFS_v1_1_0 = function() {
|
||||
goog.base(this);
|
||||
this.version = '1.1.0';
|
||||
this.schemaLocation = this.defaultNamespaceURI + ' ' +
|
||||
'http://schemas.opengis.net/wfs/1.1.0/wfs.xsd';
|
||||
@@ -62,19 +60,13 @@ ol.parser.ogc.WFS_v1_1_0 = function(opt_options) {
|
||||
return node;
|
||||
},
|
||||
'Query': function(options) {
|
||||
goog.object.extend(options, {
|
||||
featureNS: this.featureNS,
|
||||
featurePrefix: this.featurePrefix,
|
||||
featureType: this.featureType,
|
||||
srsName: this.srsName
|
||||
});
|
||||
var prefix = goog.isDef(options.featurePrefix) ? options.prefix + ':' :
|
||||
'';
|
||||
var prefix = goog.isDef(options.featurePrefix) ? options.featurePrefix +
|
||||
':' : '';
|
||||
var node = this.createElementNS('wfs:Query');
|
||||
node.setAttribute('typeName', prefix + options.featureType);
|
||||
node.setAttribute('srsName', options.srsName);
|
||||
if (goog.isDef(options.featureNS)) {
|
||||
node.setAttribute('xmlns:' + options.prefix, options.featureNS);
|
||||
node.setAttribute('xmlns:' + options.featurePrefix, options.featureNS);
|
||||
}
|
||||
if (goog.isDef(options.propertyNames)) {
|
||||
for (var i = 0, ii = options.propertyNames.length; i < ii; i++) {
|
||||
|
||||
Reference in New Issue
Block a user