GLRouteTracker


@interface 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;
  • Finds next maneuver and update information about it

    Declaration

    Objective-C

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

    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;

    Parameters

    point

    Point to check

    maxDistance

    Max distance from route to point in meters

    Return Value

    YES if user pass the point.

  • True if user on route

    Declaration

    Objective-C

    @property (readonly) BOOL onRoute;
  • Location of user at route

    Declaration

    Objective-C

    @property (readonly) GLMapPoint locationOnRoute;
  • Progress index of route

    Declaration

    Objective-C

    @property (readonly) double progressIndex;
  • Bearing angle of current route segment

    Declaration

    Objective-C

    @property (readonly) double bearingAngleOnRoute;
  • Distance to the next manuver in meters

    Declaration

    Objective-C

    @property (readonly) double distanceToNextManeuver;
  • Distance to the last point of route (in meters)

    Declaration

    Objective-C

    @property (readonly) double distanceToLastPoint;
  • Distance from location of user to the route

    Declaration

    Objective-C

    @property (readonly) double distanceFromRoute;
  • index of current target point

    Declaration

    Objective-C

    @property NSUInteger currentTargetPointIndex;
  • First non empty array of streetNames from next maneuver to the end of route

    Declaration

    Objective-C

    @property (readonly) NSArray<NSString *> *_Nullable nextStreetNames;
  • Distance to the target location in meters

    Declaration

    Objective-C

    @property (readonly) double remainingDistance;
  • Estimated time to the end of the route

    Declaration

    Objective-C

    @property (readonly) double remainingDuration;