GLRouteTracker


@interface GLRouteTracker : NSObject

Class to get information about maneuvers while user move by route

  • 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, atomic) BOOL onRoute;
  • Location of user at route

    Declaration

    Objective-C

    @property (readonly, atomic) GLMapPoint locationOnRoute;
  • Bearing angle of current route segment

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    @property (readonly, atomic) double distanceFromRoute;
  • First non empty array of streetNames from next maneuver to the end of route

    Declaration

    Objective-C

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

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    @property (readonly, atomic) double remainingDuration;