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

Add support for baseUrl #630

Closed
wants to merge 1 commit into from
Closed

Add support for baseUrl #630

wants to merge 1 commit into from

Conversation

vkucalo
Copy link

@vkucalo vkucalo commented Jan 4, 2018

Related to #609

Whenever a recalculation occurs, the fetchRoute method in RouteViewModel creates a new instance of NavigationRoute which only retains the destination of the original route.

This fix takes care of the baseUrl, but does not address other parameters which get lost (waypoints etc..). Perhaps extending the NavigationViewOptions & RouteViewModel with an additional NavigationRoute member could help?

@danesfeder
Copy link
Contributor

Hey @vkucalo, thanks for the contribution! This is definitely an issue with our RouteViewModel that we are working to address upstream in https://github.com/mapbox/mapbox-java. A DirectionsRoute has a RouteOptions that has all of the variables needed to make a new route request with the same settings (except for waypoints).

mapbox/mapbox-java#693 landed allowing us to hold track these waypoints in the RouteViewModel and remove ones that we arrive at throughout navigation.

I'm also looking to add an API in NavigationRoute that takes a RouteOptions and recreates the same request with those parameters - https://github.com/mapbox/mapbox-navigation-android/pull/638/files#diff-4744492a2b8266672b6056de6029fee9R437

Let me know what you think and thanks again.

@danesfeder
Copy link
Contributor

Hey @vkucalo, thanks again for this contribution. #638 landed with the ability to use DirectionsRoute#routeOptions when building a new directions request with NavigationRoute.Builder#routeOptions. Let us know if you have any questions about how this works - more than happy to help. Going ahead and closing this as the idea can now be accomplished.

@danesfeder danesfeder closed this Feb 16, 2018
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

Successfully merging this pull request may close these issues.

2 participants