forked from orson/bachemap
27 lines
919 B
HTML
27 lines
919 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Interactive Map</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='leaflet.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
|
</head>
|
|
<body>
|
|
<h1>Interactive Map</h1>
|
|
<div id="map" style="height: 600px;"></div>
|
|
<script src="{{ url_for('static', filename='leaflet.js') }}"></script>
|
|
<script>
|
|
var map = L.map('map').setView([51.505, -0.09], 13);
|
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
attribution: '© OpenStreetMap contributors'
|
|
}).addTo(map);
|
|
|
|
{% for pin in pins %}
|
|
var marker = L.marker([{{ pin.lat }}, {{ pin.lng }}]).addTo(map)
|
|
.bindPopup("<b>{{ pin.description }}</b><br><img src='{{ pin.photo }}' width='100'>");
|
|
{% endfor %}
|
|
</script>
|
|
</body>
|
|
</html>
|