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

Use unrecognised properties of RouteOptions for requests via MapboxDirections #1431

Open
VysotskiVadim opened this issue May 5, 2022 · 0 comments

Comments

@VysotskiVadim
Copy link
Contributor

Unrecognised properties of RouteOptions are used only in RouteOptions.toUrl(). Unrecognised properties are ignored if you do request via MapboxDirections:

val client = MapboxDirections.builder().accessToken(getMapboxAccessTokenFromResources()).routeOptions(routeOptions).build()

        client.enqueueCall(object : Callback<DirectionsResponse> {
            override fun onResponse(
                call: Call<DirectionsResponse>,
                response: Response<DirectionsResponse>
            ) {
                Log.d(TAG, "onResponse: what")
                if (response.isSuccessful) {
                    Log.d(TAG, "onResponse: hello")
                    val body = response.body()!!
                    mapboxNavigation.setRoutes(body.routes())
                    Log.d(TAG, "onResponse: ${body.routes()}")
                }
            }

            override fun onFailure(call: Call<DirectionsResponse>, t: Throwable) {}
        })

Add support of unrecognised properties from RouteOptions to MapboxDirections

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

2 participants