Changing Gpx and Trkpt indexes so that GPX are sorted by datetime desc and Trkpt use their timestamp as indexes.

This commit is contained in:
vdv committed 2022-12-10 18:31:51 +01:00
1 parent be72adce05
commit 86a8c823f1
4 files changed
+25 -10

No files matched your search

+2 -2
View File
@@ -21,9 +21,9 @@ const GpxImport: Component = () => {
'load',
() => {
// this will then display a text file
console.log(fileReader.result);
console.log({ caller: 'GpxImport / XML', result: fileReader.result });
const gpx = GPX.parse(fileReader.result);
console.log(`gpx: ${JSON.stringify(gpx)}`);
console.log({ caller: 'GpxImport / JSON', gpx });
if (gpx) {
const startTime = new Date(findStartTime(gpx)!);
dispatch({