MapKit Mobile SDK

MMKNavigation

class MMKNavigation : NSObject

Undocumented

Summary

Instance methods

func requestRoutes(with points: [MMKRequestPoint],
                  routeOptions: MMKAutomotiveRouteOptions)
Request routes for further guidance

func requestAlternatives()
Request global alternatives for the current route

func resolveUri(withUri uri: String)
Resolve saved driving route URI for further guidance

func cancelRequest()
Cancel active routing request

func resetRoutes()
Cancel active routing request and clear routes vector

func addListener(with navigationListener: MMKNavigationListener)
The class does not retain the object in the 'navigationListener' parameter

func removeListener(with navigationListener: MMKNavigationListener)
Undocumented

func startGuidance(with route: MMKDrivingRoute?)
Start guidance with given route

func stopGuidance()
Stops current guidance session

func suspend()
Stop tracking user position, later it could be resumed without losing current route

func resume()
Resumes suspended guidance

Properties

var vehicleOptionsMMKDrivingVehicleOptions { get set }
Changing this option may trigger reroute

var isAvoidTolls: Bool { get set }
The 'avoidTolls/avoidUnpaved/avoidPoorConditions' option instructs the router to return routes that avoid tolls/unpaved/roads in poor condition when possible

var isAvoidUnpaved: Bool { get set }
Undocumented

var isAvoidPoorConditions: Bool { get set }
Undocumented

var avoidedZones: [MMKLinearRing] { get set }
avoidedZones instructs the router to return routes that avoid provided polygons

var annotationLanguageMMKAnnotationLanguage { get set }
Set the annotation language

var routes: [MMKDrivingRoute] { get }
Resulting routes for the previous request

var guidanceMMKGuidance { get }
Undocumented

Instance methods

requestRoutes(with:routeOptions:)

func requestRoutes(with points: [MMKRequestPoint],
                  routeOptions: MMKAutomotiveRouteOptions)

Request routes for further guidance. If there was a pending routing request, it will be canceled.


requestAlternatives()

func requestAlternatives()

Request global alternatives for the current route. If there was a pending routing request, it will be canceled.


resolveUri(withUri:)

func resolveUri(withUri uri: String)

Resolve saved driving route URI for further guidance. If there was a pending routing request, it will be canceled.


cancelRequest()

func cancelRequest()

Cancel active routing request.


resetRoutes()

func resetRoutes()

Cancel active routing request and clear routes vector.


addListener(with:)

func addListener(with navigationListener: MMKNavigationListener)

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


removeListener(with:)

func removeListener(with navigationListener: MMKNavigationListener)

Undocumented


startGuidance(with:)

func startGuidance(with route: MMKDrivingRoute?)

Start guidance with given route. This method will reset active current route if any. It only accepts either routes obtained from this routes field or null, which means freedrive session started.


stopGuidance()

func stopGuidance()

Stops current guidance session. Call this method only if guidance has completely ended. For example, if you need to start another type of guidance (pedestrian for example) stop this first and than start another one. In case of route finished but you still on the road you must use startGuidance(null) instead.


suspend()

func suspend()

Stop tracking user position, later it could be resumed without losing current route. Useful when user don't want guidance in background.


resume()

func resume()

Resumes suspended guidance. Guide will continue to guide the previous route or rebuild it. Useful when user don't want guidance in background.


Properties

vehicleOptions

var vehicleOptions: MMKDrivingVehicleOptions { get set }

Changing this option may trigger reroute.


isAvoidTolls

var isAvoidTolls: Bool { get set }

The 'avoidTolls/avoidUnpaved/avoidPoorConditions' option instructs the router to return routes that avoid tolls/unpaved/roads in poor condition when possible. Changing these options may trigger reroute. All disabled by default.


isAvoidUnpaved

var isAvoidUnpaved: Bool { get set }

Undocumented


isAvoidPoorConditions

var isAvoidPoorConditions: Bool { get set }

Undocumented


avoidedZones

var avoidedZones: [MMKLinearRing] { get set }

avoidedZones instructs the router to return routes that avoid provided polygons. If there are too many polygons or too complex polygon geometry, routes building may become impossible. In this case the error MMKDrivingTooComplexAvoidedZonesError will be returned. Changing this option may trigger reroute.


annotationLanguage

var annotationLanguage: MMKAnnotationLanguage { get set }

Set the annotation language. Changing this option may trigger reroute.


routes

var routes: [MMKDrivingRoute] { get }

Resulting routes for the previous request. For requestAlternatives() it will contain the current route and fastest alternative route (if available) along with the received alternatives. Current route always will be the first one and fastest alternative will be the second.


guidance

var guidance: MMKGuidance { get }

Undocumented