From 5a1a2a64a181fc5ee8439854edfdc7969ec86283 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 2 Oct 2015 21:52:29 +0200 Subject: [PATCH] Phi: Add some base layers to the map - Add layers from maps.stamen.com - Add an empty layer for Richard --- Phi/main.js | 4 +++- Phi/widgets/map.js | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Phi/main.js b/Phi/main.js index 1b0cff40d..457d0233e 100644 --- a/Phi/main.js +++ b/Phi/main.js @@ -18,7 +18,9 @@ require.config({ aircraft : '../aircraft-dir', pagedown : '3rdparty/pagedown', clockpicker : '3rdparty/clockpicker/jquery-clockpicker.min', - } + stamen: 'http://maps.stamen.com/js/tile.stamen', + }, + waitSeconds: 30, }); require([ diff --git a/Phi/widgets/map.js b/Phi/widgets/map.js index 13e16a451..bf1e22793 100644 --- a/Phi/widgets/map.js +++ b/Phi/widgets/map.js @@ -1,6 +1,6 @@ define( [ - 'knockout', 'jquery', 'leaflet', 'text!./map.html' + 'knockout', 'jquery', 'leaflet', 'text!./map.html', 'stamen' ], function(ko, jquery, leaflet, htmlString) { @@ -120,7 +120,12 @@ define( { maxZoom : 18, attribution : 'Map data © OpenStreetMap contributors' - }) + }), + "Stamen - toner" : new L.StamenTileLayer("toner"), + "Stamen - toner-background" : new L.StamenTileLayer("toner-background"), + "Stamen - toner-hybrid" : new L.StamenTileLayer("toner-hybrid"), + "Stamen - watercolor" : new L.StamenTileLayer("watercolor"), + "None" : new L.layerGroup(), } self.map.addLayer(baseLayers["OpenStreetMaps"]);