GLRouteTracker

Objective-C


@interface GLRouteTracker : NSObject

Swift

class GLRouteTracker : NSObject

Class to get information about maneuvers while user move by route

  • Unavailable

    GLRouteTracker should be created with [GLRouteTracker initWithData:]

    Plain -init is disabled

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • Initializes tracker with data

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithData:(GLRoute *_Nonnull)data;

    Swift

    init(data: GLRoute)
  • Finds next maneuver and update information about it

    Declaration

    Objective-C

    - (GLRouteManeuver *_Nullable)updateLocation:(GLMapGeoPoint)location
                                     userBearing:(double)userBearing;

    Swift

    func updateLocation(_ location: GLMapGeoPoint, userBearing: Double) -> GLRouteManeuver?

    Parameters

    location

    Internal coordinates of current user location

    Return Value

    next maneuver of the route

  • Checks if user pass the point

    Declaration

    Objective-C

    - (BOOL)didPassPoint:(GLMapGeoPoint)point maxDistance:(double)maxDistance;

    Swift

    func didPass(_ point: GLMapGeoPoint, maxDistance: Double) -> Bool

    Parameters

    point

    Point to check

    maxDistance

    Max distance from route to point in meters

    Return Value

    YES if user pass the point.

  • Calculates bbox of route segment form last location

    Declaration

    Objective-C

    - (GLMapBBox)bboxForSegment:(double)length;

    Swift

    func bbox(forSegment length: Double) -> GLMapBBox

    Parameters

    length

    length of segment

    Return Value

    BBox of segment

  • True if user on route

    Declaration

    Objective-C

    @property (readonly) BOOL onRoute;

    Swift

    var onRoute: Bool { get }
  • Location of user at route

    Declaration

    Objective-C

    @property (readonly) GLMapPoint locationOnRoute;

    Swift

    var locationOnRoute: GLMapPoint { get }
  • Progress index of route

    Declaration

    Objective-C

    @property (readonly) double progressIndex;

    Swift

    var progressIndex: Double { get }
  • Bearing angle of current route segment

    Declaration

    Objective-C

    @property (readonly) double bearingAngleOnRoute;

    Swift

    var bearingAngleOnRoute: Double { get }
  • Distance to the next manuver in meters

    Declaration

    Objective-C

    @property (readonly) double distanceToNextManeuver;

    Swift

    var distanceToNextManeuver: Double { get }
  • Distance to the last point of route (in meters)

    Declaration

    Objective-C

    @property (readonly) double distanceToLastPoint;

    Swift

    var distanceToLastPoint: Double { get }
  • Distance from location of user to the route

    Declaration

    Objective-C

    @property (readonly) double distanceFromRoute;

    Swift

    var distanceFromRoute: Double { get }
  • index of current target point

    Declaration

    Objective-C

    @property NSUInteger currentTargetPointIndex;

    Swift

    var currentTargetPointIndex: UInt { get set }
  • First non short instruction from next maneuver to the end of route

    Declaration

    Objective-C

    @property (readonly) NSString *_Nullable nextShortInstruction;

    Swift

    var nextShortInstruction: String? { get }
  • Distance to the target location in meters

    Declaration

    Objective-C

    @property (readonly) double remainingDistance;

    Swift

    var remainingDistance: Double { get }
  • Estimated time to the end of the route

    Declaration

    Objective-C

    @property (readonly) double remainingDuration;

    Swift

    var remainingDuration: Double { get }