summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2018-03-09 16:33:41 +0100
committerhellekin <hellekin@cepheide.org>2018-03-09 16:33:41 +0100
commit89c48ccdb776aebad2e476fd3145f7f38ac30dd8 (patch)
treec87254bca631ec51ddc7b05e2433c420ccb33fe2 /assets
parent9b9856c0f656123c9583f33096811c0681eacb71 (diff)
downloadwallonie-demain-proto-89c48ccdb776aebad2e476fd3145f7f38ac30dd8.tar.gz
Map tile suggestions: new default to OSM HOT
Diffstat (limited to 'assets')
-rw-r--r--assets/mapper.js42
1 files changed, 42 insertions, 0 deletions
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: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
+ });
+
+ var OpenStreetMap_BlackAndWhite =
+ L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
+ maxZoom: 18,
+ attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
+ });
+
+ var Stamen_TonerLite =
+ L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.{ext}', {
+ attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
+ 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 <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
+ 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 &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
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)