Warning

This feature is available in the Full MapKit SDK version

MMKDrivingRoute

@interface MMKDrivingRoute : 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<MMKDrivingConditionsListener>)conditionsListener;

Adds a listener for route condition changes

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

Removes the listener for route condition changes

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

- (nonnull MMKDrivingRouteMetadata *)metadataAtWithPosition:
    (nonnull MMKPolylinePosition *)position;

Metadata location

- (void)requestConditionsUpdate;
Undocumented

Properties

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

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

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

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

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

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

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

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

Vehicle options

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

Lane signs

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

Direction signs

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

Route restricted entries

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

Route traffic lights

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

Route points with time-dependent restrictions

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

Railway crossings

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

Pedestrian crossings

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

Speed bumps

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

Checkpoints

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

Route roads

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

Undocumented

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

Undocumented

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

@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingHighway *> *highways;
Undocumented

@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingTunnel *> *tunnels;
Undocumented

@property (nonatomic, readonly, nonnull)
    NSArray<MMKDrivingZoneCrossing *> *zoneCrossings;

Undocumented

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

Route vehicle restrictions

@property (nonatomic, readonly, nonnull)
    NSArray<MMKDrivingManoeuvreVehicleRestriction *>
        *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<MMKRequestPoint *> *requestPoints;

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

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

The reached position on the given route

@property (nonatomic, readonly, nonnull) MMKRoutePosition *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<MMKPolylinePosition *> *wayPoints;

Polyline positions of waypoints including start and finish point

Instance methods

addConditionsListenerWithConditionsListener:

- (void)addConditionsListenerWithConditionsListener:
    (nonnull id<MMKDrivingConditionsListener>)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<MMKDrivingConditionsListener>)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 MMKDrivingRouteMetadata *)metadataAtWithPosition:
    (nonnull MMKPolylinePosition *)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) MMKDrivingRouteMetadata *metadata;

The route metadata.


sections

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

Manoeuvre-to-Manoeuvre route sections.


geometry

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

Route geometry.


jamSegments

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

Traffic conditions on the given route.


events

@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingEvent *> *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)
    MMKDrivingVehicleOptions *vehicleOptions;

Vehicle options.


laneSigns

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

Lane signs.


directionSigns

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

Direction signs.


restrictedEntries

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

Route restricted entries.


trafficLights

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

Route traffic lights.


restrictedTurns

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

Route points with time-dependent restrictions.


railwayCrossings

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

Railway crossings


pedestrianCrossings

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

Pedestrian crossings


speedBumps

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

Speed bumps


checkpoints

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

Checkpoints


ruggedRoads

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

Route roads.


tollRoads

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

Undocumented


fordCrossings

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

Undocumented


ferries

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

Undocumented


highways

@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingHighway *> *highways;

Undocumented


tunnels

@property (nonatomic, readonly, nonnull) NSArray<MMKDrivingTunnel *> *tunnels;

Undocumented


zoneCrossings

@property (nonatomic, readonly, nonnull)
    NSArray<MMKDrivingZoneCrossing *> *zoneCrossings;

Undocumented


roadVehicleRestrictions

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

Route vehicle restrictions.


manoeuvreVehicleRestrictions

@property (nonatomic, readonly, nonnull)
    NSArray<MMKDrivingManoeuvreVehicleRestriction *>
        *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<MMKRequestPoint *> *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)
    MMKPolylinePosition *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) MMKRoutePosition *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<MMKPolylinePosition *> *wayPoints;

Polyline positions of waypoints including start and finish point.