mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
add track name when exporting file with a single track
This commit is contained in:
@@ -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: {
|
||||||
|
Reference in New Issue
Block a user