1 |
3032
|
perry
|
/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
|
2 |
|
|
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the full
|
3 |
|
|
* text of the license. */
|
4 |
|
|
////
|
5 |
|
|
/// This blob sucks in all the files in uncompressed form for ease of use
|
6 |
|
|
///
|
7 |
|
|
|
8 |
|
|
OpenLayers = new Object();
|
9 |
|
|
|
10 |
|
|
OpenLayers._scriptName = (
|
11 |
|
|
typeof(_OPENLAYERS_SFL_) == "undefined" ? "lib/OpenLayers.js"
|
12 |
|
|
: "OpenLayers.js" );
|
13 |
|
|
|
14 |
|
|
OpenLayers._getScriptLocation = function () {
|
15 |
|
|
var scriptLocation = "";
|
16 |
|
|
var SCRIPT_NAME = OpenLayers._scriptName;
|
17 |
|
|
|
18 |
|
|
var scripts = document.getElementsByTagName('script');
|
19 |
|
|
for (var i = 0; i < scripts.length; i++) {
|
20 |
|
|
var src = scripts[i].getAttribute('src');
|
21 |
|
|
if (src) {
|
22 |
|
|
var index = src.lastIndexOf(SCRIPT_NAME);
|
23 |
|
|
// is it found, at the end of the URL?
|
24 |
|
|
if ((index > -1) && (index + SCRIPT_NAME.length == src.length)) {
|
25 |
|
|
scriptLocation = src.slice(0, -SCRIPT_NAME.length);
|
26 |
|
|
break;
|
27 |
|
|
}
|
28 |
|
|
}
|
29 |
|
|
}
|
30 |
|
|
return scriptLocation;
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
/*
|
34 |
|
|
`_OPENLAYERS_SFL_` is a flag indicating this file is being included
|
35 |
|
|
in a Single File Library build of the OpenLayers Library.
|
36 |
|
|
|
37 |
|
|
When we are *not* part of a SFL build we dynamically include the
|
38 |
|
|
OpenLayers library code.
|
39 |
|
|
|
40 |
|
|
When we *are* part of a SFL build we do not dynamically include the
|
41 |
|
|
OpenLayers library code as it will be appended at the end of this file.
|
42 |
|
|
*/
|
43 |
|
|
if (typeof(_OPENLAYERS_SFL_) == "undefined") {
|
44 |
|
|
/*
|
45 |
|
|
The original code appeared to use a try/catch block
|
46 |
|
|
to avoid polluting the global namespace,
|
47 |
|
|
we now use a anonymous function to achieve the same result.
|
48 |
|
|
*/
|
49 |
|
|
(function() {
|
50 |
|
|
var jsfiles=new Array(
|
51 |
|
|
"Prototype.js",
|
52 |
|
|
"Rico/Corner.js",
|
53 |
|
|
"Rico/Color.js",
|
54 |
|
|
"OpenLayers/BaseTypes.js",
|
55 |
|
|
"OpenLayers/Util.js",
|
56 |
|
|
"OpenLayers/Ajax.js",
|
57 |
|
|
"OpenLayers/Events.js",
|
58 |
|
|
"OpenLayers/Map.js",
|
59 |
|
|
"OpenLayers/Layer.js",
|
60 |
|
|
"OpenLayers/Icon.js",
|
61 |
|
|
"OpenLayers/Marker.js",
|
62 |
|
|
"OpenLayers/Marker/Box.js",
|
63 |
|
|
"OpenLayers/Popup.js",
|
64 |
|
|
"OpenLayers/Tile.js",
|
65 |
|
|
"OpenLayers/Feature.js",
|
66 |
|
|
"OpenLayers/Feature/WFS.js",
|
67 |
|
|
"OpenLayers/Tile/Image.js",
|
68 |
|
|
"OpenLayers/Tile/WFS.js",
|
69 |
|
|
"OpenLayers/Layer/EventPane.js",
|
70 |
|
|
"OpenLayers/Layer/Google.js",
|
71 |
|
|
"OpenLayers/Layer/VirtualEarth.js",
|
72 |
|
|
// "OpenLayers/Layer/Yahoo.js",
|
73 |
|
|
"OpenLayers/Layer/HTTPRequest.js",
|
74 |
|
|
"OpenLayers/Layer/Grid.js",
|
75 |
|
|
"OpenLayers/Layer/KaMap.js",
|
76 |
|
|
"OpenLayers/Layer/Markers.js",
|
77 |
|
|
"OpenLayers/Layer/Text.js",
|
78 |
|
|
"OpenLayers/Layer/WorldWind.js",
|
79 |
|
|
"OpenLayers/Layer/WMS.js",
|
80 |
|
|
"OpenLayers/Layer/WFS.js",
|
81 |
|
|
"OpenLayers/Layer/WMS/Untiled.js",
|
82 |
|
|
"OpenLayers/Layer/GeoRSS.js",
|
83 |
|
|
"OpenLayers/Layer/Boxes.js",
|
84 |
|
|
"OpenLayers/Popup/Anchored.js",
|
85 |
|
|
"OpenLayers/Popup/AnchoredBubble.js",
|
86 |
|
|
"OpenLayers/Control.js",
|
87 |
|
|
"OpenLayers/Control/MouseDefaults.js",
|
88 |
|
|
"OpenLayers/Control/MouseToolbar.js",
|
89 |
|
|
"OpenLayers/Control/KeyboardDefaults.js",
|
90 |
|
|
"OpenLayers/Control/PanZoom.js",
|
91 |
|
|
"OpenLayers/Control/PanZoomBar.js",
|
92 |
|
|
"OpenLayers/Control/Permalink.js",
|
93 |
|
|
"OpenLayers/Control/Scale.js",
|
94 |
|
|
"OpenLayers/Control/LayerSwitcher.js",
|
95 |
|
|
"OpenLayers/Control/LayerTabs.js"
|
96 |
|
|
); // etc.
|
97 |
|
|
|
98 |
|
|
var allScriptTags = "";
|
99 |
|
|
var host = OpenLayers._getScriptLocation() + "lib/";
|
100 |
|
|
|
101 |
|
|
// check to see if prototype.js was already loaded
|
102 |
|
|
// if so, skip the first dynamic include
|
103 |
|
|
//
|
104 |
|
|
var start=1;
|
105 |
|
|
try { x = Prototype; }
|
106 |
|
|
catch (e) { start=0; }
|
107 |
|
|
|
108 |
|
|
for (var i = start; i < jsfiles.length; i++) {
|
109 |
|
|
var currentScriptTag = "<script src='" + host + jsfiles[i] + "'></script>";
|
110 |
|
|
allScriptTags += currentScriptTag;
|
111 |
|
|
}
|
112 |
|
|
document.write(allScriptTags);
|
113 |
|
|
})();
|
114 |
|
|
}
|