Add writeFilter method to WFS format

This commit is contained in:
Alexandre Dubé
2017-03-21 08:56:32 -04:00
parent 14c78a138a
commit 8a5fb286b6

View File

@@ -782,6 +782,21 @@ ol.format.WFS.GETFEATURE_SERIALIZERS_ = {
};
/**
* Encode filter as WFS `Filter` and return the Node.
*
* @param {ol.format.filter.Filter} filter Filter.
* @return {Node} Result.
* @api
*/
ol.format.WFS.writeFilter = function(filter) {
var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
var objectStack = [];
ol.format.WFS.writeFilterCondition_(child, filter, objectStack);
return child;
};
/**
* @param {Node} node Node.
* @param {Array.<string>} featureTypes Feature types.