OfflineRoutePlanner
public final class OfflineRoutePlanner : RoutePlanner
extension OfflineRoutePlanner: OnStoreAccessChangedObserver
Onboard planner that plans a route from an origin and to a destination, passing through waypoints (if specified).
Important
This is a Public Preview API. It may be changed or removed at any time.-
Defines the error cases that can occur while planning a trip.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public enum PlanError : Error
-
Plans a route according to the parameters set in the TomTomSDKRoutePlanner.RoutePlanningOptions.
Declaration
Swift
public func planRoute( options: TomTomSDKRoutePlanner.RoutePlanningOptions, onRouteReady: ((TomTomSDKRoute.Route) -> ())?, completion: @escaping (Result<TomTomSDKRoutePlanner.RoutingResponse, Error>) -> () )
Parameters
routing_request
Request that contains information needed for successful route planning.
Return Value
Result which contains either a planned route in RoutingResponse or an error.
-
Cancels all current requests.
Declaration
Swift
public func cancelPendingRequests()
-
This function 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
Declaration
Swift
public func advanceGuidanceProgress(with options: RouteIncrementOptions) -> Result<TomTomSDKRoute.Route, Error>
Parameters
options
The
RoutePlanningOptions
. Note: Route ETA should be updated outside [increment] callReturn Value
If the call succeeds, return a Route. If it fails, return an Error.
-
Declaration
Swift
public var onStoreAccessChangedObserverId: String { get }
-
Declaration
Swift
public func onReadOnlyAccessGranted(mapChanged: Bool)
-
Declaration
Swift
public func onReadOnlyAccessReleaseRequested(accessReleased: @escaping () -> ())