Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPX Style extension should also be parsed from the <trk> element #86

Closed
mhaberler opened this issue Dec 22, 2019 · 1 comment
Closed

Comments

@mhaberler
Copy link

mhaberler commented Dec 22, 2019

I am fairly sure the placement of the color option parsing code is at the wrong tag:
https://github.com/mpetazzoni/leaflet-gpx#line-styling

unfortunately https://www.topografix.com/GPX/gpx_style/0/2 mandates no clear place where to put this

I arrived at this by analogy - have a look at some of the GPX files on github, eg

https://github.com/mapbox/togeojson/blob/72957d69545ed1f798d56618694473b603a0ba6f/test/data/style.gpx
https://github.com/hsnetzer/gpx-pinhoti/blob/76bdf95095ec0f42521a3c94dac29ceb7824aa3b/B.gpx

or search for https://github.com/search?q=www.topografix.com%2FGPX%2Fgpx_style%2F0%2F2+line+color+trk&type=Code for more examples

@mpetazzoni mpetazzoni changed the title GPX Style extension should be parsed at the trk, not the trkseg element GPX Style extension should also be parsed from the <trk> element Dec 28, 2019
mpetazzoni added a commit that referenced this issue Dec 28, 2019
* Correctly extract style from all the right levels, whether that's from
  the <trk> element or the <trkseg> element;
* Support multiple track segments within each track, with option to join
  them.
@mpetazzoni
Copy link
Owner

This should now work as expected with the latest from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants