MMKRoutePosition
@interface MMKRoutePosition : NSObject |
Undocumented
Summary
Instance methods
- (BOOL)onRouteWithRouteId:(nonnull NSString *)routeId; |
- (nullable MMKPolylinePosition *)positionOnRouteWithRouteId: |
- (nonnull MMKRoutePosition *)advanceWithDistance:(double)distance; |
- (nullable NSNumber *)distanceToWithTo:(nonnull MMKRoutePosition *)to; |
- (BOOL)precedesWithAnother:(nonnull MMKRoutePosition *)another; |
- (BOOL)precedesOrEqualsWithAnother:(nonnull MMKRoutePosition *)another; |
- (BOOL)equalsWithAnother:(nonnull MMKRoutePosition *)another; |
- (double)heading; |
- (double)distanceToFinish; |
- (double)timeToFinish; |
Properties
@property (nonatomic, readonly, nonnull) MMKPoint *point; |
Instance methods
onRouteWithRouteId:
- (BOOL)onRouteWithRouteId:(nonnull NSString *)routeId; |
Check if this position on the same route as passed.
positionOnRouteWithRouteId:
- (nullable MMKPolylinePosition *)positionOnRouteWithRouteId: |
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