mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-03 09:12:30 +00:00
fix extensions and attributes
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
export type GPXFile = {
|
||||
creator: string;
|
||||
attributes: GPXFileAttributes;
|
||||
metadata: Metadata;
|
||||
wpt: Waypoint[];
|
||||
trk: Track[];
|
||||
};
|
||||
|
||||
export type GPXFileAttributes = {
|
||||
creator: string;
|
||||
[key: string]: string;
|
||||
};
|
||||
|
||||
export type Metadata = {
|
||||
name?: string;
|
||||
desc?: string;
|
||||
@@ -14,14 +19,17 @@ export type Metadata = {
|
||||
};
|
||||
|
||||
export type Link = {
|
||||
href: string;
|
||||
attributes: LinkAttributes;
|
||||
text?: string;
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export type LinkAttributes = {
|
||||
href: string;
|
||||
};
|
||||
|
||||
export type Waypoint = {
|
||||
lat: number;
|
||||
lon: number;
|
||||
attributes: Coordinates;
|
||||
ele?: number;
|
||||
time?: Date;
|
||||
name?: string;
|
||||
@@ -32,6 +40,11 @@ export type Waypoint = {
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export type Coordinates = {
|
||||
lat: number;
|
||||
lon: number;
|
||||
};
|
||||
|
||||
export type Track = {
|
||||
name?: string;
|
||||
cmt?: string;
|
||||
@@ -44,7 +57,7 @@ export type Track = {
|
||||
};
|
||||
|
||||
export type TrackExtensions = {
|
||||
line?: LineStyleExtension;
|
||||
'gpx_style:line'?: LineStyleExtension;
|
||||
};
|
||||
|
||||
export type LineStyleExtension = {
|
||||
@@ -58,29 +71,28 @@ export type TrackSegment = {
|
||||
};
|
||||
|
||||
export type TrackPoint = {
|
||||
lat: number;
|
||||
lon: number;
|
||||
attributes: Coordinates;
|
||||
ele?: number;
|
||||
time?: Date;
|
||||
extensions?: TrackPointExtensions;
|
||||
};
|
||||
|
||||
export type TrackPointExtensions = {
|
||||
TrackPointExtension?: TrackPointExtension;
|
||||
PowerExtension?: PowerExtension;
|
||||
'gpxtpx:TrackPointExtension'?: TrackPointExtension;
|
||||
'gpxpx:PowerExtension'?: PowerExtension;
|
||||
};
|
||||
|
||||
export type TrackPointExtension = {
|
||||
hr?: number;
|
||||
cad?: number;
|
||||
atemp?: number;
|
||||
Extensions?: {
|
||||
'gpxtpx:hr'?: number;
|
||||
'gpxtpx:cad'?: number;
|
||||
'gpxtpx:atemp'?: number;
|
||||
'gpxtpx:Extensions'?: {
|
||||
surface?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type PowerExtension = {
|
||||
PowerInWatts?: number;
|
||||
'gpxpx:PowerInWatts'?: number;
|
||||
}
|
||||
|
||||
export type Author = {
|
||||
|
Reference in New Issue
Block a user