fix null in showing
Gitea Actions Demo / build_and_push (push) Successful in 1m14s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m14s
Details
This commit is contained in:
parent
ad568cd9bb
commit
5bdf717731
|
|
@ -244,12 +244,20 @@ const initWorkout = (id: string) => {
|
|||
let coords = [];
|
||||
let elevation = [];
|
||||
for (let i in response.data.results) {
|
||||
elevation.push(response.data.results[i].elevation);
|
||||
times.push(response.data.results[i].timestamp);
|
||||
speed.push(msToKmh(response.data.results[i].speed));
|
||||
power.push(response.data.results[i].power);
|
||||
heart_rate.push(response.data.results[i].heart_rate);
|
||||
coords.push([response.data.results[i].longitude, response.data.results[i].latitude]);
|
||||
if (response.data.results[i].elevation) {
|
||||
elevation.push(response.data.results[i].elevation);
|
||||
}
|
||||
if (response.data.results[i].speed) {
|
||||
speed.push(msToKmh(response.data.results[i].speed));
|
||||
}
|
||||
if (response.data.results[i].power) {
|
||||
power.push(response.data.results[i].power);
|
||||
}
|
||||
if (response.data.results[i].heart_rate) {
|
||||
heart_rate.push(response.data.results[i].heart_rate);
|
||||
}
|
||||
}
|
||||
lineCoordinates.value = coords
|
||||
mapCenter.value = [coords[0][0], coords[0][1]];
|
||||
|
|
|
|||
Loading…
Reference in New Issue