RouteReplanningEngine
public protocol RouteReplanningEngine
Engine responsible for replanning a route.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Selector responsible for choosing the best route from a refreshed route and it’s alternatives
Declaration
Swift
var betterRouteSelector: BetterRouteSelector { get set } -
Refreshes a given
Routewhen it needs to be refreshedDeclaration
Swift
func replanToRefresh( parameters: RouteReplanParameters, completion: @escaping (RouteReplanningResult) -> () ) throwsParameters
parametersParameters for a route replan.
completionCompletion block with a result of refresh operation.
-
Plans a new
Routewhen the user has deviated from the previous.Declaration
Swift
func replanOnDeviation( parameters: RouteReplanParameters, completion: @escaping (RouteReplanningResult) -> () ) throwsParameters
parametersParameters for a route replan.
completionCompletion block with a result of refresh operation.
-
Checks if it is time to refresh the current route. This function might be called on every location update, so it is the engine’s responsibility to limit the replanning frequency.
Declaration
Swift
func shouldReplanRoute() -> Bool
RouteReplanningEngine Protocol Reference