ability to write out PropertyNames in a GetFeature request

This commit is contained in:
Bart van den Eijnden
2013-10-22 17:26:55 +02:00
parent 557390f2ad
commit 0581a49378
5 changed files with 31 additions and 5 deletions

View File

@@ -42,11 +42,13 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
node.setAttribute('maxFeatures', options.maxFeatures);
}
}
// TODO set xsi:schemaLocation
for (var i = 0, ii = this.featureTypes.length; i < ii; i++) {
options.featureType = this.featureTypes[i];
this.writeNode('Query', options, null, node);
}
this.setAttributeNS(
node, 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation', this.schemaLocation);
return node;
}
};

View File

@@ -63,9 +63,8 @@ ol.parser.ogc.WFS_v1_0_0 = function(opt_options) {
}
if (goog.isDef(options.propertyNames)) {
for (var i = 0, ii = options.propertyNames.length; i < ii; i++) {
this.writeNode('ogc:PropertyName', {
property: options.propertyNames[i]
}, 'http://www.opengis.net/ogc', node);
this.writeNode('PropertyName', options.propertyNames[i],
'http://www.opengis.net/ogc', node);
}
}
if (goog.isDef(options.filter)) {

View File

@@ -77,7 +77,7 @@ ol.parser.ogc.WFS_v1_1_0 = function() {
}
}
if (goog.isDef(options.filter)) {
this.writeNode('ogc:Filter', options.filter,
this.writeNode('Filter', options.filter,
'http://www.opengis.net/ogc', node);
}
return node;