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

Disable proactive rerouting, route refreshing after map matching #79

Open
1ec5 opened this issue Oct 12, 2020 · 0 comments
Open

Disable proactive rerouting, route refreshing after map matching #79

1ec5 opened this issue Oct 12, 2020 · 0 comments
Labels
improvement Improvement for an existing feature.

Comments

@1ec5
Copy link
Contributor

1ec5 commented Oct 12, 2020

The “Custom Server” example relies on the Map Matching API to derive a route from a series of waypoints. This example is intended for a “Bring Your Own Route” use case where the waypoints are control points from a route produced by another routing engine. In that case, proactive rerouting would automatically undo any customization implemented through the BYOR workflow. The route refreshing functionality added in mapbox/mapbox-navigation-ios#2284 would also fail because the route doesn’t come from the Directions API but is instead synthesized on the client-side.

The navigation SDK has no way to distinguish a Route obtained through Directions.calculateRoutes(matching:completionHandler:) from one obtained through calculate(_:completionHandler:). So it falls to the developer to disable proactive rerouting and route refreshing manually:

let router = navigationViewController.navigationService.router
router.reroutesProactively = false
router.refreshesRoute = false

We should add these lines to the “Custom Server” example:

https://github.com/mapbox/navigation-ios-examples/blob/e85b6f530e7b6a0e9fe8f18f5d22472323e43eb7/Navigation-Examples/Examples/Custom-Server.swift#L30-L33

/cc @mapbox/navigation-ios

@1ec5 1ec5 added the improvement Improvement for an existing feature. label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement for an existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant