Starting to implement a proper UI for GPX import.
This commit is contained in:
1 parent
3a5f5260c8
commit
31bec02496
7 files changed
+165
-57
No files matched your search
@@ -3,10 +3,16 @@ import Link from './link';
|
||||
export default class Waypoint {
|
||||
constructor(object) {
|
||||
this.$ = {};
|
||||
this.$.lat = object.$.lat === 0 || object.lat === 0 ? 0 : object.$.lat || object.lat || -1;
|
||||
this.$.lon = object.$.lon === 0 || object.lon === 0 ? 0 : object.$.lon || object.lon || -1;
|
||||
this.$.lat =
|
||||
object.$.lat === 0 || object.lat === 0
|
||||
? 0
|
||||
: object.$.lat || object.lat || -1;
|
||||
this.$.lon =
|
||||
object.$.lon === 0 || object.lon === 0
|
||||
? 0
|
||||
: object.$.lon || object.lon || -1;
|
||||
this.ele = object.ele;
|
||||
this.time = object.time ? new Date(object.time) : new Date();
|
||||
this.time = object.time ? new Date(object.time) : undefined;
|
||||
this.magvar = object.magvar;
|
||||
this.geoidheight = object.geoidheight;
|
||||
this.name = object.name;
|
||||
@@ -26,7 +32,7 @@ export default class Waypoint {
|
||||
if (!Array.isArray(object.link)) {
|
||||
object.link = [object.link];
|
||||
}
|
||||
this.link = object.link.map(l => new Link(l));
|
||||
this.link = object.link.map((l) => new Link(l));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user