SPRouteTrackerProgress
Objective-C
@interface SPRouteTrackerProgress : NSObject
Swift
class SPRouteTrackerProgress : NSObject
Object containing information about current progress on a route
-
Recommended constructor for SPRouteTrackerProgress objects
Declaration
Objective-C
- (nonnull instancetype)initWithStepDistance:(CGFloat)stepDistance stepTime:(CGFloat)stepTime totalDistance:(CGFloat)totalDistance totalTime:(CGFloat)totalTime totalFloorDifference:(NSInteger)floorDifference;
Swift
init(stepDistance: CGFloat, stepTime: CGFloat, totalDistance: CGFloat, totalTime: CGFloat, totalFloorDifference floorDifference: Int)
Parameters
stepDistance
step distance remaining in meters
stepTime
step time remaining in seconds
totalDistance
total distance remaining in meters
totalTime
total time remaining in seconds
floorDifference
total floor difference
-
Get distance remaining to complete current route step.
Declaration
Objective-C
- (CGFloat)currentStepDistanceRemaining;
Swift
func currentStepDistanceRemaining() -> CGFloat
Return Value
distance remaining on current route step
-
Get estimated time to complete current route step
Declaration
Objective-C
- (CGFloat)currentStepTimeRemaining;
Swift
func currentStepTimeRemaining() -> CGFloat
Return Value
estimated time remaining to complete current route step.
-
Get total distance remaining on route
Declaration
Objective-C
- (CGFloat)overallDistanceRemaining;
Swift
func overallDistanceRemaining() -> CGFloat
Return Value
total distance remaining to complete the route (meters).
-
Get total estimated time remaining on route
Declaration
Objective-C
- (CGFloat)overallTimeRemaining;
Swift
func overallTimeRemaining() -> CGFloat
Return Value
estimated time remaining to complete the route (seconds).
-
Get difference between current floor and route destination floor. Example 1: Currently on floor 1 while route ends on floor 3. totalLevelDifferent = (end - current) = 2. Example 2: Currently on floor 2 while route ends on floor -2. totalLevelDifference = (end - current) = -4.
Declaration
Objective-C
- (NSInteger)overallFloorDifference;
Swift
func overallFloorDifference() -> Int
Return Value
difference between current floor and destination floor
-
Instructions with remaining distance and time
Declaration
Objective-C
- (nonnull NSString *)instructions;
Swift
func instructions() -> String
Return Value
instructions contains distance and time estimate