From 1b0836da7305ac26b38ed941a957f4310ec96965 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 7 Dec 2020 23:08:54 +0100 Subject: Added walks --- walks/gpx/2020-09-25_14-24_Fri.gpx | 41 ++++ walks/gpx/2020-10-20_13-30_Tue.gpx | 14 ++ walks/gpx/2020-10-23_15-25_Fri.gpx | 15 ++ walks/gpx/bigger-loop.gpx | 86 ++++++++ walks/gpx/central-ottignies.gpx | 124 +++++++++++ walks/gpx/herman-blanmont.gpx | 113 ++++++++++ walks/gpx/herman-blanmont_2.gpx | 113 ++++++++++ walks/gpx/herman_leuven.gpx | 79 +++++++ walks/gpx/hmmm.gpx | 21 ++ walks/gpx/little-loop.gpx | 77 +++++++ walks/gpx/promenade-verte.gpx | 424 +++++++++++++++++++++++++++++++++++++ walks/index.template.html | 35 +++ walks/map.template.html | 11 + walks/script.js | 30 +++ walks/style.css | 9 + 15 files changed, 1192 insertions(+) create mode 100644 walks/gpx/2020-09-25_14-24_Fri.gpx create mode 100644 walks/gpx/2020-10-20_13-30_Tue.gpx create mode 100644 walks/gpx/2020-10-23_15-25_Fri.gpx create mode 100644 walks/gpx/bigger-loop.gpx create mode 100644 walks/gpx/central-ottignies.gpx create mode 100644 walks/gpx/herman-blanmont.gpx create mode 100644 walks/gpx/herman-blanmont_2.gpx create mode 100644 walks/gpx/herman_leuven.gpx create mode 100644 walks/gpx/hmmm.gpx create mode 100644 walks/gpx/little-loop.gpx create mode 100644 walks/gpx/promenade-verte.gpx create mode 100644 walks/index.template.html create mode 100644 walks/map.template.html create mode 100644 walks/script.js create mode 100644 walks/style.css (limited to 'walks') diff --git a/walks/gpx/2020-09-25_14-24_Fri.gpx b/walks/gpx/2020-09-25_14-24_Fri.gpx new file mode 100644 index 0000000..b48cee9 --- /dev/null +++ b/walks/gpx/2020-09-25_14-24_Fri.gpx @@ -0,0 +1,41 @@ + + + + 2020-09-25_14-24_Fri + + + 2020-09-25_14-24_Fri + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/2020-10-20_13-30_Tue.gpx b/walks/gpx/2020-10-20_13-30_Tue.gpx new file mode 100644 index 0000000..f341c53 --- /dev/null +++ b/walks/gpx/2020-10-20_13-30_Tue.gpx @@ -0,0 +1,14 @@ + + + + 2020-10-20_13-30_Tue + + + 2020-10-20_13-30_Tue + + + + + + + \ No newline at end of file diff --git a/walks/gpx/2020-10-23_15-25_Fri.gpx b/walks/gpx/2020-10-23_15-25_Fri.gpx new file mode 100644 index 0000000..ee9da8b --- /dev/null +++ b/walks/gpx/2020-10-23_15-25_Fri.gpx @@ -0,0 +1,15 @@ + + + + 2020-10-23_15-25_Fri + + + 2020-10-23_15-25_Fri + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/bigger-loop.gpx b/walks/gpx/bigger-loop.gpx new file mode 100644 index 0000000..8ef4b29 --- /dev/null +++ b/walks/gpx/bigger-loop.gpx @@ -0,0 +1,86 @@ + + + + bigger loop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/central-ottignies.gpx b/walks/gpx/central-ottignies.gpx new file mode 100644 index 0000000..cb7424c --- /dev/null +++ b/walks/gpx/central-ottignies.gpx @@ -0,0 +1,124 @@ + + + + central-ottignies + + + central-ottignies + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/herman-blanmont.gpx b/walks/gpx/herman-blanmont.gpx new file mode 100644 index 0000000..d1bec45 --- /dev/null +++ b/walks/gpx/herman-blanmont.gpx @@ -0,0 +1,113 @@ + + + + herman-blanmont + + + herman-blanmont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/herman-blanmont_2.gpx b/walks/gpx/herman-blanmont_2.gpx new file mode 100644 index 0000000..ef4af4c --- /dev/null +++ b/walks/gpx/herman-blanmont_2.gpx @@ -0,0 +1,113 @@ + + + + herman-blanmont_2 + + + herman-blanmont_2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/herman_leuven.gpx b/walks/gpx/herman_leuven.gpx new file mode 100644 index 0000000..f175682 --- /dev/null +++ b/walks/gpx/herman_leuven.gpx @@ -0,0 +1,79 @@ + + + + herman_leuven + + + herman_leuven + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/hmmm.gpx b/walks/gpx/hmmm.gpx new file mode 100644 index 0000000..b514358 --- /dev/null +++ b/walks/gpx/hmmm.gpx @@ -0,0 +1,21 @@ + + + + hmmm + + + hmmm + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/gpx/little-loop.gpx b/walks/gpx/little-loop.gpx new file mode 100644 index 0000000..4106693 --- /dev/null +++ b/walks/gpx/little-loop.gpx @@ -0,0 +1,77 @@ + + + + little_loop + + + little_loop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/walks/gpx/promenade-verte.gpx b/walks/gpx/promenade-verte.gpx new file mode 100644 index 0000000..92b4e55 --- /dev/null +++ b/walks/gpx/promenade-verte.gpx @@ -0,0 +1,424 @@ + + + + promenade_verte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/walks/index.template.html b/walks/index.template.html new file mode 100644 index 0000000..672262a --- /dev/null +++ b/walks/index.template.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/walks/map.template.html b/walks/map.template.html new file mode 100644 index 0000000..f36418e --- /dev/null +++ b/walks/map.template.html @@ -0,0 +1,11 @@ +
+
+ +
+ + + + diff --git a/walks/script.js b/walks/script.js new file mode 100644 index 0000000..2df91b0 --- /dev/null +++ b/walks/script.js @@ -0,0 +1,30 @@ +const parser = new DOMParser() +const mapNode = document.getElementById('map') + +const link = mapNode.querySelector('a') +fetch(link.href) + .then(res => res.text()) + .then(content => { + xml = parser.parseFromString(content, 'text/xml') + const points = xml.getElementsByTagName('rte')[0] || xml.getElementsByTagName('trkseg')[0] + const positions = Array.prototype.map.call( + points.children, p => [p.getAttribute('lat'), p.getAttribute('lon')]) + + const anchor = mapNode.getElementsByClassName('map-anchor')[0] + + const map = L.map(anchor).setView([0, 0], 13) + L.tileLayer( + 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + { + attribution: 'Map data © OpenStreetMap', + // maxZoom: 18, + subdomains: ['a', 'b', 'c'], + id: 'test/' + link.href, + // tileSize: 512, + // zoomOffset: -1, + // accessToken: 'your.mapbox.access.token' + }).addTo(map); + + const polyline = L.polyline(positions, {color: 'red'}).addTo(map); + map.fitBounds(polyline.getBounds()); + }) diff --git a/walks/style.css b/walks/style.css new file mode 100644 index 0000000..d3e0572 --- /dev/null +++ b/walks/style.css @@ -0,0 +1,9 @@ +.map-anchor { + margin-top: 20px; + height: 80vh; +} + +.view-on-map { + margin-right: 20px; + text-transform: capitalize; +} -- cgit