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
stepDistancestep distance remaining in meters
stepTimestep time remaining in seconds
totalDistancetotal distance remaining in meters
totalTimetotal time remaining in seconds
floorDifferencetotal floor difference
-
Get distance remaining to complete current route step.
Declaration
Objective-C
- (CGFloat)currentStepDistanceRemaining;Swift
func currentStepDistanceRemaining() -> CGFloatReturn Value
distance remaining on current route step
-
Get estimated time to complete current route step
Declaration
Objective-C
- (CGFloat)currentStepTimeRemaining;Swift
func currentStepTimeRemaining() -> CGFloatReturn Value
estimated time remaining to complete current route step.
-
Get total distance remaining on route
Declaration
Objective-C
- (CGFloat)overallDistanceRemaining;Swift
func overallDistanceRemaining() -> CGFloatReturn Value
total distance remaining to complete the route (meters).
-
Get total estimated time remaining on route
Declaration
Objective-C
- (CGFloat)overallTimeRemaining;Swift
func overallTimeRemaining() -> CGFloatReturn 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() -> IntReturn Value
difference between current floor and destination floor
-
Instructions with remaining distance and time
Declaration
Objective-C
- (nonnull NSString *)instructions;Swift
func instructions() -> StringReturn Value
instructions contains distance and time estimate
SPRouteTrackerProgress Class Reference