1 {% extends "2022/base.html" %}
6 <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
7 integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
9 <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
10 integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
11 crossorigin=""></script>
13 <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css">
14 <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css">
15 <script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
17 .leaflet-popup-content h2 {
32 .l-popup-books .c-search-result-fragment {
37 .l-popup-book-header {
44 {% block global-content %}
46 <div id="map" style="height: calc(100vh - 68px)"></div>
53 var map = L.map('map').setView([52, 20], 7);
54 L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
55 attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
57 var markers = L.markerClusterGroup();
60 function showMarker(m) {
62 '/pinezki/popup/' + m.target.options.mid,
65 n = Math.min(3, ($('a', d).length));
67 let p = L.popup({minWidth: w}).setLatLng(m.latlng).setContent(data);
75 {% for e in entities %}
77 [{{ e.lat }}, {{ e.lon }}],
79 title: "{{ e.label }}",
83 ).on('click', showMarker).addTo(markers);
87 map.addLayer(markers);