mapbox / mapbox/mapbox-gl-directions
Get duration, distance and weight-name to calculate further
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 255
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
Hey folks,
Absolute beginner with APIs in general and more so with Mapbox here.
I'm a student develoving a web-app for school and i'm using Mapbox GL JS with the directions plugin to calculate a route.
I now would love to get the values of "weight-name", "distance" and "duration" to make some calculations in my app.
How can i get these? Is there for example a function that returns the response JSON back to me?
Any nudge in the right direction is much appreciated, thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named; begin with the Mapbox GL JS directions plugin's returned response JSON and determine where weight-name, distance, and duration are exposed. Done would mean documenting or demonstrating how an application can read those values, but the issue does not define a repository change or acceptance test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend, web-dev
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100