git-svn-id: http://svn.openlayers.org/trunk/openlayers@8869 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
29 lines
700 B
JavaScript
29 lines
700 B
JavaScript
/**
|
|
* @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"
|
|
};
|