Skip to content
Discussion options

You must be logged in to vote

I didn't debug the code, but aren't you assuming the distance between every two points is identical?
I think this might cause the shift you are seeing.
Here's the code I'm using to present slope on my routes:
https://github.com/IsraelHikingMap/Site/blob/de911cb386f7279cb2c489b84602440470768da8/IsraelHiking.Web/src/application/components/route-statistics.component.ts#L980

It calculates the length of the route first (in meters) and then calculates the slopes according to the relative place in the route's distance.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shrijitsingh99
Comment options

Answer selected by shrijitsingh99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #5438 on February 02, 2025 11:50.