Closed hupe13 closed 12 months ago
Partially solved. An option in elevationControl
like:
colors: {custom: { area: '#9CC222', line: '#FF0000' }},
But stroke-width
is not correct yet.
But stroke-width is not correct yet.
@hupe13 it might be that you need to use a different property name (not all css properties are mapped the same way on the js side):
I have given up doing it this way. It's too complicated for me. I set prefercanvas
back to false
and it works as described here.
Thank you very much.
But
stroke-width
is not correct yet.
@hupe13 At first glance, color.outline
should be the property you have been looking for:
For more info:
Hi Raruto,
the solution of this issue works with default themes and colors only. For custom colors like in your example with a custom theme it doesn't work.
The track is black, if preferCanvas is false and if I turn all legend filters off. If I set preferCanvas to true, the color of the track is black from the beginning and does not change.
I think, I have to change something for opt.colors:
https://github.com/Raruto/leaflet-elevation/blob/bd9316bd1b7e7784b3bf3d812960eaa808ad94d6/src/utils.js#L4-L12
https://github.com/Raruto/leaflet-elevation/blob/bd9316bd1b7e7784b3bf3d812960eaa808ad94d6/src/control.js#L205
How should I do that?
Thank you very much.