actually add map files + reduce usage of unwrap
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 4m52s

This commit is contained in:
Nicholas Orlowsky 2026-04-19 22:54:49 -04:00
parent 0698373151
commit 8a17159524
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
3 changed files with 195 additions and 70 deletions

36
web/templates/map.html Normal file
View file

@ -0,0 +1,36 @@
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
<style>
#map { height: 750px; width: 100%; }
</style>
<div id="map"></div>
<script>
var map = L.map('map').setView([39.952583, -75.165222], 9);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
{% for loc in locations %}
{
var icon = L.divIcon({
html: '<span style="background-color: #eee; padding: 2px;">{{ loc.2 }}</span>', // Your text here
className: 'text-label', // Custom CSS class
//iconSize: [100, 40], // Optional: Define size
//iconAnchor: [50, 20] // Optional: Center the text over the point
});
var marker = L.marker([{{loc.0}}, {{loc.1}}], {icon: icon}).addTo(map);
marker.bindPopup("{{ loc.2 }}")
}
{% endfor %}
</script>