Warning

This feature is available in the Full MapKit SDK version

YMKDrivingRoute

class 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

func addConditionsListener(with conditionsListener: YMKDrivingConditionsListener)
Adds a listener for route condition changes

func removeConditionsListener(with conditionsListener: YMKDrivingConditionsListener)
Removes the listener for route condition changes

func sectionIndex(withSegmentIndex segmentIndex: UInt) -> UInt
Section index

func metadataAt(with position: YMKPolylinePosition) -> YMKDrivingRouteMetadata
Metadata location

func requestConditionsUpdate()
Undocumented

Properties

var routeId: String { get }
The ID of the route

var metadataYMKDrivingRouteMetadata { get }
The route metadata

var sections: [YMKDrivingSection] { get }
Manoeuvre-to-Manoeuvre route sections

var geometryYMKPolyline { get }
Route geometry

var jamSegments: [YMKJamSegment] { get }
Traffic conditions on the given route

var events: [YMKDrivingEvent] { get }
Events on the given route

var speedLimits: [NSNumber] { get }
Speed limits for segments in the geometry

var vehicleOptionsYMKDrivingVehicleOptions { get }
Vehicle options

var laneSigns: [YMKDrivingLaneSign] { get }
Lane signs

var directionSigns: [YMKDrivingDirectionSign] { get }
Direction signs

var restrictedEntries: [YMKDrivingRestrictedEntry] { get }
Route restricted entries

var trafficLights: [YMKDrivingTrafficLight] { get }
Route traffic lights

var restrictedTurns: [YMKDrivingRestrictedTurn] { get }
Route points with time-dependent restrictions

var railwayCrossings: [YMKDrivingRailwayCrossing] { get }
Railway crossings

var pedestrianCrossings: [YMKDrivingPedestrianCrossing] { get }
Pedestrian crossings

var speedBumps: [YMKDrivingSpeedBump] { get }
Speed bumps

var checkpoints: [YMKDrivingCheckpoint] { get }
Checkpoints

var ruggedRoads: [YMKDrivingRuggedRoad] { get }
Route roads

var tollRoads: [YMKDrivingTollRoad] { get }
Undocumented

var fordCrossings: [YMKDrivingFordCrossing] { get }
Undocumented

var ferries: [YMKDrivingFerry] { get }
Undocumented

var roadVehicleRestrictions: [YMKDrivingRoadVehicleRestriction] { get }
Route vehicle restrictions

var manoeuvreVehicleRestrictions: [YMKDrivingManoeuvreVehicleRestriction] { get }
Undocumented

var annotationLanguage: NSNumber? { get }
Language of string annotations (for example street names) in this route object

var requestPoints: [YMKRequestPoint]? { get }
Request points that were specified in the router request that this route originated from

var positionYMKPolylinePosition { get set }
The reached position on the given route

var routePositionYMKRoutePosition { get }
The reached position on the given route

var legIndex: UInt { get set }
A leg is a section of the route between two consecutive waypoints

var isAreConditionsOutdated: Bool { get }
Indicates whether driving conditions (jamSegments and events) have become outdated when we are not able to fetch updates for some predefined time

var wayPoints: [YMKPolylinePosition] { get }
Polyline positions of waypoints including start and finish point

Instance methods

addConditionsListener(with:)

func addConditionsListener(with conditionsListener: YMKDrivingConditionsListener)

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.


removeConditionsListener(with:)

func removeConditionsListener(with conditionsListener: YMKDrivingConditionsListener)

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.


sectionIndex(withSegmentIndex:)

func sectionIndex(withSegmentIndex segmentIndex: UInt) -> UInt

Section index.


metadataAt(with:)

func metadataAt(with position: YMKPolylinePosition) -> YMKDrivingRouteMetadata

Metadata location.


requestConditionsUpdate()

func requestConditionsUpdate()

Undocumented


Properties

routeId

var routeId: String { get }

The ID of the route.


metadata

var metadata: YMKDrivingRouteMetadata { get }

The route metadata.


sections

var sections: [YMKDrivingSection] { get }

Manoeuvre-to-Manoeuvre route sections.


geometry

var geometry: YMKPolyline { get }

Route geometry.


jamSegments

var jamSegments: [YMKJamSegment] { get }

Traffic conditions on the given route.


events

var events: [YMKDrivingEvent] { get }

Events on the given route.


speedLimits

var speedLimits: [NSNumber] { get }

Speed limits for segments in the geometry.


vehicleOptions

var vehicleOptions: YMKDrivingVehicleOptions { get }

Vehicle options.


laneSigns

var laneSigns: [YMKDrivingLaneSign] { get }

Lane signs.


directionSigns

var directionSigns: [YMKDrivingDirectionSign] { get }

Direction signs.


restrictedEntries

var restrictedEntries: [YMKDrivingRestrictedEntry] { get }

Route restricted entries.


trafficLights

var trafficLights: [YMKDrivingTrafficLight] { get }

Route traffic lights.


restrictedTurns

var restrictedTurns: [YMKDrivingRestrictedTurn] { get }

Route points with time-dependent restrictions.


railwayCrossings

var railwayCrossings: [YMKDrivingRailwayCrossing] { get }

Railway crossings


pedestrianCrossings

var pedestrianCrossings: [YMKDrivingPedestrianCrossing] { get }

Pedestrian crossings


speedBumps

var speedBumps: [YMKDrivingSpeedBump] { get }

Speed bumps


checkpoints

var checkpoints: [YMKDrivingCheckpoint] { get }

Checkpoints


ruggedRoads

var ruggedRoads: [YMKDrivingRuggedRoad] { get }

Route roads.


tollRoads

var tollRoads: [YMKDrivingTollRoad] { get }

Undocumented


fordCrossings

var fordCrossings: [YMKDrivingFordCrossing] { get }

Undocumented


ferries

var ferries: [YMKDrivingFerry] { get }

Undocumented


roadVehicleRestrictions

var roadVehicleRestrictions: [YMKDrivingRoadVehicleRestriction] { get }

Route vehicle restrictions.


manoeuvreVehicleRestrictions

var manoeuvreVehicleRestrictions: [YMKDrivingManoeuvreVehicleRestriction] { get }

Undocumented


annotationLanguage

var annotationLanguage: NSNumber? { get }

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

Optional property, can be nil.


requestPoints

var requestPoints: [YMKRequestPoint]? { get }

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

Optional property, can be nil.


position

var position: YMKPolylinePosition { get set }

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


routePosition

var routePosition: YMKRoutePosition { get }

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


legIndex

var legIndex: UInt { get set }

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


isAreConditionsOutdated

var isAreConditionsOutdated: Bool { get }

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


wayPoints

var wayPoints: [YMKPolylinePosition] { get }

Polyline positions of waypoints including start and finish point.