Warning

This feature is available in the Full MapKit SDK version

MMKDrivingRoute

class 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

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

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

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

func metadataAt(with position: MMKPolylinePosition) -> MMKDrivingRouteMetadata
Metadata location

func requestConditionsUpdate()
Undocumented

Properties

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

var metadataMMKDrivingRouteMetadata { get }
The route metadata

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

var geometryMMKPolyline { get }
Route geometry

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

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

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

var vehicleOptionsMMKDrivingVehicleOptions { get }
Vehicle options

var laneSigns: [MMKDrivingLaneSign] { get }
Lane signs

var directionSigns: [MMKDrivingDirectionSign] { get }
Direction signs

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

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

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

var railwayCrossings: [MMKDrivingRailwayCrossing] { get }
Railway crossings

var pedestrianCrossings: [MMKDrivingPedestrianCrossing] { get }
Pedestrian crossings

var speedBumps: [MMKDrivingSpeedBump] { get }
Speed bumps

var checkpoints: [MMKDrivingCheckpoint] { get }
Checkpoints

var ruggedRoads: [MMKDrivingRuggedRoad] { get }
Route roads

var tollRoads: [MMKDrivingTollRoad] { get }
Undocumented

var fordCrossings: [MMKDrivingFordCrossing] { get }
Undocumented

var ferries: [MMKDrivingFerry] { get }
Undocumented

var highways: [MMKDrivingHighway] { get }
Undocumented

var tunnels: [MMKDrivingTunnel] { get }
Undocumented

var zoneCrossings: [MMKDrivingZoneCrossing] { get }
Undocumented

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

var manoeuvreVehicleRestrictions: [MMKDrivingManoeuvreVehicleRestriction] { get }
Undocumented

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

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

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

var routePositionMMKRoutePosition { 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: [MMKPolylinePosition] { get }
Polyline positions of waypoints including start and finish point

Instance methods

addConditionsListener(with:)

func addConditionsListener(with conditionsListener: MMKDrivingConditionsListener)

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: MMKDrivingConditionsListener)

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: MMKPolylinePosition) -> MMKDrivingRouteMetadata

Metadata location.


requestConditionsUpdate()

func requestConditionsUpdate()

Undocumented


Properties

routeId

var routeId: String { get }

The ID of the route.


metadata

var metadata: MMKDrivingRouteMetadata { get }

The route metadata.


sections

var sections: [MMKDrivingSection] { get }

Manoeuvre-to-Manoeuvre route sections.


geometry

var geometry: MMKPolyline { get }

Route geometry.


jamSegments

var jamSegments: [MMKJamSegment] { get }

Traffic conditions on the given route.


events

var events: [MMKDrivingEvent] { get }

Events on the given route.


speedLimits

var speedLimits: [NSNumber] { get }

Speed limits for segments in the geometry.


vehicleOptions

var vehicleOptions: MMKDrivingVehicleOptions { get }

Vehicle options.


laneSigns

var laneSigns: [MMKDrivingLaneSign] { get }

Lane signs.


directionSigns

var directionSigns: [MMKDrivingDirectionSign] { get }

Direction signs.


restrictedEntries

var restrictedEntries: [MMKDrivingRestrictedEntry] { get }

Route restricted entries.


trafficLights

var trafficLights: [MMKDrivingTrafficLight] { get }

Route traffic lights.


restrictedTurns

var restrictedTurns: [MMKDrivingRestrictedTurn] { get }

Route points with time-dependent restrictions.


railwayCrossings

var railwayCrossings: [MMKDrivingRailwayCrossing] { get }

Railway crossings


pedestrianCrossings

var pedestrianCrossings: [MMKDrivingPedestrianCrossing] { get }

Pedestrian crossings


speedBumps

var speedBumps: [MMKDrivingSpeedBump] { get }

Speed bumps


checkpoints

var checkpoints: [MMKDrivingCheckpoint] { get }

Checkpoints


ruggedRoads

var ruggedRoads: [MMKDrivingRuggedRoad] { get }

Route roads.


tollRoads

var tollRoads: [MMKDrivingTollRoad] { get }

Undocumented


fordCrossings

var fordCrossings: [MMKDrivingFordCrossing] { get }

Undocumented


ferries

var ferries: [MMKDrivingFerry] { get }

Undocumented


highways

var highways: [MMKDrivingHighway] { get }

Undocumented


tunnels

var tunnels: [MMKDrivingTunnel] { get }

Undocumented


zoneCrossings

var zoneCrossings: [MMKDrivingZoneCrossing] { get }

Undocumented


roadVehicleRestrictions

var roadVehicleRestrictions: [MMKDrivingRoadVehicleRestriction] { get }

Route vehicle restrictions.


manoeuvreVehicleRestrictions

var manoeuvreVehicleRestrictions: [MMKDrivingManoeuvreVehicleRestriction] { 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: [MMKRequestPoint]? { get }

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

Optional property, can be nil.


position

var position: MMKPolylinePosition { 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: MMKRoutePosition { 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: [MMKPolylinePosition] { get }

Polyline positions of waypoints including start and finish point.