Improving TrkSegViewer

This commit is contained in:
vdv committed 2023-01-07 18:46:14 +01:00
1 parent 7483d9f904
commit 1f2979b28b
6 files changed
+51 -14

No files matched your search

+8
View File
@@ -48,3 +48,11 @@ export const putNewTrkpt = async (id?: IdTrk | IdGpx | IdTrkseg | IdTrkpt) => {
);
return finalId;
};
export const putTrkpt = async (params: any) => {
const { id, trkpt } = params;
trkpt.id = undefined;
await put(id, 'trkpt', (doc) => trkpt, trkpt);
return trkpt;
};
+1
View File
@@ -41,6 +41,7 @@ export const getTrkseg = async (params: any) => {
//level 1
if (row.doc.type === 'trkpt') {
target.splice(1);
row.doc.doc.id = row.doc._id;
appendToArray(target.at(-1), row.doc.type, row.doc.doc);
target.push(row.doc.doc);
}