feat: Use rat image
This commit is contained in:
@@ -48,7 +48,7 @@ class AdoptionNoticeGeoJSONSerializer(serializers.ModelSerializer):
|
|||||||
'image_alt')
|
'image_alt')
|
||||||
|
|
||||||
def get_species(self, obj):
|
def get_species(self, obj):
|
||||||
return None
|
return "rat"
|
||||||
|
|
||||||
def get_url(self, obj):
|
def get_url(self, obj):
|
||||||
return obj.get_absolute_url()
|
return obj.get_absolute_url()
|
||||||
|
@@ -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({
|
map.addLayer({
|
||||||
id: 'unclustered-point',
|
id: 'unclustered-point',
|
||||||
type: 'circle',
|
type: 'symbol',
|
||||||
source: 'adoption-notices',
|
source: 'adoption-notices',
|
||||||
filter: ['!', ['has', 'point_count']],
|
filter: ['!', ['has', 'point_count']],
|
||||||
paint: {
|
layout: {
|
||||||
'circle-color': '#f28cb1',
|
'icon-image': ['get', 'species'],
|
||||||
'circle-radius': 15
|
'icon-size': 0.07,
|
||||||
|
'icon-allow-overlap': true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user