diff --git a/demo/loader.js b/demo/loader.js new file mode 100644 index 0000000000..f475726681 --- /dev/null +++ b/demo/loader.js @@ -0,0 +1,31 @@ +// the following code includes the sourc-files of OpenLayers as they are +// defined in ol.js. +// +// You can control in which form the source will be loaded by passing +// URL-parameters: +// +// - host +// where the plovr compiler is running, if not passed this defaults to the +// current host on port 9810 +// +// - mode +// which mode of compilation should be applied. Common values for this are +// RAW, SIMPLE or ADVANCED. If not provided, SIMPLE is used. +(function(doc, l){ + var hostRegex = /[\\?&]host=([^&#]*)/, + modeRegex = /[\\?&]mode=([^&#]*)/, + hostResult = hostRegex.exec(l.href), + modeResult = modeRegex.exec(l.href), + host = (hostResult && hostResult[1]) + ? hostResult[1] + : (l.host) + ? l.host + ':9810' + : 'localhost:9810', + mode = (modeResult && modeResult[1]) + ? modeResult[1] + : 'SIMPLE', + script = '' + + ''; + doc.write(script); +})(document, location); \ No newline at end of file diff --git a/demo/map.html b/demo/map.html new file mode 100644 index 0000000000..a842651bd5 --- /dev/null +++ b/demo/map.html @@ -0,0 +1,23 @@ + + + + OL3 Map + + + + + + +
+ + \ No newline at end of file