From dacfa92970becd58a666fb0e435346d5241c6ba8 Mon Sep 17 00:00:00 2001 From: "Kasper D. Fischer" Date: Wed, 15 Jul 2020 22:37:39 +0200 Subject: [PATCH] add OpenTopoMap support --- www/map.js | 7 +++++++ www/map.js.en | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/www/map.js b/www/map.js index 146d22e..076e8e4 100644 --- a/www/map.js +++ b/www/map.js @@ -158,6 +158,13 @@ $(document).ready(function() { attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' }).addTo(map); break; + case 'opentopo': // add OpenTopoMap tile layer https://opentopomap.org/ + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); + L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', + { + attribution: 'Kartendaten: © OpenStreetMap contributors, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)' + }).addTo(map); + break; case 'osmde': // add OpenStreetMap.DE tile layer, default null; default: diff --git a/www/map.js.en b/www/map.js.en index 7e6070c..0b008e2 100644 --- a/www/map.js.en +++ b/www/map.js.en @@ -158,6 +158,13 @@ $(document).ready(function() { attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' }).addTo(map); break; + case 'opentopo': // add OpenTopoMap tile layer https://opentopomap.org/ + map = L.map('map', { zoomControl: false, worldCopyJump: true }).setView(config['map']['centerDefault'], config['map']['zoomDefault']); + L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', + { + attribution: 'Kartendaten: © OpenStreetMap contributors, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)' + }).addTo(map); + break; case 'osmde': // add OpenStreetMap.DE tile layer, default null; default: