From 8aab4a13aeae26ebdf35b26a1a6c5673137a48a2 Mon Sep 17 00:00:00 2001 From: moanos Date: Sun, 27 Apr 2025 23:33:41 +0200 Subject: [PATCH] feat: Exchange pin with circle Allows to still see a cities label --- .../partials/partial-map.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-map.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-map.html index 6b55ff7..8994b95 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-map.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-map.html @@ -76,7 +76,7 @@ image = await map.loadImage('{% static "fellchensammlung/img/pin.png" %}'); map.addImage('pin', image.data); {% for map_pin in map_pins %} - map.addSource('point', { + map.addSource('point_{{ forloop.counter }}', { 'type': 'geojson', 'data': { 'type': 'FeatureCollection', @@ -91,16 +91,16 @@ ] } }); + map.addLayer({ + 'id': 'point_{{ forloop.counter }}', + 'type': 'circle', + 'source': 'point_{{ forloop.counter }}', + 'paint': { + 'circle-radius': 18, + 'circle-color': '#ff878980' + } + }); {% endfor %} - map.addLayer({ - 'id': 'pints', - 'type': 'symbol', - 'source': 'point', - 'layout': { - 'icon-image': 'pin', - 'icon-size': 0.1 - } - }); }); {% if search_center %}