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

failed to load track without elevation #127

Closed
philippe-queinnec opened this issue Aug 31, 2021 · 2 comments
Closed

failed to load track without elevation #127

philippe-queinnec opened this issue Aug 31, 2021 · 2 comments
Assignees
Labels

Comments

@philippe-queinnec
Copy link

If a track has no elevation ( tag), or if the first point of a track has no elevation, loading fails.
The culprit is line 488 in _parse_segment. The line
ll.meta.ele = last.meta.ele;
should be
if (last != null) { ll.meta.ele = last.meta.ele; }

@pimschaaf
Copy link

Without this change I get the following error message:
Uncaught TypeError: Cannot read properties of null (reading 'meta') at i._parse_segment (gpx.js:488)
when elevation data is missing.

@mpetazzoni
Copy link
Owner

Thanks!

@mpetazzoni mpetazzoni added the bug label Sep 15, 2021
@mpetazzoni mpetazzoni self-assigned this Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants