diff options
Diffstat (limited to 'content/index.html')
| -rw-r--r-- | content/index.html | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/content/index.html b/content/index.html new file mode 100644 index 0000000..26ce206 --- /dev/null +++ b/content/index.html | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | |||
| 4 | <head> | ||
| 5 | <meta charset="UTF-8"> | ||
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| 7 | <title></title> | ||
| 8 | <link rel="stylesheet" href="/static/leaflet.css" /> | ||
| 9 | <script src="/static/leaflet.js"></script> | ||
| 10 | <script src="/static/main.js"></script> | ||
| 11 | </head> | ||
| 12 | |||
| 13 | <body> | ||
| 14 | <div id="map"></div> | ||
| 15 | </body> | ||
| 16 | |||
| 17 | <style> | ||
| 18 | body { | ||
| 19 | margin: 0; | ||
| 20 | padding: 0; | ||
| 21 | } | ||
| 22 | |||
| 23 | #map { | ||
| 24 | width: 100vw; | ||
| 25 | height: 100vh; | ||
| 26 | } | ||
| 27 | |||
| 28 | img { | ||
| 29 | max-height: 100%; | ||
| 30 | max-width: 100%; | ||
| 31 | } | ||
| 32 | |||
| 33 | .image-holder { | ||
| 34 | height: 300px; | ||
| 35 | width: 300px; | ||
| 36 | } | ||
| 37 | </style> | ||
| 38 | |||
| 39 | <script> | ||
| 40 | // const burned = [ | ||
| 41 | // [38.592177702929426, -9.145557060034113], | ||
| 42 | // [38.58385651421202, -9.134116290522673], | ||
| 43 | // [38.587516574932266, -9.134999747627804], | ||
| 44 | // [38.59442184182009, -9.13809184749576], | ||
| 45 | // [38.596734957715675, -9.138621921758839], | ||
| 46 | // ]; | ||
| 47 | // | ||
| 48 | // const unburned = [ | ||
| 49 | // [38.598388277527036, -9.135874396116632], | ||
| 50 | // [38.589731317901276, -9.149692038446165], | ||
| 51 | // [38.58043902375093, -9.138619879692945], | ||
| 52 | // [38.591568658478, -9.12070962376425], | ||
| 53 | // ]; | ||
| 54 | // | ||
| 55 | // const photo = [38.59428333333334, -9.127433333333334]; | ||
| 56 | // | ||
| 57 | // function addLine(map, point, bearing) { | ||
| 58 | // const len = 0.0002; | ||
| 59 | // const lat = Math.sin((bearing + 90) * 2 * Math.PI / 360) * len; | ||
| 60 | // const lon = Math.cos((bearing + 90) * 2 * Math.PI / 360) * len; | ||
| 61 | // const coords = [ | ||
| 62 | // [point[0], point[1]], | ||
| 63 | // [point[0] + lat, point[1] + lon], | ||
| 64 | // ]; | ||
| 65 | // L.polyline(coords, {color: 'blue'}).addTo(map) | ||
| 66 | // } | ||
| 67 | // | ||
| 68 | // function main() { | ||
| 69 | // var map = L.map('map').setView([38.59104623572979, -9.130882470026634], 14); | ||
| 70 | // L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
| 71 | // maxZoom: 19, | ||
| 72 | // attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' | ||
| 73 | // }).addTo(map); | ||
| 74 | // var polygon = L.polygon(unburned, {color: 'green'}).addTo(map); | ||
| 75 | // var polygon = L.polygon(burned, {color: 'red'}).addTo(map); | ||
| 76 | // //var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map); | ||
| 77 | // const test = [38.58989148093167, -9.138004507064645]; | ||
| 78 | // addLine(map, test, 0); | ||
| 79 | // var marker = L.marker(photo).on('click', () => console.log("clicked the image marker")).addTo(map); | ||
| 80 | // marker.bindPopup("<div class='image-holder'><img src='/img.jpg' /></div>"); | ||
| 81 | // //L.circle(test, {radius: 5.9}).on('click', (e) => console.log(`clicked circle, shift = ${e.originalEvent.shiftKey}`)).addTo(map) | ||
| 82 | // L.circle(test, {radius: 5.9}).on('click', (e) => { | ||
| 83 | // if (e.originalEvent.shiftKey) { | ||
| 84 | // console.log("reloaded") | ||
| 85 | // map.remove() | ||
| 86 | // main() | ||
| 87 | // } | ||
| 88 | // }).addTo(map); | ||
| 89 | // } | ||
| 90 | |||
| 91 | window.addEventListener("load", () => page_index__main()); | ||
| 92 | </script> | ||
| 93 | |||
| 94 | </html> | ||
