RouteLegProgress
open class RouteLegProgress: NSObject
RouteLegProgress stores the user’s progress along a route leg.
-
Returns the current
RouteLeg.Declaration
Swift
public let leg: RouteLeg -
Index representing the current step.
Declaration
Swift
public var stepIndex: Int -
Total distance traveled in meters along current leg.
Declaration
Swift
public var distanceTraveled: CLLocationDistance -
Duration remaining in seconds on current leg.
Declaration
Swift
public var durationRemaining: TimeInterval -
Number between 0 and 1 representing how far along the current leg the user has traveled.
Declaration
Swift
public var fractionTraveled: Double -
AlertLevelfor the current step.Declaration
Swift
public var alertUserLevel: AlertLevel = .none -
Returns the
RouteStepbefore a given step. Returnsnilif there is no step prior.Declaration
Swift
public func stepBefore(_ step: RouteStep) -> RouteStep? -
Returns the
RouteStepafter a given step. Returnsnilif there is not a step after.Declaration
Swift
public func stepAfter(_ step: RouteStep) -> RouteStep? -
Returns the
RouteStepbefore the current step.If there is no
priorStep, nil is returned.Declaration
Swift
public var priorStep: RouteStep? -
Returns the current
RouteStepfor the leg the user is on.Declaration
Swift
public var currentStep: RouteStep -
Returns the upcoming
RouteStep.If there is no
upcomingStep, nil is returned.Declaration
Swift
public var upComingStep: RouteStep? -
Returns step 2 steps ahead.
If there is no
followOnStep, nil is returned.Declaration
Swift
public var followOnStep: RouteStep? -
Return bool whether step provided is the current
RouteStepthe user is on.Declaration
Swift
public func isCurrentStep(_ step: RouteStep) -> Bool -
Returns the progress along the current
RouteStep.Declaration
Swift
public var currentStepProgress: RouteStepProgress -
Intializes a new
RouteLegProgress.Declaration
Swift
public init(leg: RouteLeg, stepIndex: Int = 0)Parameters
legLeg on a
Route.stepIndexCurrent step the user is on.
-
Returns an array of
CLLocationCoordinate2Dof the prior, current and upcoming step geometry.Declaration
Swift
public var nearbyCoordinates: [CLLocationCoordinate2D]
Install in Dash
RouteLegProgress Class Reference