Warning

This feature is available in the Full MapKit SDK version

YMKDrivingRoute

@interface YMKDrivingRoute : NSObject

Driving route. A route consists of multiple sections. Each section has a corresponding annotation that describes the action at the beginning of the section.

Summary

Instance methods

- (void)addConditionsListenerWithConditionsListener:
    (nonnull id<YMKDrivingConditionsListener>)conditionsListener;

Adds a listener for route condition changes

- (void)removeConditionsListenerWithConditionsListener:
    (nonnull id<YMKDrivingConditionsListener>)conditionsListener;

Removes the listener for route condition changes

- (NSUInteger)sectionIndexWithSegmentIndex:(NSUInteger)segmentIndex;
Section index

- (nonnull YMKDrivingRouteMetadata *)metadataAtWithPosition:
    (nonnull YMKPolylinePosition *)position;

Metadata location

- (void)requestConditionsUpdate;
Undocumented

Properties

@property (nonatomic, readonly, nonnull) NSString *routeId;
The ID of the route

@property (nonatomic, readonly, nonnull) YMKDrivingRouteMetadata *metadata;
The route metadata

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingSection *> *sections;
Manoeuvre-to-Manoeuvre route sections

@property (nonatomic, readonly, nonnull) YMKPolyline *geometry;
Route geometry

@property (nonatomic, readonly, nonnull) NSArray<YMKJamSegment *> *jamSegments;
Traffic conditions on the given route

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingEvent *> *events;
Events on the given route

@property (nonatomic, readonly, nonnull) NSArray<NSNumber *> *speedLimits;
Speed limits for segments in the geometry

@property (nonatomic, readonly, nonnull)
    YMKDrivingVehicleOptions *vehicleOptions;

Vehicle options

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingLaneSign *> *laneSigns;

Lane signs

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingDirectionSign *> *directionSigns;

Direction signs

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRestrictedEntry *> *restrictedEntries;

Route restricted entries

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingTrafficLight *> *trafficLights;

Route traffic lights

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRestrictedTurn *> *restrictedTurns;

Route points with time-dependent restrictions

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRailwayCrossing *> *railwayCrossings;

Railway crossings

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingPedestrianCrossing *> *pedestrianCrossings;

Pedestrian crossings

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingSpeedBump *> *speedBumps;

Speed bumps

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingCheckpoint *> *checkpoints;

Checkpoints

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRuggedRoad *> *ruggedRoads;

Route roads

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingTollRoad *> *tollRoads;

Undocumented

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingFordCrossing *> *fordCrossings;

Undocumented

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingFerry *> *ferries;
Undocumented

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRoadVehicleRestriction *> *roadVehicleRestrictions;

Route vehicle restrictions

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingManoeuvreVehicleRestriction *>
        *manoeuvreVehicleRestrictions;

Undocumented

@property (nonatomic, readonly, nullable) NSNumber *annotationLanguage;
Language of string annotations (for example street names) in this route object

@property (nonatomic, readonly, nullable)
    NSArray<YMKRequestPoint *> *requestPoints;

Request points that were specified in the router request that this route originated from

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    YMKPolylinePosition *position;

The reached position on the given route

@property (nonatomic, readonly, nonnull) YMKRoutePosition *routePosition;
The reached position on the given route

@property (nonatomic, assign, unsafe_unretained, readwrite) NSUInteger legIndex;
A leg is a section of the route between two consecutive waypoints

@property (nonatomic, readonly, getter=isAreConditionsOutdated)
    BOOL areConditionsOutdated;

Indicates whether driving conditions (jamSegments and events) have become outdated when we are not able to fetch updates for some predefined time

@property (nonatomic, readonly, nonnull)
    NSArray<YMKPolylinePosition *> *wayPoints;

Polyline positions of waypoints including start and finish point

Instance methods

addConditionsListenerWithConditionsListener:

- (void)addConditionsListenerWithConditionsListener:
    (nonnull id<YMKDrivingConditionsListener>)conditionsListener;

Adds a listener for route condition changes.

The class does not retain the object in the 'conditionsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


removeConditionsListenerWithConditionsListener:

- (void)removeConditionsListenerWithConditionsListener:
    (nonnull id<YMKDrivingConditionsListener>)conditionsListener;

Removes the listener for route condition changes.

