feat: Use rat image

This commit is contained in:
2025-06-15 18:37:51 +02:00
parent ba72b4e59f
commit 975c962025
2 changed files with 10 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ class AdoptionNoticeGeoJSONSerializer(serializers.ModelSerializer):
'image_alt')
def get_species(self, obj):
return None
return "rat"
def get_url(self, obj):
return obj.get_absolute_url()

View File

@@ -109,15 +109,19 @@
}
});
// Pins
const rat_image = await map.loadImage('{% static 'fellchensammlung/img/logo_transparent.png' %}');
map.addImage('rat', rat_image.data);
map.addLayer({
id: 'unclustered-point',
type: 'circle',
type: 'symbol',
source: 'adoption-notices',
filter: ['!', ['has', 'point_count']],
paint: {
'circle-color': '#f28cb1',
'circle-radius': 15
layout: {
'icon-image': ['get', 'species'],
'icon-size': 0.07,
'icon-allow-overlap': true
}
});