adds elevation loss for trails
This commit is contained in:
@@ -5,7 +5,7 @@ class SummitLog {
|
||||
date: string;
|
||||
text?: string;
|
||||
gpx?: string;
|
||||
_gpx: File | Blob | null;
|
||||
_gpx: File | null;
|
||||
distance?: number
|
||||
elevation_gain?: number
|
||||
elevation_loss?: number
|
||||
@@ -17,11 +17,15 @@ class SummitLog {
|
||||
trails_via_summit_logs?: Trail[];
|
||||
}
|
||||
|
||||
constructor(date: string, params?: { id?: string, text?: string }) {
|
||||
constructor(date: string, params?: { id?: string, text?: string, distance?: number, elevation_loss?: number, elevation_gain?: number, duration?: number }) {
|
||||
this.date = date;
|
||||
this.id = params?.id;
|
||||
this.text = params?.text ?? "";
|
||||
this.expand = {}
|
||||
this.distance = params?.distance
|
||||
this.elevation_gain = params?.elevation_gain
|
||||
this.elevation_loss = params?.elevation_loss
|
||||
this.duration = params?.duration
|
||||
this._gpx = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ class Trail {
|
||||
public: boolean;
|
||||
distance?: number;
|
||||
elevation_gain?: number;
|
||||
elevation_loss?: number;
|
||||
duration?: number;
|
||||
difficulty?: "easy" | "moderate" | "difficult"
|
||||
lat?: number;
|
||||
@@ -43,6 +44,7 @@ class Trail {
|
||||
public?: boolean,
|
||||
distance?: number,
|
||||
elevation_gain?: number,
|
||||
elevation_loss?: number,
|
||||
duration?: number,
|
||||
difficulty?: "easy" | "moderate" | "difficult",
|
||||
lat?: number,
|
||||
@@ -68,6 +70,7 @@ class Trail {
|
||||
this.public = params?.public ?? false
|
||||
this.distance = params?.distance;
|
||||
this.elevation_gain = params?.elevation_gain;
|
||||
this.elevation_loss = params?.elevation_loss;
|
||||
this.duration = params?.duration;
|
||||
this.difficulty = params?.difficulty ?? "easy";
|
||||
this.lat = params?.lat;
|
||||
|
||||
Reference in New Issue
Block a user