1 {% extends "2022/base.html" %}
5 {% block global-content %}
7 <div id="references-map"></div>
13 <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet-1.9.4/leaflet.css' %}">
14 <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.css' %}">
15 <link rel="stylesheet" type="text/css" media="all" href="{% static 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.Default.css' %}">
20 <script src="{% static 'contrib/leaflet-1.9.4/leaflet.js' %}"></script>
21 <script src="{% static 'contrib/leaflet.markercluster-1.4.1/leaflet.markercluster.js' %}"></script>
23 var map = L.map('references-map').setView([52, 20], 7);
24 L.Icon.Default.imagePath='{{ STATIC_URL }}contrib/leaflet-1.9.4/images/'
26 if (navigator.geolocation) {
27 navigator.geolocation.getCurrentPosition(function(position) {
29 [position.coords.latitude, position.coords.longitude], 8,
37 L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
38 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
40 var markers = L.markerClusterGroup();
42 function showMarker(m) {
44 '/mapa/popup/' + m.target.options.mid,
46 let p = L.popup({minWidth: 340}).setLatLng(m.latlng).setContent(data);
53 {% for e in entities %}
55 [{{ e.lat }}, {{ e.lon }}],
57 title: "{{ e.label }}",
61 ).on('click', showMarker).addTo(markers);
65 map.addLayer(markers);