source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Protocol/SOS.js
@
76
Revision 76, 953 bytes checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 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/Protocol.js | |
8 | */ | |
9 | ||
10 | /** | |
11 | * Function: OpenLayers.Protocol.SOS | |
12 | * Used to create a versioned SOS protocol. Default version is 1.0.0. | |
13 | * | |
14 | * Returns: | |
15 | * {<OpenLayers.Protocol>} An SOS protocol for the given version. | |
16 | */ | |
17 | OpenLayers.Protocol.SOS = function(options) { | |
18 | options = OpenLayers.Util.applyDefaults( | |
19 | options, OpenLayers.Protocol.SOS.DEFAULTS | |
20 | ); | |
21 | var cls = OpenLayers.Protocol.SOS["v"+options.version.replace(/\./g, "_")]; | |
22 | if(!cls) { | |
23 | throw "Unsupported SOS version: " + options.version; | |
24 | } | |
25 | return new cls(options); | |
26 | }; | |
27 | ||
28 | /** | |
29 | * Constant: OpenLayers.Protocol.SOS.DEFAULTS | |
30 | */ | |
31 | OpenLayers.Protocol.SOS.DEFAULTS = { | |
32 | "version": "1.0.0" | |
33 | }; |
Note: See TracBrowser
for help on using the repository browser.