RouteStepProgress
@objc(MBRouteStepProgress)
open class RouteStepProgress : NSObject
RouteStepProgress
stores the user’s progress along a route step.
-
Returns the current
RouteStep
.Declaration
Swift
@objc public let step: RouteStep
-
Returns distance user has traveled along current step.
Declaration
Swift
@objc public var distanceTraveled: CLLocationDistance
-
Returns distance from user to end of step.
Declaration
Swift
@objc public var userDistanceToManeuverLocation: CLLocationDistance
-
Total distance in meters remaining on current step.
Declaration
Swift
@objc public var distanceRemaining: CLLocationDistance { get }
-
Number between 0 and 1 representing fraction of current step traveled.
Declaration
Swift
@objc public var fractionTraveled: Double { get }
-
Number of seconds remaining on current step.
Declaration
Swift
@objc public var durationRemaining: TimeInterval { get }
-
Intializes a new
RouteStepProgress
.Declaration
Swift
@objc public init(step: RouteStep, spokenInstructionIndex: Int = 0)
Parameters
step
Step on a
RouteLeg
. -
All intersections on the current
RouteStep
and also the first intersection on the upcomingRouteStep
.The upcoming
RouteStep
firstIntersection
is added because it is omitted from the current step.Declaration
Swift
@objc public var intersectionsIncludingUpcomingManeuverIntersection: [Intersection]?
-
The next intersection the user will travel through.
The step must contain
intersectionsIncludingUpcomingManeuverIntersection
otherwise this property will benil
.Declaration
Swift
@objc public var upcomingIntersection: Intersection? { get }
-
Index representing the current intersection.
Declaration
Swift
@objc public var intersectionIndex: Int
-
The current intersection the user will travel through.
The step must contain
intersectionsIncludingUpcomingManeuverIntersection
otherwise this property will benil
.Declaration
Swift
@objc public var currentIntersection: Intersection? { get }
-
Returns an array of the calculated distances from the current intersection to the next intersection on the current step.
Declaration
Swift
@objc public var intersectionDistances: Array<CLLocationDistance>?
-
The distance in meters the user is to the next intersection they will pass through.
Declaration
Swift
public var userDistanceToUpcomingIntersection: CLLocationDistance?
-
Index into
step.instructionsDisplayedAlongStep
representing the current visual instruction for the step.Declaration
Swift
@objc public var visualInstructionIndex: Int
-
An
Array
of remainingVisualInstruction
for a step.Declaration
Swift
@objc public var remainingVisualInstructions: [VisualInstructionBanner]? { get }
-
Index into
step.instructionsSpokenAlongStep
representing the current spoken instruction.Declaration
Swift
@objc public var spokenInstructionIndex: Int
-
An
Array
of remainingSpokenInstruction
for a step.Declaration
Swift
@objc public var remainingSpokenInstructions: [SpokenInstruction]? { get }
-
Current spoken instruction for the user’s progress along a step.
Declaration
Swift
@objc public var currentSpokenInstruction: SpokenInstruction? { get }
-
Current visual instruction for the user’s progress along a step.
Declaration
Swift
@objc public var currentVisualInstruction: VisualInstructionBanner? { get }