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

Allow user to provide anotations in query params #28

Open
gwuah opened this issue Sep 25, 2020 · 1 comment
Open

Allow user to provide anotations in query params #28

gwuah opened this issue Sep 25, 2020 · 1 comment

Comments

@gwuah
Copy link

gwuah commented Sep 25, 2020

Currently, the matrix module only returns durations.
But there's an option to also return distances. (https://docs.mapbox.com/api/navigation/#matrix)

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.

@ryankurte
Copy link
Owner

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.

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