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

get_name() gives the name of the last waypoint if there is one #112

Open
andre92160 opened this issue Apr 13, 2021 · 1 comment
Open

get_name() gives the name of the last waypoint if there is one #112

andre92160 opened this issue Apr 13, 2021 · 1 comment

Comments

@andre92160
Copy link

The name returned by get_name is the name of an element <name>, but not allways the name of the element <trk>:
For the joined gpx file, the name returned is a waypoint name instead of track name which is inside <trk><name>...</name></trk>.
bug_name.zip

@hupe13
Copy link

hupe13 commented Jun 1, 2021

Works for me:

shell:~> diff gpx.js gpx.js.orig
310,314d309
<       for (var i = 0; i < name.length; i++) {
<         if (name[i].parentElement.nodeName == "trk") {
<           this._info.name=name[i].textContent;
<         }
<       }

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

No branches or pull requests

2 participants