RouteStepProgress
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 = 0
-
Returns distance from user to end of step.
Declaration
Swift
@objc public var userDistanceToManeuverLocation: CLLocationDistance = Double.infinity
-
Total distance in meters remaining on current step.
Declaration
Swift
@objc public var distanceRemaining: CLLocationDistance
-
Number between 0 and 1 representing fraction of current step traveled.
Declaration
Swift
@objc public var fractionTraveled: Double
-
Number of seconds remaining on current step.
Declaration
Swift
@objc public var durationRemaining: TimeInterval
-
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 contains
Intersections
for this value not benil
.Declaration
Swift
@objc public var upcomingIntersection: Intersection?
-
Index representing the current intersection.
Declaration
Swift
@objc public var intersectionIndex: Int = 0
-
The distance in meters the user is to the next intersection they will pass through.
Declaration
Swift
public var userDistanceToUpcomingIntersection: CLLocationDistance?
-
Index into
step.instructionsSpokenAlongStep
representing the current spoken instruction.Declaration
Swift
@objc public var spokenInstructionIndex:Int = 0
-
Current Instruction for the user’s progress along a step.
Declaration
Swift
@objc public var currentSpokenInstruction: SpokenInstruction?