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/BaseTypes.js |
---|
8 | * @requires OpenLayers/Lang/en.js |
---|
9 | * @requires OpenLayers/Console.js |
---|
10 | */ |
---|
11 | |
---|
12 | (function() { |
---|
13 | /** |
---|
14 | * Before creating the OpenLayers namespace, check to see if |
---|
15 | * OpenLayers.singleFile is true. This occurs if the |
---|
16 | * OpenLayers/SingleFile.js script is included before this one - as is the |
---|
17 | * case with single file builds. |
---|
18 | */ |
---|
19 | var singleFile = (typeof OpenLayers == "object" && OpenLayers.singleFile); |
---|
20 | |
---|
21 | /** |
---|
22 | * Cache for the script location returned from |
---|
23 | * OpenLayers._getScriptLocation |
---|
24 | */ |
---|
25 | var scriptLocation; |
---|
26 | |
---|
27 | /** |
---|
28 | * Namespace: OpenLayers |
---|
29 | * The OpenLayers object provides a namespace for all things OpenLayers |
---|
30 | */ |
---|
31 | window.OpenLayers = { |
---|
32 | |
---|
33 | /** |
---|
34 | * Property: _scriptName |
---|
35 | * {String} Relative path of this script. |
---|
36 | */ |
---|
37 | _scriptName: (!singleFile) ? "lib/OpenLayers.js" : "OpenLayers.js", |
---|
38 | |
---|
39 | /** |
---|
40 | * Function: _getScriptLocation |
---|
41 | * Return the path to this script. |
---|
42 | * |
---|
43 | * Returns: |
---|
44 | * {String} Path to this script |
---|
45 | */ |
---|
46 | _getScriptLocation: function () { |
---|
47 | if (scriptLocation != undefined) { |
---|
48 | return scriptLocation; |
---|
49 | } |
---|
50 | scriptLocation = ""; |
---|
51 | var isOL = new RegExp("(^|(.*?\\/))(" + OpenLayers._scriptName + ")(\\?|$)"); |
---|
52 | |
---|
53 | var scripts = document.getElementsByTagName('script'); |
---|
54 | for (var i=0, len=scripts.length; i<len; i++) { |
---|
55 | var src = scripts[i].getAttribute('src'); |
---|
56 | if (src) { |
---|
57 | var match = src.match(isOL); |
---|
58 | if(match) { |
---|
59 | scriptLocation = match[1]; |
---|
60 | break; |
---|
61 | } |
---|
62 | } |
---|
63 | } |
---|
64 | return scriptLocation; |
---|
65 | } |
---|
66 | }; |
---|
67 | /** |
---|
68 | * OpenLayers.singleFile is a flag indicating this file is being included |
---|
69 | * in a Single File Library build of the OpenLayers Library. |
---|
70 | * |
---|
71 | * When we are *not* part of a SFL build we dynamically include the |
---|
72 | * OpenLayers library code. |
---|
73 | * |
---|
74 | * When we *are* part of a SFL build we do not dynamically include the |
---|
75 | * OpenLayers library code as it will be appended at the end of this file. |
---|
76 | */ |
---|
77 | if(!singleFile) { |
---|
78 | var jsfiles = new Array( |
---|
79 | "OpenLayers/Util.js", |
---|
80 | "OpenLayers/BaseTypes.js", |
---|
81 | "OpenLayers/BaseTypes/Class.js", |
---|
82 | "OpenLayers/BaseTypes/Bounds.js", |
---|
83 | "OpenLayers/BaseTypes/Element.js", |
---|
84 | "OpenLayers/BaseTypes/LonLat.js", |
---|
85 | "OpenLayers/BaseTypes/Pixel.js", |
---|
86 | "OpenLayers/BaseTypes/Size.js", |
---|
87 | "OpenLayers/Console.js", |
---|
88 | "OpenLayers/Tween.js", |
---|
89 | "Rico/Corner.js", |
---|
90 | "Rico/Color.js", |
---|
91 | "OpenLayers/Ajax.js", |
---|
92 | "OpenLayers/Events.js", |
---|
93 | "OpenLayers/Request.js", |
---|
94 | "OpenLayers/Request/XMLHttpRequest.js", |
---|
95 | "OpenLayers/Projection.js", |
---|
96 | "OpenLayers/Map.js", |
---|
97 | "OpenLayers/Layer.js", |
---|
98 | "OpenLayers/Icon.js", |
---|
99 | "OpenLayers/Marker.js", |
---|
100 | "OpenLayers/Marker/Box.js", |
---|
101 | "OpenLayers/Popup.js", |
---|
102 | "OpenLayers/Tile.js", |
---|
103 | "OpenLayers/Tile/Image.js", |
---|
104 | "OpenLayers/Tile/Image/IFrame.js", |
---|
105 | "OpenLayers/Tile/WFS.js", |
---|
106 | "OpenLayers/Layer/Image.js", |
---|
107 | "OpenLayers/Layer/SphericalMercator.js", |
---|
108 | "OpenLayers/Layer/EventPane.js", |
---|
109 | "OpenLayers/Layer/FixedZoomLevels.js", |
---|
110 | "OpenLayers/Layer/Google.js", |
---|
111 | "OpenLayers/Layer/Google/v3.js", |
---|
112 | "OpenLayers/Layer/VirtualEarth.js", |
---|
113 | "OpenLayers/Layer/Yahoo.js", |
---|
114 | "OpenLayers/Layer/HTTPRequest.js", |
---|
115 | "OpenLayers/Layer/Grid.js", |
---|
116 | "OpenLayers/Layer/MapGuide.js", |
---|
117 | "OpenLayers/Layer/MapServer.js", |
---|
118 | "OpenLayers/Layer/MapServer/Untiled.js", |
---|
119 | "OpenLayers/Layer/KaMap.js", |
---|
120 | "OpenLayers/Layer/KaMapCache.js", |
---|
121 | "OpenLayers/Layer/MultiMap.js", |
---|
122 | "OpenLayers/Layer/Markers.js", |
---|
123 | "OpenLayers/Layer/Text.js", |
---|
124 | "OpenLayers/Layer/WorldWind.js", |
---|
125 | "OpenLayers/Layer/ArcGIS93Rest.js", |
---|
126 | "OpenLayers/Layer/WMS.js", |
---|
127 | "OpenLayers/Layer/WMS/Untiled.js", |
---|
128 | "OpenLayers/Layer/WMS/Post.js", |
---|
129 | "OpenLayers/Layer/WMTS.js", |
---|
130 | "OpenLayers/Layer/ArcIMS.js", |
---|
131 | "OpenLayers/Layer/GeoRSS.js", |
---|
132 | "OpenLayers/Layer/Boxes.js", |
---|
133 | "OpenLayers/Layer/XYZ.js", |
---|
134 | "OpenLayers/Layer/TMS.js", |
---|
135 | "OpenLayers/Layer/TileCache.js", |
---|
136 | "OpenLayers/Layer/Zoomify.js", |
---|
137 | "OpenLayers/Popup/Anchored.js", |
---|
138 | "OpenLayers/Popup/AnchoredBubble.js", |
---|
139 | "OpenLayers/Popup/Framed.js", |
---|
140 | "OpenLayers/Popup/FramedCloud.js", |
---|
141 | "OpenLayers/Feature.js", |
---|
142 | "OpenLayers/Feature/Vector.js", |
---|
143 | "OpenLayers/Feature/WFS.js", |
---|
144 | "OpenLayers/Handler.js", |
---|
145 | "OpenLayers/Handler/Click.js", |
---|
146 | "OpenLayers/Handler/Hover.js", |
---|
147 | "OpenLayers/Handler/Point.js", |
---|
148 | "OpenLayers/Handler/Path.js", |
---|
149 | "OpenLayers/Handler/Polygon.js", |
---|
150 | "OpenLayers/Handler/Feature.js", |
---|
151 | "OpenLayers/Handler/Drag.js", |
---|
152 | "OpenLayers/Handler/RegularPolygon.js", |
---|
153 | "OpenLayers/Handler/Box.js", |
---|
154 | "OpenLayers/Handler/MouseWheel.js", |
---|
155 | "OpenLayers/Handler/Keyboard.js", |
---|
156 | "OpenLayers/Control.js", |
---|
157 | "OpenLayers/Control/Attribution.js", |
---|
158 | "OpenLayers/Control/Button.js", |
---|
159 | "OpenLayers/Control/ZoomBox.js", |
---|
160 | "OpenLayers/Control/ZoomToMaxExtent.js", |
---|
161 | "OpenLayers/Control/DragPan.js", |
---|
162 | "OpenLayers/Control/Navigation.js", |
---|
163 | "OpenLayers/Control/MouseDefaults.js", |
---|
164 | "OpenLayers/Control/MousePosition.js", |
---|
165 | "OpenLayers/Control/OverviewMap.js", |
---|
166 | "OpenLayers/Control/KeyboardDefaults.js", |
---|
167 | "OpenLayers/Control/PanZoom.js", |
---|
168 | "OpenLayers/Control/PanZoomBar.js", |
---|
169 | "OpenLayers/Control/ArgParser.js", |
---|
170 | "OpenLayers/Control/Permalink.js", |
---|
171 | "OpenLayers/Control/Scale.js", |
---|
172 | "OpenLayers/Control/ScaleLine.js", |
---|
173 | "OpenLayers/Control/Snapping.js", |
---|
174 | "OpenLayers/Control/Split.js", |
---|
175 | "OpenLayers/Control/LayerSwitcher.js", |
---|
176 | "OpenLayers/Control/DrawFeature.js", |
---|
177 | "OpenLayers/Control/DragFeature.js", |
---|
178 | "OpenLayers/Control/ModifyFeature.js", |
---|
179 | "OpenLayers/Control/Panel.js", |
---|
180 | "OpenLayers/Control/SelectFeature.js", |
---|
181 | "OpenLayers/Control/NavigationHistory.js", |
---|
182 | "OpenLayers/Control/Measure.js", |
---|
183 | "OpenLayers/Control/WMSGetFeatureInfo.js", |
---|
184 | "OpenLayers/Control/WMTSGetFeatureInfo.js", |
---|
185 | "OpenLayers/Control/Graticule.js", |
---|
186 | "OpenLayers/Control/TransformFeature.js", |
---|
187 | "OpenLayers/Control/SLDSelect.js", |
---|
188 | "OpenLayers/Geometry.js", |
---|
189 | "OpenLayers/Geometry/Rectangle.js", |
---|
190 | "OpenLayers/Geometry/Collection.js", |
---|
191 | "OpenLayers/Geometry/Point.js", |
---|
192 | "OpenLayers/Geometry/MultiPoint.js", |
---|
193 | "OpenLayers/Geometry/Curve.js", |
---|
194 | "OpenLayers/Geometry/LineString.js", |
---|
195 | "OpenLayers/Geometry/LinearRing.js", |
---|
196 | "OpenLayers/Geometry/Polygon.js", |
---|
197 | "OpenLayers/Geometry/MultiLineString.js", |
---|
198 | "OpenLayers/Geometry/MultiPolygon.js", |
---|
199 | "OpenLayers/Geometry/Surface.js", |
---|
200 | "OpenLayers/Renderer.js", |
---|
201 | "OpenLayers/Renderer/Elements.js", |
---|
202 | "OpenLayers/Renderer/SVG.js", |
---|
203 | "OpenLayers/Renderer/Canvas.js", |
---|
204 | "OpenLayers/Renderer/VML.js", |
---|
205 | "OpenLayers/Layer/Vector.js", |
---|
206 | "OpenLayers/Layer/Vector/RootContainer.js", |
---|
207 | "OpenLayers/Strategy.js", |
---|
208 | "OpenLayers/Strategy/Filter.js", |
---|
209 | "OpenLayers/Strategy/Fixed.js", |
---|
210 | "OpenLayers/Strategy/Cluster.js", |
---|
211 | "OpenLayers/Strategy/Paging.js", |
---|
212 | "OpenLayers/Strategy/BBOX.js", |
---|
213 | "OpenLayers/Strategy/Save.js", |
---|
214 | "OpenLayers/Strategy/Refresh.js", |
---|
215 | "OpenLayers/Filter.js", |
---|
216 | "OpenLayers/Filter/FeatureId.js", |
---|
217 | "OpenLayers/Filter/Logical.js", |
---|
218 | "OpenLayers/Filter/Comparison.js", |
---|
219 | "OpenLayers/Filter/Spatial.js", |
---|
220 | "OpenLayers/Protocol.js", |
---|
221 | "OpenLayers/Protocol/HTTP.js", |
---|
222 | "OpenLayers/Protocol/SQL.js", |
---|
223 | "OpenLayers/Protocol/SQL/Gears.js", |
---|
224 | "OpenLayers/Protocol/WFS.js", |
---|
225 | "OpenLayers/Protocol/WFS/v1.js", |
---|
226 | "OpenLayers/Protocol/WFS/v1_0_0.js", |
---|
227 | "OpenLayers/Protocol/WFS/v1_1_0.js", |
---|
228 | "OpenLayers/Protocol/SOS.js", |
---|
229 | "OpenLayers/Protocol/SOS/v1_0_0.js", |
---|
230 | "OpenLayers/Layer/PointTrack.js", |
---|
231 | "OpenLayers/Layer/GML.js", |
---|
232 | "OpenLayers/Style.js", |
---|
233 | "OpenLayers/Style2.js", |
---|
234 | "OpenLayers/StyleMap.js", |
---|
235 | "OpenLayers/Rule.js", |
---|
236 | "OpenLayers/Format.js", |
---|
237 | "OpenLayers/Format/XML.js", |
---|
238 | "OpenLayers/Format/Context.js", |
---|
239 | "OpenLayers/Format/ArcXML.js", |
---|
240 | "OpenLayers/Format/ArcXML/Features.js", |
---|
241 | "OpenLayers/Format/GML.js", |
---|
242 | "OpenLayers/Format/GML/Base.js", |
---|
243 | "OpenLayers/Format/GML/v2.js", |
---|
244 | "OpenLayers/Format/GML/v3.js", |
---|
245 | "OpenLayers/Format/Atom.js", |
---|
246 | "OpenLayers/Format/KML.js", |
---|
247 | "OpenLayers/Format/GeoRSS.js", |
---|
248 | "OpenLayers/Format/WFS.js", |
---|
249 | "OpenLayers/Format/WFSCapabilities.js", |
---|
250 | "OpenLayers/Format/WFSCapabilities/v1.js", |
---|
251 | "OpenLayers/Format/WFSCapabilities/v1_0_0.js", |
---|
252 | "OpenLayers/Format/WFSCapabilities/v1_1_0.js", |
---|
253 | "OpenLayers/Format/WFSDescribeFeatureType.js", |
---|
254 | "OpenLayers/Format/WMSDescribeLayer.js", |
---|
255 | "OpenLayers/Format/WMSDescribeLayer/v1_1.js", |
---|
256 | "OpenLayers/Format/WKT.js", |
---|
257 | "OpenLayers/Format/OSM.js", |
---|
258 | "OpenLayers/Format/GPX.js", |
---|
259 | "OpenLayers/Format/Filter.js", |
---|
260 | "OpenLayers/Format/Filter/v1.js", |
---|
261 | "OpenLayers/Format/Filter/v1_0_0.js", |
---|
262 | "OpenLayers/Format/Filter/v1_1_0.js", |
---|
263 | "OpenLayers/Format/SLD.js", |
---|
264 | "OpenLayers/Format/SLD/v1.js", |
---|
265 | "OpenLayers/Format/SLD/v1_0_0.js", |
---|
266 | "OpenLayers/Format/OWSCommon/v1.js", |
---|
267 | "OpenLayers/Format/OWSCommon/v1_0_0.js", |
---|
268 | "OpenLayers/Format/OWSCommon/v1_1_0.js", |
---|
269 | "OpenLayers/Format/CSWGetDomain.js", |
---|
270 | "OpenLayers/Format/CSWGetDomain/v2_0_2.js", |
---|
271 | "OpenLayers/Format/CSWGetRecords.js", |
---|
272 | "OpenLayers/Format/CSWGetRecords/v2_0_2.js", |
---|
273 | "OpenLayers/Format/WFST.js", |
---|
274 | "OpenLayers/Format/WFST/v1.js", |
---|
275 | "OpenLayers/Format/WFST/v1_0_0.js", |
---|
276 | "OpenLayers/Format/WFST/v1_1_0.js", |
---|
277 | "OpenLayers/Format/Text.js", |
---|
278 | "OpenLayers/Format/JSON.js", |
---|
279 | "OpenLayers/Format/GeoJSON.js", |
---|
280 | "OpenLayers/Format/WMC.js", |
---|
281 | "OpenLayers/Format/WMC/v1.js", |
---|
282 | "OpenLayers/Format/WMC/v1_0_0.js", |
---|
283 | "OpenLayers/Format/WMC/v1_1_0.js", |
---|
284 | "OpenLayers/Format/WMSCapabilities.js", |
---|
285 | "OpenLayers/Format/WMSCapabilities/v1.js", |
---|
286 | "OpenLayers/Format/WMSCapabilities/v1_1.js", |
---|
287 | "OpenLayers/Format/WMSCapabilities/v1_1_0.js", |
---|
288 | "OpenLayers/Format/WMSCapabilities/v1_1_1.js", |
---|
289 | "OpenLayers/Format/WMSCapabilities/v1_3.js", |
---|
290 | "OpenLayers/Format/WMSCapabilities/v1_3_0.js", |
---|
291 | "OpenLayers/Format/WMSGetFeatureInfo.js", |
---|
292 | "OpenLayers/Format/SOSCapabilities.js", |
---|
293 | "OpenLayers/Format/SOSCapabilities/v1_0_0.js", |
---|
294 | "OpenLayers/Format/SOSGetObservation.js", |
---|
295 | "OpenLayers/Format/SOSGetFeatureOfInterest.js", |
---|
296 | "OpenLayers/Format/OWSContext.js", |
---|
297 | "OpenLayers/Format/OWSContext/v0_3_1.js", |
---|
298 | "OpenLayers/Format/WMTSCapabilities.js", |
---|
299 | "OpenLayers/Format/WMTSCapabilities/v1_0_0.js", |
---|
300 | "OpenLayers/Layer/WFS.js", |
---|
301 | "OpenLayers/Control/GetFeature.js", |
---|
302 | "OpenLayers/Control/MouseToolbar.js", |
---|
303 | "OpenLayers/Control/NavToolbar.js", |
---|
304 | "OpenLayers/Control/PanPanel.js", |
---|
305 | "OpenLayers/Control/Pan.js", |
---|
306 | "OpenLayers/Control/ZoomIn.js", |
---|
307 | "OpenLayers/Control/ZoomOut.js", |
---|
308 | "OpenLayers/Control/ZoomPanel.js", |
---|
309 | "OpenLayers/Control/EditingToolbar.js", |
---|
310 | "OpenLayers/Symbolizer.js", |
---|
311 | "OpenLayers/Symbolizer/Point.js", |
---|
312 | "OpenLayers/Symbolizer/Line.js", |
---|
313 | "OpenLayers/Symbolizer/Polygon.js", |
---|
314 | "OpenLayers/Symbolizer/Text.js", |
---|
315 | "OpenLayers/Symbolizer/Raster.js", |
---|
316 | "OpenLayers/Lang.js", |
---|
317 | "OpenLayers/Lang/en.js" |
---|
318 | ); // etc. |
---|
319 | |
---|
320 | var agent = navigator.userAgent; |
---|
321 | var docWrite = (agent.match("MSIE") || agent.match("Safari")); |
---|
322 | if(docWrite) { |
---|
323 | var allScriptTags = new Array(jsfiles.length); |
---|
324 | } |
---|
325 | var host = OpenLayers._getScriptLocation() + "lib/"; |
---|
326 | for (var i=0, len=jsfiles.length; i<len; i++) { |
---|
327 | if (docWrite) { |
---|
328 | allScriptTags[i] = "<script src='" + host + jsfiles[i] + |
---|
329 | "'></script>"; |
---|
330 | } else { |
---|
331 | var s = document.createElement("script"); |
---|
332 | s.src = host + jsfiles[i]; |
---|
333 | var h = document.getElementsByTagName("head").length ? |
---|
334 | document.getElementsByTagName("head")[0] : |
---|
335 | document.body; |
---|
336 | h.appendChild(s); |
---|
337 | } |
---|
338 | } |
---|
339 | if (docWrite) { |
---|
340 | document.write(allScriptTags.join("")); |
---|
341 | } |
---|
342 | } |
---|
343 | })(); |
---|
344 | |
---|
345 | /** |
---|
346 | * Constant: VERSION_NUMBER |
---|
347 | */ |
---|
348 | OpenLayers.VERSION_NUMBER="OpenLayers 2.10 -- $Revision: 10721 $"; |
---|