maps: extend marker_colour to also be used for surfaces (#57279)
This commit is contained in:
parent
9fa168c306
commit
a6d8e779a3
|
@ -75,6 +75,6 @@ class Migration(migrations.Migration):
|
|||
migrations.AlterField(
|
||||
model_name='maplayer',
|
||||
name='marker_colour',
|
||||
field=models.CharField(default='#0000FF', max_length=7, verbose_name='Marker colour'),
|
||||
field=models.CharField(default='#0000FF', max_length=7, verbose_name='Marker or surface colour'),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -124,7 +124,7 @@ class MapLayer(models.Model):
|
|||
tiles_default = models.BooleanField(_('Default tiles layer'), default=False)
|
||||
|
||||
geojson_url = models.CharField(_('Geojson URL'), max_length=1024)
|
||||
marker_colour = models.CharField(_('Marker colour'), max_length=7, default='#0000FF')
|
||||
marker_colour = models.CharField(_('Marker or surface colour'), max_length=7, default='#0000FF')
|
||||
icon = models.CharField(_('Marker icon'), max_length=32, blank=True, null=True, choices=ICONS)
|
||||
icon_colour = models.CharField(_('Icon colour'), max_length=7, default='#000000')
|
||||
cache_duration = models.PositiveIntegerField(_('Cache duration'), default=60, help_text=_('In seconds.'))
|
||||
|
|
|
@ -87,6 +87,9 @@ $(function() {
|
|||
geojson_layer.icon_colour +'"></i></span>'
|
||||
});
|
||||
return L.marker(latlng, {icon: marker});
|
||||
},
|
||||
style: function (feature) {
|
||||
return {weight: 2, color: geojson_layer.marker_colour, fillColor: geojson_layer.marker_colour};
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue