GLRouteTracker
Objective-C
@interface GLRouteTracker : NSObject
Swift
class GLRouteTracker : NSObject
GLRouteTracker
is a class that provides information about maneuvers and updates as the user moves along a route.
-
Unavailable
GLRouteTracker should be created with [GLRouteTracker initWithData:]
Default -init is disabled.
Declaration
Objective-C
- (instancetype _Nonnull)init;
-
Updates the tracker’s location and user bearing, then finds and updates information about the next maneuver.
Declaration
Objective-C
- (GLRouteManeuver *_Nullable)updateLocation:(GLMapGeoPoint)location userBearing:(float)userBearing;
Swift
func updateLocation(_ location: GLMapGeoPoint, userBearing: Float) -> GLRouteManeuver?
Parameters
location
The current user location in internal coordinates.
userBearing
The current user bearing angle in degrees.
Return Value
The next maneuver in the route, if available.
-
Checks if the user has passed the specified point.
Declaration
Objective-C
- (BOOL)didPassPoint:(GLMapGeoPoint)point maxDistance:(double)maxDistance;
Swift
func didPass(_ point: GLMapGeoPoint, maxDistance: Double) -> Bool
Parameters
point
The point to be checked.
maxDistance
The maximum distance in meters from the route to the point.
Return Value
YES if the user has passed the point, NO otherwise.
-
Indicates if the user is on the route.
Declaration
Objective-C
@property (readonly) BOOL onRoute;
Swift
var onRoute: Bool { get }
-
The user’s location on the route.
Declaration
Objective-C
@property (readonly) GLMapPoint locationOnRoute;
Swift
var locationOnRoute: GLMapPoint { get }
-
The index representing the user’s progress along the route.
Declaration
Objective-C
@property (readonly) double progressIndex;
Swift
var progressIndex: Double { get }
-
The distance from the user’s location to the route in meters.
Declaration
Objective-C
@property (readonly) double distanceFromRoute;
Swift
var distanceFromRoute: Double { get }
-
The bearing angle of the current route segment in degrees.
Declaration
Objective-C
@property (readonly) float bearingAngleOnRoute;
Swift
var bearingAngleOnRoute: Float { get }
-
The distance to the next maneuver in meters.
Declaration
Objective-C
@property (readonly) double distanceToNextManeuver;
Swift
var distanceToNextManeuver: Double { get }
-
The distance to the last point of the route in meters.
Declaration
Objective-C
@property (readonly) double distanceToLastPoint;
Swift
var distanceToLastPoint: Double { get }
-
The current target point index.
Declaration
Objective-C
@property NSUInteger currentTargetPointIndex;
Swift
var currentTargetPointIndex: UInt { get set }
-
The first non-short instruction from the next maneuver to the end of the route.
Declaration
Objective-C
@property (readonly) NSString *_Nullable nextShortInstruction;
Swift
var nextShortInstruction: String? { get }
-
The total remaining distance to the target location in meters.
Declaration
Objective-C
@property (readonly) double remainingDistance;
Swift
var remainingDistance: Double { get }
-
The estimated remaining time to the end of the route in seconds.
Declaration
Objective-C
@property (readonly) double remainingDuration;
Swift
var remainingDuration: Double { get }