maps: add four new marker icons (#19049)

This commit is contained in:
Frédéric Péters 2017-09-28 16:01:28 +02:00
parent c58b6083ef
commit 9c2425e60c
3 changed files with 25 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class Migration(migrations.Migration):
('slug', models.SlugField(verbose_name='Identifier')),
('geojson_url', models.URLField(max_length=1024, verbose_name='Geojson URL')),
('marker_colour', models.CharField(default=b'#0000FF', max_length=7, verbose_name='Marker colour')),
('icon', models.CharField(blank=True, max_length=32, null=True, verbose_name='Marker icon', choices=[(b'book', 'Book'), (b'house', 'House'), (b'building', 'Building'), (b'hospital', 'Hospital'), (b'ambulance', 'Ambulance'), (b'taxi', 'Taxi'), (b'subway', 'Subway'), (b'wheelchair', 'Wheelchair'), (b'bicycle', 'Bicycle'), (b'car', 'Car'), (b'train', 'Train'), (b'bus', 'Bus'), (b'motorcycle', 'Motorcycle'), (b'truck', 'Truck')])),
('icon', models.CharField(blank=True, max_length=32, null=True, verbose_name='Marker icon', choices=[(b'book', 'Book'), (b'house', 'House'), (b'building', 'Building'), (b'hospital', 'Hospital'), (b'ambulance', 'Ambulance'), (b'taxi', 'Taxi'), (b'subway', 'Subway'), (b'wheelchair', 'Wheelchair'), (b'bicycle', 'Bicycle'), (b'car', 'Car'), (b'train', 'Train'), (b'bus', 'Bus'), (b'motorcycle', 'Motorcycle'), (b'truck', 'Truck'), (b'shower', 'Shower'), (b'trash', 'Trash'), (b'recycle', 'Recycle'), (b'university', 'University')])),
('icon_colour', models.CharField(default=b'#000000', max_length=7, verbose_name='Icon colour')),
],
options={'ordering': ('label',)}

View File

@ -44,6 +44,10 @@ ICONS = [
('bus', _('Bus')),
('motorcycle', _('Motorcycle')),
('truck', _('Truck')),
('shower', _('Shower')),
('trash', _('Trash')),
('recycle', _('Recycle')),
('university', _('University')),
]
ZOOM_LEVELS = [ ('0', _('Whole world')),

View File

@ -131,3 +131,23 @@ select#id_icon option[value=book]::before,
i.leaflet-marker-icon.book::before {
content: "\f02d"; /* book */
}
select#id_icon option[value=shower]::before,
i.leaflet-marker-icon.shower::before {
content: "\f2cc"; /* shower */
}
select#id_icon option[value=trash]::before,
i.leaflet-marker-icon.trash::before {
content: "\f1f8"; /* trash */
}
select#id_icon option[value=recycle]::before,
i.leaflet-marker-icon.recycle::before {
content: "\f1b8"; /* recycle */
}
select#id_icon option[value=university]::before,
i.leaflet-marker-icon.university::before {
content: "\f19c"; /* university */
}