Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Display gradient/slope on Track/Route. #62

Open
nevvkid opened this issue Aug 13, 2024 · 2 comments
Open

[Feature Request] Display gradient/slope on Track/Route. #62

nevvkid opened this issue Aug 13, 2024 · 2 comments

Comments

@nevvkid
Copy link

nevvkid commented Aug 13, 2024

Something I would love to see in the future is the option to show the gradient / slope directly on the Track/Route.

For Leaflet there is the following plugin to realize that:

As to my understanding you are using Mapbox for the whole rendering of Maps?
The only reference i found with a quick search was that: https://docs.mapbox.com/mapbox-gl-js/example/line-gradient/

Seeing the slope in context rather than in the elevation helps me understand the route better and sometimes even helps me choosing a longer > less steep path.
Especially if i am on my way with a very heavy setup of my bike.

Here is an example how this looks in bikerouter.de
image

Another example - cyclers.app

image

Perhaps the feature to render certain route qualities could be used for different features in the future?

  • Altitute
  • Surface (Quality or Dirt/Paved)

Another tool I know which I would never want to use over gpx.studio is LAND...
https://support.twonav.com/hc/en-us/articles/115001078511-Customize-the-appearance-of-the-tracks

@nevvkid nevvkid changed the title [Feature Request] Display gradient on Track/Route. [Feature Request] Display gradient/slope on Track/Route. Aug 14, 2024
@vcoppe
Copy link
Contributor

vcoppe commented Aug 19, 2024

This is something I also had in mind, and thought would be easy to add thanks to the resource that you linked.

The only reference i found with a quick search was that: https://docs.mapbox.com/mapbox-gl-js/example/line-gradient/

Unfortunately, there is not straightforward way to generalize this to specify a color stop for each GPS point, based on a data field (see mapbox/mapbox-gl-js#8977). Maybe the most promising solution would be mapbox/mapbox-gl-js#8977 (comment), because other ones involve splitting the lines in many segments to create a sequence of many line gradients.

@nevvkid
Copy link
Author

nevvkid commented Aug 19, 2024

I am wondering what is used for Strava's "PAVED", "DIRT" and "NOT SPECIFIED" Map Styles. As that was another design feature I was hoping to see in gpx.studio in the future.
image

But not sure if there is one strategy for all these different styling needs.

Reading some github issues in the mapbox gl js repo it seems like some things aren't easy todo.
For the design used for "NOT SPECIFIED" this might be an approach: https://codepen.io/joedazza/pen/QWwKRKP
Does what you found at mapbox/mapbox-gl-js#8977 (comment) allow to get consistent results or is that just impossible without recalculating every file so you have an even amount of points spacing it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants