Set track color yellow for CyclOSM (#297)
This commit is contained in:
parent
a0fe3c8824
commit
9fd9a52a8c
1 changed files with 7 additions and 1 deletions
|
|
@ -3,7 +3,13 @@ BR.tracksLoader = function(map, layersControl, routing) {
|
|||
options: {
|
||||
layer: L.geoJson,
|
||||
layerOptions: {
|
||||
style: { color: 'blue' },
|
||||
style: function(geoJsonFeature) {
|
||||
var currentLayerId = layersControl.getActiveBaseLayer().layer.id;
|
||||
return {
|
||||
color: currentLayerId === 'cyclosm' ? 'yellow' : 'blue',
|
||||
weight: 4
|
||||
};
|
||||
},
|
||||
interactive: false,
|
||||
pointToLayer: function(geoJsonPoint, latlng) {
|
||||
return L.marker(latlng, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue