From a8770783c02ace1586070ed1bc8e4ff023c5e717 Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Tue, 13 May 2014 11:50:04 +0200 Subject: [PATCH] add Hiking + Cycling overlays (Waymarked Trails) --- js/index.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/js/index.js b/js/index.js index fba2e3e..94fef90 100644 --- a/js/index.js +++ b/js/index.js @@ -37,6 +37,19 @@ attribution: thunderforestAttribution }); + var cycling = L.tileLayer('http://tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png', { + maxZoom: 19, + opacity: 0.7, + attribution: 'Cycling © Waymarked Trails ' + + '(CC-BY-SA 3.0 DE)' + }); + var hiking = L.tileLayer('http://tile.waymarkedtrails.org/hiking/{z}/{x}/{y}.png', { + maxZoom: 19, + opacity: 0.7, + attribution: 'Hiking © Waymarked Trails ' + + '(CC-BY-SA 3.0 DE)' + }); + var map = new L.Map('map', { layers: [osm], center: new L.LatLng(50.99, 9.86), @@ -51,12 +64,11 @@ 'OpenStreetMap': osm, 'OpenStreetMap.de': osmde, 'OpenTopoMap': topo, - 'OpenCycleMap': cycle, - 'Outdoors': outdoors + 'OpenCycleMap (Thunderf.)': cycle, + 'Outdoors (Thunderforest)': outdoors }, { - /* + 'Cycling (Waymarked Trails)': cycling, 'Hiking (Waymarked Trails)': hiking - */ }).addTo(map); map.addControl(new L.Control.Permalink({text: 'Permalink', position: 'bottomright'})); //, layers: layersControl