feat: Exchange pin with circle
Allows to still see a cities label
This commit is contained in:
parent
226102ccaf
commit
8aab4a13ae
@ -76,7 +76,7 @@
|
|||||||
image = await map.loadImage('{% static "fellchensammlung/img/pin.png" %}');
|
image = await map.loadImage('{% static "fellchensammlung/img/pin.png" %}');
|
||||||
map.addImage('pin', image.data);
|
map.addImage('pin', image.data);
|
||||||
{% for map_pin in map_pins %}
|
{% for map_pin in map_pins %}
|
||||||
map.addSource('point', {
|
map.addSource('point_{{ forloop.counter }}', {
|
||||||
'type': 'geojson',
|
'type': 'geojson',
|
||||||
'data': {
|
'data': {
|
||||||
'type': 'FeatureCollection',
|
'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 %}
|
{% endfor %}
|
||||||
map.addLayer({
|
|
||||||
'id': 'pints',
|
|
||||||
'type': 'symbol',
|
|
||||||
'source': 'point',
|
|
||||||
'layout': {
|
|
||||||
'icon-image': 'pin',
|
|
||||||
'icon-size': 0.1
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if search_center %}
|
{% if search_center %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user