Open gwuah opened 4 years ago
Currently, the matrix module only returns durations. But there's an option to also return distances. (https://docs.mapbox.com/api/navigation/#matrix)
durations
distances
So a fix would be to extend request opts to this
type RequestOpts struct { Sources string `url:"sources,omitempty"` Destinations string `url:"destinations,omitempty"` Annotations string `url:"annotations,omitempty"` }
and then add setters for annotations. (setSources, setDestinations, setAnnotation) ..
I'm ready to submit a pr, I just need you to confirm if this is a feature you'd wan't to merge.
sounds good to me! if it's possible it'd be great to add a test for each variant of this, and looks like we'd also need a Distances field on the DirectionMatrixResponse here to receive both results.
Distances
DirectionMatrixResponse
Currently, the matrix module only returns
durations
. But there's an option to also returndistances
. (https://docs.mapbox.com/api/navigation/#matrix)So a fix would be to extend request opts to this
and then add setters for annotations. (setSources, setDestinations, setAnnotation) ..
I'm ready to submit a pr, I just need you to confirm if this is a feature you'd wan't to merge.