The class does not retain the object in the 'conditionsListener' parameter. It is your responsibility to maintain a strong reference to the target object while it is attached to a class.


sectionIndexWithSegmentIndex:

- (NSUInteger)sectionIndexWithSegmentIndex:(NSUInteger)segmentIndex;

Section index.


metadataAtWithPosition:

- (nonnull YMKDrivingRouteMetadata *)metadataAtWithPosition:
    (nonnull YMKPolylinePosition *)position;

Metadata location.


requestConditionsUpdate

- (void)requestConditionsUpdate;

Undocumented


Properties

routeId

@property (nonatomic, readonly, nonnull) NSString *routeId;

The ID of the route.


metadata

@property (nonatomic, readonly, nonnull) YMKDrivingRouteMetadata *metadata;

The route metadata.


sections

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingSection *> *sections;

Manoeuvre-to-Manoeuvre route sections.


geometry

@property (nonatomic, readonly, nonnull) YMKPolyline *geometry;

Route geometry.


jamSegments

@property (nonatomic, readonly, nonnull) NSArray<YMKJamSegment *> *jamSegments;

Traffic conditions on the given route.


events

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingEvent *> *events;

Events on the given route.


speedLimits

@property (nonatomic, readonly, nonnull) NSArray<NSNumber *> *speedLimits;

Speed limits for segments in the geometry.


vehicleOptions

@property (nonatomic, readonly, nonnull)
    YMKDrivingVehicleOptions *vehicleOptions;

Vehicle options.


laneSigns

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingLaneSign *> *laneSigns;

Lane signs.


directionSigns

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingDirectionSign *> *directionSigns;

Direction signs.


restrictedEntries

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRestrictedEntry *> *restrictedEntries;

Route restricted entries.


trafficLights

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingTrafficLight *> *trafficLights;

Route traffic lights.


restrictedTurns

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRestrictedTurn *> *restrictedTurns;

Route points with time-dependent restrictions.


railwayCrossings

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRailwayCrossing *> *railwayCrossings;

Railway crossings


pedestrianCrossings

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingPedestrianCrossing *> *pedestrianCrossings;

Pedestrian crossings


speedBumps

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingSpeedBump *> *speedBumps;

Speed bumps


checkpoints

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingCheckpoint *> *checkpoints;

Checkpoints


ruggedRoads

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRuggedRoad *> *ruggedRoads;

Route roads.


tollRoads

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingTollRoad *> *tollRoads;

Undocumented


fordCrossings

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingFordCrossing *> *fordCrossings;

Undocumented


ferries

@property (nonatomic, readonly, nonnull) NSArray<YMKDrivingFerry *> *ferries;

Undocumented


roadVehicleRestrictions

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingRoadVehicleRestriction *> *roadVehicleRestrictions;

Route vehicle restrictions.


manoeuvreVehicleRestrictions

@property (nonatomic, readonly, nonnull)
    NSArray<YMKDrivingManoeuvreVehicleRestriction *>
        *manoeuvreVehicleRestrictions;

Undocumented


annotationLanguage

@property (nonatomic, readonly, nullable) NSNumber *annotationLanguage;

Language of string annotations (for example street names) in this route object.

Optional property, can be nil.


requestPoints

@property (nonatomic, readonly, nullable)
    NSArray<YMKRequestPoint *> *requestPoints;

Request points that were specified in the router request that this route originated from.

Optional property, can be nil.


position

@property (nonatomic, assign, unsafe_unretained, readwrite, nonnull)
    YMKPolylinePosition *position;

The reached position on the given route. The 'RouteMetadata::weight' field contains data for the part of the route beyond this position.


routePosition

@property (nonatomic, readonly, nonnull) YMKRoutePosition *routePosition;

The reached position on the given route. The 'RouteMetadata::weight' field contains data for the part of the route beyond this position.


legIndex

@property (nonatomic, assign, unsafe_unretained, readwrite) NSUInteger legIndex;

A leg is a section of the route between two consecutive waypoints.


areConditionsOutdated

@property (nonatomic, readonly, getter=isAreConditionsOutdated)
    BOOL areConditionsOutdated;

Indicates whether driving conditions (jamSegments and events) have become outdated when we are not able to fetch updates for some predefined time.


wayPoints

@property (nonatomic, readonly, nonnull)
    NSArray<YMKPolylinePosition *> *wayPoints;

Polyline positions of waypoints including start and finish point.