support gpx routes by converting them to tracks

This commit is contained in:
vcoppe
2024-07-15 19:06:13 +02:00
parent a85beee1f0
commit 1d33607266
3 changed files with 71 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ export type GPXFileType = {
metadata: Metadata;
wpt: WaypointType[];
trk: TrackType[];
rte: RouteType[];
};
export type GPXFileAttributes = {
@@ -38,6 +39,11 @@ export type WaypointType = {
link?: Link;
sym?: string;
type?: string;
extensions?: WaypointExtensions;
};
export type WaypointExtensions = {
'gpxx:RoutePointExtension'?: RoutePointExtension;
};
export type Coordinates = {
@@ -99,4 +105,23 @@ export type Author = {
name?: string;
email?: string;
link?: Link;
};
};
export type RouteType = {
name?: string;
cmt?: string;
desc?: string;
src?: string;
link?: Link;
type?: string;
extensions?: TrackExtensions;
rtept: WaypointType[];
}
export type RoutePointExtension = {
'gpxx:rpt'?: GPXXRoutePoint[];
}
export type GPXXRoutePoint = {
attributes: Coordinates;
}