add track name when exporting file with a single track
This commit is contained in:
parent
b51961bfe5
commit
555cc50e7d
1 changed files with 4 additions and 0 deletions
|
@ -96,6 +96,10 @@ export function buildGPX(file: GPXFile): string {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (gpx.trk.length === 1 && (gpx.trk[0].name === undefined || gpx.trk[0].name === '')) {
|
||||||
|
gpx.trk[0].name = gpx.metadata.name;
|
||||||
|
}
|
||||||
|
|
||||||
return builder.build({
|
return builder.build({
|
||||||
"?xml": {
|
"?xml": {
|
||||||
attributes: {
|
attributes: {
|
||||||
|
|
Loading…
Reference in a new issue