0001-maps-extend-marker_colour-to-also-be-used-for-surfac.patch
combo/apps/maps/migrations/0007_auto_20180706_1345.py | ||
---|---|---|
75 | 75 |
migrations.AlterField( |
76 | 76 |
model_name='maplayer', |
77 | 77 |
name='marker_colour', |
78 |
field=models.CharField(default='#0000FF', max_length=7, verbose_name='Marker colour'), |
|
78 |
field=models.CharField(default='#0000FF', max_length=7, verbose_name='Marker or surface colour'),
|
|
79 | 79 |
), |
80 | 80 |
] |
combo/apps/maps/models.py | ||
---|---|---|
124 | 124 |
tiles_default = models.BooleanField(_('Default tiles layer'), default=False) |
125 | 125 | |
126 | 126 |
geojson_url = models.CharField(_('Geojson URL'), max_length=1024) |
127 |
marker_colour = models.CharField(_('Marker colour'), max_length=7, default='#0000FF') |
|
127 |
marker_colour = models.CharField(_('Marker or surface colour'), max_length=7, default='#0000FF')
|
|
128 | 128 |
icon = models.CharField(_('Marker icon'), max_length=32, blank=True, null=True, choices=ICONS) |
129 | 129 |
icon_colour = models.CharField(_('Icon colour'), max_length=7, default='#000000') |
130 | 130 |
cache_duration = models.PositiveIntegerField(_('Cache duration'), default=60, help_text=_('In seconds.')) |
combo/apps/maps/static/js/combo.map.js | ||
---|---|---|
87 | 87 |
geojson_layer.icon_colour +'"></i></span>' |
88 | 88 |
}); |
89 | 89 |
return L.marker(latlng, {icon: marker}); |
90 |
}, |
|
91 |
style: function (feature) { |
|
92 |
return {weight: 2, color: geojson_layer.marker_colour, fillColor: geojson_layer.marker_colour}; |
|
90 | 93 |
} |
91 | 94 |
}); |
92 | 95 | |
93 |
- |