mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-30 23:30:04 +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({
|
||||
"?xml": {
|
||||
attributes: {
|
||||
|
Reference in New Issue
Block a user