Improving TrkSegViewer
This commit is contained in:
1 parent
7483d9f904
commit
1f2979b28b
6 files changed
+51
-14
No files matched your search
@@ -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;
|
||||
};
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user