Adding a WFS protocol. This allows for creating, reading, updating, and deleting features via WFS. Huge thanks to ahocevar for the test writing and review. r=ahocevar (closes #1648)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-02-18 00:07:43 +00:00
parent 8274b648e8
commit 55f40e224a
17 changed files with 1942 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/**
* @requires OpenLayers/Format.js
*/
/**
* Function: OpenLayers.Format.WFST
* Used to create a versioned WFS protocol. Default version is 1.0.0.
*
* Returns:
* {<OpenLayers.Format>} A WFST format of the given version.
*/
OpenLayers.Format.WFST = function(options) {
options = OpenLayers.Util.applyDefaults(
options, OpenLayers.Format.WFST.DEFAULTS
);
var cls = OpenLayers.Format.WFST["v"+options.version.replace(/\./g, "_")];
if(!cls) {
throw "Unsupported WFST version: " + options.version;
}
return new cls(options);
}
/**
* Constant: OpenLayers.Format.WFST.DEFAULTS
* {Object} Default properties for the WFST format.
*/
OpenLayers.Format.WFST.DEFAULTS = {
"version": "1.0.0"
};