aboutsummaryrefslogtreecommitdiff
path: root/web/views.go
diff options
context:
space:
mode:
Diffstat (limited to 'web/views.go')
-rw-r--r--web/views.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/views.go b/web/views.go
index ddea27e..952b045 100644
--- a/web/views.go
+++ b/web/views.go
@@ -113,6 +113,7 @@ func (profile RideProfile) UnmatchedClimbs() []RideProfileClimb {
}
type RideProfilePoint struct {
+ Index int `json:"index"`
DistanceKm float64 `json:"distanceKm"`
ElevationM float64 `json:"elevationM"`
Latitude float64 `json:"latitude"`
@@ -353,6 +354,7 @@ func buildRideProfile(parsed ride.Ride, passes []mountain_pass.MountainPass, off
}
for i, coordinate := range coords {
profile.Points[i] = RideProfilePoint{
+ Index: i,
DistanceKm: distances[i] / 1000,
ElevationM: elevations[i],
Latitude: coordinate.Lat,