summaryrefslogtreecommitdiff
path: root/misc/openlayers/lib/OpenLayers/SingleFile.js
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
committerChris Schlaeger <chris@linux.com>2014-08-12 21:56:44 +0200
commitea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch)
treeaf67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/lib/OpenLayers/SingleFile.js
parent59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff)
downloadpostrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/lib/OpenLayers/SingleFile.js')
-rw-r--r--misc/openlayers/lib/OpenLayers/SingleFile.js78
1 files changed, 78 insertions, 0 deletions
diff --git a/misc/openlayers/lib/OpenLayers/SingleFile.js b/misc/openlayers/lib/OpenLayers/SingleFile.js
new file mode 100644
index 0000000..1f210c9
--- /dev/null
+++ b/misc/openlayers/lib/OpenLayers/SingleFile.js
@@ -0,0 +1,78 @@
+/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
+ * full list of contributors). Published under the 2-clause BSD license.
+ * See license.txt in the OpenLayers distribution or repository for the
+ * full text of the license. */
+
+var OpenLayers = {
+ /**
+ * Constant: VERSION_NUMBER
+ */
+ VERSION_NUMBER: "Release 2.13.1",
+
+ /**
+ * Constant: singleFile
+ * TODO: remove this in 3.0 when we stop supporting build profiles that
+ * include OpenLayers.js
+ */
+ singleFile: true,
+
+ /**
+ * Method: _getScriptLocation
+ * Return the path to this script. This is also implemented in
+ * OpenLayers.js
+ *
+ * Returns:
+ * {String} Path to this script
+ */
+ _getScriptLocation: (function() {
+ var r = new RegExp("(^|(.*?\\/))(OpenLayers[^\\/]*?\\.js)(\\?|$)"),
+ s = document.getElementsByTagName('script'),
+ src, m, l = "";
+ for(var i=0, len=s.length; i<len; i++) {
+ src = s[i].getAttribute('src');
+ if(src) {
+ m = src.match(r);
+ if(m) {
+ l = m[1];
+ break;
+ }
+ }
+ }
+ return (function() { return l; });
+ })(),
+
+ /**
+ * Property: ImgPath
+ * {String} Set this to the path where control images are stored, a path
+ * given here must end with a slash. If set to '' (which is the default)
+ * OpenLayers will use its script location + "img/".
+ *
+ * You will need to set this property when you have a singlefile build of
+ * OpenLayers that either is not named "OpenLayers.js" or if you move
+ * the file in a way such that the image directory cannot be derived from
+ * the script location.
+ *
+ * If your custom OpenLayers build is named "my-custom-ol.js" and the images
+ * of OpenLayers are in a folder "/resources/external/images/ol" a correct
+ * way of including OpenLayers in your HTML would be:
+ *
+ * (code)
+ * <script src="/path/to/my-custom-ol.js" type="text/javascript"></script>
+ * <script type="text/javascript">
+ * // tell OpenLayers where the control images are
+ * // remember the trailing slash
+ * OpenLayers.ImgPath = "/resources/external/images/ol/";
+ * </script>
+ * (end code)
+ *
+ * Please remember that when your OpenLayers script is not named
+ * "OpenLayers.js" you will have to make sure that the default theme is
+ * loaded into the page by including an appropriate <link>-tag,
+ * e.g.:
+ *
+ * (code)
+ * <link rel="stylesheet" href="/path/to/default/style.css" type="text/css">
+ * (end code)
+ */
+ ImgPath : ''
+};