source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Format/WFST.js
@
76
Revision 76, 993 bytes checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the |
4 | * full text of the license. */ |
5 | |
6 | /** |
7 | * @requires OpenLayers/Format.js |
8 | */ |
9 | |
10 | /** |
11 | * Function: OpenLayers.Format.WFST |
12 | * Used to create a versioned WFS protocol. Default version is 1.0.0. |
13 | * |
14 | * Returns: |
15 | * {<OpenLayers.Format>} A WFST format of the given version. |
16 | */ |
17 | OpenLayers.Format.WFST = function(options) { |
18 | options = OpenLayers.Util.applyDefaults( |
19 | options, OpenLayers.Format.WFST.DEFAULTS |
20 | ); |
21 | var cls = OpenLayers.Format.WFST["v"+options.version.replace(/\./g, "_")]; |
22 | if(!cls) { |
23 | throw "Unsupported WFST version: " + options.version; |
24 | } |
25 | return new cls(options); |
26 | }; |
27 | |
28 | /** |
29 | * Constant: OpenLayers.Format.WFST.DEFAULTS |
30 | * {Object} Default properties for the WFST format. |
31 | */ |
32 | OpenLayers.Format.WFST.DEFAULTS = { |
33 | "version": "1.0.0" |
34 | }; |
Note: See TracBrowser
for help on using the repository browser.