map routepoint to trackpoint explicitly
This commit is contained in:
parent
082276d71d
commit
0d6fe4093f
1 changed files with 9 additions and 3 deletions
|
|
@ -1579,10 +1579,16 @@ function convertRouteToTrack(route: RouteType): Track {
|
||||||
route.rtept.forEach((rpt) => {
|
route.rtept.forEach((rpt) => {
|
||||||
if (rpt.extensions && rpt.extensions['gpxx:RoutePointExtension'] && rpt.extensions['gpxx:RoutePointExtension']["gpxx:rpt"]) {
|
if (rpt.extensions && rpt.extensions['gpxx:RoutePointExtension'] && rpt.extensions['gpxx:RoutePointExtension']["gpxx:rpt"]) {
|
||||||
rpt.extensions['gpxx:RoutePointExtension']["gpxx:rpt"].forEach((rptExtension) => {
|
rpt.extensions['gpxx:RoutePointExtension']["gpxx:rpt"].forEach((rptExtension) => {
|
||||||
segment.trkpt.push(new TrackPoint(rptExtension as TrackPointType));
|
segment.trkpt.push(new TrackPoint({
|
||||||
|
attributes: rptExtension.attributes,
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
segment.trkpt.push(new TrackPoint(rpt as TrackPointType));
|
segment.trkpt.push(new TrackPoint({
|
||||||
|
attributes: rpt.attributes,
|
||||||
|
ele: rpt.ele,
|
||||||
|
time: rpt.time,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue