Starting again with what has been developed as sandbox/map.
This commit is contained in:
1 parent
f81c436f7d
commit
716d05fb3e
17 files changed
+807
-268
No files matched your search
@@ -1,26 +0,0 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
const initialState: any = {
|
||||
current: {
|
||||
$: {},
|
||||
trk: [
|
||||
{
|
||||
trkseg: [{ trkpt: [] }],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export const appendTrkpt = (gpx:any , trkpt:any) => {
|
||||
var updatedGpx = _.cloneDeep(gpx);
|
||||
updatedGpx.trk[0].trkseg[0].trkpt.push(trkpt);
|
||||
return updatedGpx;
|
||||
};
|
||||
|
||||
export const clearTrkpt = (gpx:any) => {
|
||||
var updatedGpx = _.cloneDeep(gpx);
|
||||
updatedGpx.trk[0]=[];
|
||||
return updatedGpx;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user