1 {% extends "2022/base.html" %}
4 {% block global-content %}
6 <div id="references-map"></div>
13 var map = L.map('references-map').setView([52, 20], 7);
15 if (navigator.geolocation) {
16 navigator.geolocation.getCurrentPosition(function(position) {
18 [position.coords.latitude, position.coords.longitude], 8,
26 L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
27 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
29 var markers = L.markerClusterGroup();
31 function showMarker(m) {
33 '/mapa/popup/' + m.target.options.mid,
35 let p = L.popup({minWidth: 340}).setLatLng(m.latlng).setContent(data);
43 {% for e in entities %}
45 [{{ e.lat }}, {{ e.lon }}],
47 title: "{{ e.label }}",
51 ).on('click', showMarker).addTo(markers);
55 map.addLayer(markers);