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
+28
View File
@@ -0,0 +1,28 @@
/**
* @requires OpenLayers/Protocol.js
*/
/**
* Function: OpenLayers.Protocol.WFS
* Used to create a versioned WFS protocol. Default version is 1.0.0.
*
* Returns:
* {<OpenLayers.Protocol>} A WFS protocol of the given version.
*/
OpenLayers.Protocol.WFS = function(options) {
options = OpenLayers.Util.applyDefaults(
options, OpenLayers.Protocol.WFS.DEFAULTS
);
var cls = OpenLayers.Protocol.WFS["v"+options.version.replace(/\./g, "_")];
if(!cls) {
throw "Unsupported WFS version: " + options.version;
}
return new cls(options);
}
/**
* Constant: OpenLayers.Protocol.WFS.DEFAULTS
*/
OpenLayers.Protocol.WFS.DEFAULTS = {
"version": "1.0.0"
};