OfflineRoutePlanner
public final class OfflineRoutePlanner : RoutePlanner
Offline planner that plans a route from an origin to a destination, passing through waypoints (if specified).
-
Defines the error cases that can occur while planning a trip.
See moreDeclaration
Swift
@available(*, deprecated, renamed: "TomTomSDKRoutingCommon.RoutingError", message: "This API is deprecated and will be removed with the next major release.") public enum PlanError : Error -
Plans a route according to the parameters set in the RoutePlanningOptions.
Declaration
Swift
public func planRoute( options: RoutePlanningOptions, onRouteReady: ((Route) -> ())?, completion: @escaping (Result<RoutePlanningResponse, Error>) -> () )Parameters
optionsRoutePlanningOptionsthat contains parameters for route planningonRouteReadyClosure executed whenever a route is done planning
completionClosure called when planning is done (successfully or with an error)
-
Cancels all current planning requests.
Declaration
Swift
public func cancelPendingRequests() -
This function calculates route contents (instructions, lane guidance) within its certain part using the provided
RouteIncrementOptionsobject.Note
Route ETA should be updated outside
advanceGuidanceProgresscallNote
It’s currently expected that only following Route contents will be updated: Route.legs(i).instructions Route.laneSections
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func advanceGuidanceProgress(with options: RouteIncrementOptions) -> Result<Route, Error>Parameters
optionsReturn Value
If the call succeeds, return a
Route. If it fails, return anError.
TomTom SDK for iOS (0.53.1)
OfflineRoutePlanner