public protocol RoutePlanner
This planner calculates a route between an origin and a destination, passing through waypoints (if specified). Additional routing parameters like traffic, things to avoid, departure/arrival time, etc. can be taken into account using
This is a Public Preview API. It may be changed or removed at any time.
func planRoute( options: RoutePlanningOptions, onRouteReady: ((TomTomSDKRoute.Route) -> ())?, completion: @escaping (Result<RoutePlanningResponse, Error>) -> () )
The onRouteReady closure is called for each route that has been planned successfully.
The completion closure is called after the response to the request has been processed. If no errors occurred,
RoutingResponsecontains an array of routes between an origin and a destination.
Cancels all current requests.
This planner calculates route contents (instructions, lane guidance) within its certain part using the provided [RouteIncrementOptions] object.
Note: It’s currently expected that only following Route contents will be updated: Route.legs(i).instructions Route.laneSections
ImportantThis is a Public Preview API. It may be changed or removed at any time.
func advanceGuidanceProgress(with options: RouteIncrementOptions) -> Result<TomTomSDKRoute.Route, Error>
RoutePlanningOptions. Note: Route ETA should be updated outside [increment] call
If the call succeeds, return a Route. If it fails, return an Error.