From 89c48ccdb776aebad2e476fd3145f7f38ac30dd8 Mon Sep 17 00:00:00 2001 From: hellekin Date: Fri, 9 Mar 2018 16:33:41 +0100 Subject: Map tile suggestions: new default to OSM HOT --- assets/mapper.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'assets') diff --git a/assets/mapper.js b/assets/mapper.js index 3255407..f549c5c 100644 --- a/assets/mapper.js +++ b/assets/mapper.js @@ -448,13 +448,55 @@ $(document).ready(function() { map.setView([50.83906, 4.35308], 8) + var OpenStreetMap_HOT = + L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', { + maxZoom: 19, + attribution: '© OpenStreetMap, Tiles courtesy of Humanitarian OpenStreetMap Team' + }); + + var OpenStreetMap_BlackAndWhite = + L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', { + maxZoom: 18, + attribution: '© OpenStreetMap' + }); + + var Stamen_TonerLite = + L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.{ext}', { + attribution: 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap', + subdomains: 'abcd', + minZoom: 0, + maxZoom: 20, + ext: 'png' + }); + + var Stamen_Toner = + L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.{ext}', { + attribution: 'Map tiles by Stamen Design, CC BY 3.0 — Map data © OpenStreetMap', + subdomains: 'abcd', + minZoom: 0, + maxZoom: 20, + ext: 'png' + }); + +/* L.tileLayer('//stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', { attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', maxZoom: 18, id: 'c4ptaincrunch.ka5engdh', accessToken: 'pk.eyJ1IjoiYzRwdGFpbmNydW5jaCIsImEiOiJUdWVRSENNIn0.qssi5TBLeBinBsXkZKiI6Q' }).addTo(map) +*/ + OpenStreetMap_HOT.addTo(map) + + const BaseLayers = { + 'OSM HOT': OpenStreetMap_HOT, + 'OSM B&W': OpenStreetMap_BlackAndWhite, + 'Stamen TonerLite': Stamen_TonerLite, + 'Stamen Toner': Stamen_Toner + } + L.control.layers(BaseLayers).addTo(map) + // L.control.layers(SectionLayers).addTo(map) mcg.addTo(map) -- cgit v1.2.3