diff options
Diffstat (limited to 'reports/map.js')
| -rw-r--r-- | reports/map.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/reports/map.js b/reports/map.js index 6a2db154..95a5cf26 100644 --- a/reports/map.js +++ b/reports/map.js @@ -7,6 +7,12 @@ function read_json(selector) { } } +let map_mode = false +if (window.location.hash.indexOf('map') !== -1) { + document.body.parentNode.classList.add('map') + map_mode = true +} + let map = L.map('mapid').setView([25, 0], 2); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', @@ -45,7 +51,7 @@ points.forEach(point => { */ const latlng = point.slice(5,7).map(n => parseFloat(n)) - console.log(point) + // console.log(point) if (!latlng.length || isNaN(latlng[0]) || isNaN(latlng[1])) return var marker = L.marker(latlng, { icon: redDot }).addTo(map); marker.bindPopup([ @@ -61,7 +67,7 @@ points.forEach(point => { // vertices: 100, // } // L.Polyline.Arc(source, latlng, arcStyle).addTo(map); - console.log(latlng) + // console.log(latlng) var pathStyle = { color: 'rgb(245, 246, 150)', fillColor: 'rgb(245, 246, 150)', |
