Closed ChrilleSchappe closed 1 month ago
@ChrilleSchappe I'd recommend you control visibility at the layer level. L.GPX
is a layer added to your Leaflet map, so you can use layer controls to show/hide the track.
If you're looking at configuring the track's color, use polyline_options
:
new L.GPX(url, {
polyline_options: {
color: 'green',
opacity: 0.75,
}
})...
I want to be able to change color for an existing track... Something like this:
var gpx = new L.GPX(url); gpx.setColor(color); gpx.reload();
In my case to be able to make it invisible and the visible again. (setInvisible(), setVisible() could be another way. I can't find this functionality!