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

Stick to chosen alternative route after rerouting proactively #1211

Closed
1ec5 opened this issue Mar 7, 2018 · 3 comments
Closed

Stick to chosen alternative route after rerouting proactively #1211

1ec5 opened this issue Mar 7, 2018 · 3 comments
Labels

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 7, 2018

As of #995, we stick to the chosen route (whether the primary route or an alternative route) when rerouting due to the user going off-route. However, RouteController can still ignore this choice when proactively rerouting based on the reroutesOpportunistically option.

/ref #818
/cc @bsudekum @brsbl

@1ec5 1ec5 added bug Something isn’t working topic: directions topic: traffic labels Mar 7, 2018
@bsudekum
Copy link
Contributor

bsudekum commented Mar 7, 2018

checkForFasterRoute calls getDirections which does actually seek to use the most similar route:

https://github.com/mapbox/mapbox-navigation-ios/blob/master/MapboxCoreNavigation/RouteController.swift#L848

@1ec5 it looks like we are trying to stick to the same route, or am I missing something here?

@1ec5
Copy link
Contributor Author

1ec5 commented Mar 9, 2018

Did you mean to link to this method?

func updateSpokenInstructionProgress(for location: CLLocation) {

I’m not sure what it has to do with proactive rerouting.

@1ec5
Copy link
Contributor Author

1ec5 commented Mar 9, 2018

Ah, you’re right, not sure how I missed that:

getDirections(from: location) { [weak self] (route, error) in

if let route = self?.mostSimilarRoute(in: routes) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants