mapbox-gl-directions icon indicating copy to clipboard operation
mapbox-gl-directions copied to clipboard

Get duration, distance and weight-name to calculate further

Open Lenn1K opened this issue 2 years ago • 0 comments

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!

Lenn1K avatar Sep 12 '22 12:09 Lenn1K