summaryrefslogtreecommitdiff
path: root/src/js/tours.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/tours.js')
-rw-r--r--src/js/tours.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/js/tours.js b/src/js/tours.js
new file mode 100644
index 0000000..83e1cae
--- /dev/null
+++ b/src/js/tours.js
@@ -0,0 +1,28 @@
+//Load common code that includes config, then load the app logic for this page.
+requirejs(['./slippymap'], function(_foo) {
+ var depth = '../../';
+ requirejs.config({
+ baseUrl: depth + 'js/lib',
+ });
+ requirejs(['app/mapfactory'], function(mkmap) {
+ L.Icon.Default.imagePath = depth + 'img/leaflet/';
+ var map = mkmap('content', [
+ [52.1381, 8.39802],
+ [52.0400, 8.18859]
+ ]);
+ requirejs([
+ 'app/boundary',
+ 'json!data/copenhagen.json'
+ ], function(boundary, data) {
+ map.addLayer(boundary(data));
+ map.layers.addOverlay(boundary(data), 'Regionsgrænse');
+ });
+ requirejs([
+ 'app/places',
+ 'json!data/tours.json',
+ ], function(places, data, hook) {
+ map.addLayer(places(data));
+ hook(map);
+ });
+ });
+});