MMKRoutePosition

@interface MMKRoutePosition : NSObject

Undocumented

Summary

Instance methods

- (BOOL)onRouteWithRouteId:(nonnull NSString *)routeId;
Check if this position on the same route as passed

- (nullable MMKPolylinePosition *)positionOnRouteWithRouteId:
    (nonnull NSString *)routeId;

Return polyline position on route

- (nonnull MMKRoutePosition *)advanceWithDistance:(double)distance;
Create position shifted by distance

- (nullable NSNumber *)distanceToWithTo:(nonnull MMKRoutePosition *)to;
Distance to another point on the route

- (BOOL)precedesWithAnother:(nonnull MMKRoutePosition *)another;
Determines if position precedes another position on the route

- (BOOL)precedesOrEqualsWithAnother:(nonnull MMKRoutePosition *)another;
Determines if position precedes or equals another position on the route

- (BOOL)equalsWithAnother:(nonnull MMKRoutePosition *)another;
Determines if position equals another position on the route

- (double)heading;
Heading movement on the route at this position

- (double)distanceToFinish;
Distance to the end of the route

- (double)timeToFinish;
Time to the end of the route

Properties

@property (nonatomic, readonly, nonnull) MMKPoint *point;
As point on the map

Instance methods

onRouteWithRouteId:

- (BOOL)onRouteWithRouteId:(nonnull NSString *)routeId;

Check if this position on the same route as passed.


positionOnRouteWithRouteId:

- (nullable MMKPolylinePosition *)positionOnRouteWithRouteId:
    (nonnull NSString *)routeId;

Return polyline position on route. If the position not on the passed route none will be returned.


advanceWithDistance:

- (nonnull MMKRoutePosition *)advanceWithDistance:(double)distance;

Create position shifted by distance. If the distance is more than remains route length, the end of the route will be returned. If the distance is less than a negative distance from the start, the beginning of the route will be returned.


distanceToWithTo:

- (nullable NSNumber *)distanceToWithTo:(nonnull MMKRoutePosition *)to;

Distance to another point on the route. Return none if point on another route. May be less 0 if position "to" stay before this position.


precedesWithAnother:

- (BOOL)precedesWithAnother:(nonnull MMKRoutePosition *)another;

Determines if position precedes another position on the route. Throws if another position belongs to another route.


precedesOrEqualsWithAnother:

- (BOOL)precedesOrEqualsWithAnother:(nonnull MMKRoutePosition *)another;

Determines if position precedes or equals another position on the route. Throws if another position belongs to another route.


equalsWithAnother:

- (BOOL)equalsWithAnother:(nonnull MMKRoutePosition *)another;

Determines if position equals another position on the route. Throws if another position belongs to another route.


heading

- (double)heading;

Heading movement on the route at this position. It is equal heading of the segment which is belonged position.


distanceToFinish

- (double)distanceToFinish;

Distance to the end of the route.


timeToFinish

- (double)timeToFinish;

Time to the end of the route.


Properties

point

@property (nonatomic, readonly, nonnull) MMKPoint *point;

As point on the map