From: Radek Czajka Date: Tue, 13 Oct 2026 11:04:54 +0000 (+0200) Subject: fix global map X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/00cdeb066b2337b877a95ac5cc467cef6cba498e?ds=inline fix global map --- diff --git a/src/references/templates/references/map.html b/src/references/templates/references/map.html index b7951c1ac..da3918b47 100644 --- a/src/references/templates/references/map.html +++ b/src/references/templates/references/map.html @@ -60,14 +60,17 @@ {% cache 60 references-map %} {% localize off %} {% for e in entities %} + {% if e.lat and e.lon %} + edata = {{ e.get_json|safe }}; L.marker( - [{{ e.lat }}, {{ e.lon }}], + [edata.location[0], edata.location[1]], { - title: "{{ e.label }}", - alt: "{{ e.label }}", - mid: {{ e.pk }}, + title: edata.label, + alt: edata.label, + mid: edata.id, } ).on('click', showMarker).addTo(markers); + {% endif %} {% endfor %} {% endlocalize %} {% endcache %}