You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although multiple tracks within one GPX file is supported and all tracks are marked with their own start- and end-markers, only the name of the first track is displayed as the title and only one checkbox for de-selecting all included tracks individually is shown in the box in the upper right corner.
While it is necessary to reduce all included track-names to one name for the title and to create a sum of all included distances etc., it would be nice to at least list the included tracks individually in the box in the upper right corner, and then maybe update the data at the bottom.
Edit:
I am no programmer, but as far as I can read and understand the source, I found this:
in line 329 the name of the first track gets selected, as are other infos in the next lines. No matter how many tracks, only track no. "0".
in line 353 the complete gpx file is parsed and gets iterated through all included tracks, segments get concatenated.
If I knew how to do it, I would try to do this:
when creating the L.GPX layer not only pass "url" but additionally an index counter to return only one specific track to the layer.
then creating one layer per track by iterating through all tracks by looping through index counter.
adding all L.GPX-layers to the control-overlay.
I am sorry if this is complete fantasy nonsense, but not being a programmer this is as good as I can describe it.
The text was updated successfully, but these errors were encountered:
jeromectm
added a commit
to jeromectm/leaflet-gpx
that referenced
this issue
Apr 21, 2022
As suggested by mpetazzoni#123, added a "trackNumber" option to return a single track, when the gpx file contains multiple ones. The name, desc etc are then returned from this track. Also added get_number_of_tracks() to count the tracks.
Although multiple tracks within one GPX file is supported and all tracks are marked with their own start- and end-markers, only the name of the first track is displayed as the title and only one checkbox for de-selecting all included tracks individually is shown in the box in the upper right corner.
While it is necessary to reduce all included track-names to one name for the title and to create a sum of all included distances etc., it would be nice to at least list the included tracks individually in the box in the upper right corner, and then maybe update the data at the bottom.
Edit:
I am no programmer, but as far as I can read and understand the source, I found this:
If I knew how to do it, I would try to do this:
I am sorry if this is complete fantasy nonsense, but not being a programmer this is as good as I can describe it.
The text was updated successfully, but these errors were encountered: