LegacyRouteController
open class LegacyRouteController : NSObject, Router, InternalRouter, CLLocationManagerDelegate
-
Declaration
Swift
public unowned var dataSource: RouterDataSource -
A reference to a MapboxDirections service. Used for rerouting.
Declaration
Swift
@available(*, deprecated, message: "Use `customRoutingProvider` instead. If route controller was not initialized using `Directions` object - this property is unused and ignored.") public lazy var directions: Directions { get set } -
RoutingProvider, used to create a route during refreshing or rerouting.Declaration
Swift
@available(*, deprecated, message: "Use `customRoutingProvider` instead. This property will be equal to `customRoutingProvider` if that is provided or a `MapboxRoutingProvider` instance otherwise.") public lazy var routingProvider: RoutingProvider { get set } -
Custom
RoutingProvider, used to create a route during refreshing or rerouting.Declaration
Swift
public var customRoutingProvider: RoutingProvider? -
Declaration
Swift
public var route: Route { get } -
Declaration
Swift
public internal(set) var indexedRouteResponse: IndexedRouteResponse { get set }
-
Declaration
Swift
public weak var delegate: RouterDelegate? -
Declaration
Swift
public internal(set) var routeProgress: RouteProgress { get set } -
Declaration
Swift
public var location: CLLocation? { get } -
Declaration
Swift
public var heading: CLHeading? -
The most recently received user location.
Note
This is a raw location received fromlocationManager. To obtain an idealized location, use thelocationproperty.Declaration
Swift
public var rawLocation: CLLocation? { get set }
-
Declaration
Swift
public var reroutesProactively: Bool -
Declaration
Swift
public var initialManeuverAvoidanceRadius: TimeInterval -
Controls whether the route controller automatically updates ETA and traffic congestion data.
When enabled, the route controller periodically refreshes route information at intervals defined by
RouteControllerProactiveReroutingInterval. By default, route refreshing is enabled only for routes using.automobileAvoidingTrafficor anotherdriving-trafficprofile. IfreroutesProactivelyis also enabled, the route controller runs the rerouting check after the route refresh completes.Important
Route refresh is currently supported only fordriving-trafficprofiles. Enabling this property for other profiles (such as walking, cycling, or standard driving) may result in server errors or undefined behavior.Declaration
Swift
public var refreshesRoute: Bool { get set } -
LegacyRouteControllerdoes not support continuous alternatives.This array will always be empty.
Declaration
Swift
public private(set) var continuousAlternatives: [AlternativeRoute] { get }
-
The threshold used when we determine when the user has arrived at the waypoint. By default, we claim arrival 5 seconds before the user is physically estimated to arrive.
Declaration
Swift
public var waypointArrivalThreshold: TimeInterval -
Declaration
Swift
public func updateRoute(with indexedRouteResponse: IndexedRouteResponse, routeOptions: RouteOptions?, completion: ((Bool) -> Void)?) -
Declaration
Swift
public func advanceLegIndex(completionHandler: AdvanceLegCompletionHandler? = nil) -
Declaration
Swift
public var reroutingTolerance: CLLocationDistance { get } -
Declaration
Swift
public func userIsOnRoute(_ location: CLLocation) -> Bool -
Declaration
Swift
public convenience init(alongRouteAtIndex routeIndex: Int, in routeResponse: RouteResponse, options: RouteOptions, directions: Directions = NavigationSettings.shared.directions, dataSource source: RouterDataSource) -
Declaration
Swift
@available(*, deprecated, renamed: "init(indexedRouteResponse:customRoutingProvider:dataSource:﹚") required public convenience init(alongRouteAtIndex routeIndex: Int, in routeResponse: RouteResponse, options: RouteOptions, routingProvider: RoutingProvider = Directions.shared, dataSource source: RouterDataSource) -
Declaration
Swift
@available(*, deprecated, renamed: "init(indexedRouteResponse:customRoutingProvider:dataSource:﹚") required public convenience init(alongRouteAtIndex routeIndex: Int, in routeResponse: RouteResponse, options: RouteOptions, customRoutingProvider: RoutingProvider? = nil, dataSource source: RouterDataSource) -
Declaration
Swift
required public init(indexedRouteResponse: IndexedRouteResponse, customRoutingProvider: RoutingProvider?, dataSource source: RouterDataSource) -
Declaration
Swift
public func finishRouting()
-
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) -
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) -
Declaration
Swift
public func reroute(from location: CLLocation, along progress: RouteProgress)
Install in Dash
LegacyRouteController Class Reference