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

Integrate an elevation chart in popup #2311

Open
yohanboniface opened this issue Dec 1, 2024 · 1 comment
Open

Integrate an elevation chart in popup #2311

yohanboniface opened this issue Dec 1, 2024 · 1 comment

Comments

@yohanboniface
Copy link
Member

When using uMap for trekking, it could be very useful to have an elevation chart option, when the feature is a LineString which has the altitude defined ([lon, lat, alt]) (which is generally the case when importing a GPX for example).

There are a few Leaflet plugins for that:

See also https://github.com/slutske22/leaflet-topography which compute the lat by using the DEM (through Mapbox API, but we may find an open source one maybe).

Though I'm not sure we need a Leaflet plugin in this case, so certainly the choice is between D3.js and Chart.js.

Example with D3: https://gist.github.com/pgiraud/8938194 / https://ahrjarrett.com/posts/2019-02-11-draw-an-interactive-elevation-chart-with-d3-and-react
Example with Chart.js: https://jsfiddle.net/Geoapify/2pjhyves

@yohanboniface
Copy link
Member Author

See also https://github.com/perliedman/geojson-elevation for adding elevation data to a geojson

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

No branches or pull requests

1 participant