MMKGuidance

Warning

This feature is available in the NaviKit SDK version.

class MMKGuidance : NSObject

Summary

Instance methods

func switchToRoute(with route: MMKDrivingRoute)
Start guidance with given alternative

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

func removeListener(with guidanceListener: MMKGuidanceListener)

Properties

var isEnableAlternatives: Bool { get set }
Enables/Disables alternatives suggestion while guiding

var isEnableReroutes: Bool { get set }
Enables/Disables rerouting

var windshield: MMKNavigationWindshield { get }

var annotator: MMKAnnotator { get }

var currentRoute: MMKDrivingRoute? { get }
Optional property, can be nil

var alternatives: [MMKNavigationAlternative] { get }
Vector with all alternatives ahead

var fastestAlternative: MMKNavigationAlternative? { get }
Optional property, can be nil

var location: MMKLocation? { get }
Optional property, can be nil

var locationClass: NSNumber? { get }
Optional property, can be nil

var roadName: String? { get }
Optional property, can be nil

var routeStatus: MMKRouteStatus { get }

var speedLimitsPolicy: MMKSpeedLimitsPolicy { get }
In case region is not yet available, SpeedingPolicy::region is empty and default speeding config is used

var speedLimitTolerance: Double { get set }

var speedLimit: MMKLocalizedValue? { get }
Speed limit of the current road

var speedLimitStatus: MMKSpeedLimitStatus { get }

var isValid: Bool { get }
Tells if this object is valid or no

Instance methods

switchToRoute(with:)

func switchToRoute(with route: MMKDrivingRoute)

Start guidance with given alternative. It only accepts routes obtained from this Guidance.routes field.


addListener(with:)

func addListener(with guidanceListener: MMKGuidanceListener)

The class does not retain the object in the 'guidanceListener' 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 guidanceListener: MMKGuidanceListener)


Properties

isEnableAlternatives

var isEnableAlternatives: Bool { get set }

Enables/Disables alternatives suggestion while guiding. Enabled by default.


isEnableReroutes

var isEnableReroutes: Bool { get set }

Enables/Disables rerouting. Enabled by default.


windshield

var windshield: MMKNavigationWindshield { get }


annotator

var annotator: MMKAnnotator { get }


currentRoute

var currentRoute: MMKDrivingRoute? { get }

Optional property, can be nil.


alternatives

var alternatives: [MMKNavigationAlternative] { get }

Vector with all alternatives ahead. Sorted by distance.


fastestAlternative

var fastestAlternative: MMKNavigationAlternative? { get }

Optional property, can be nil.


location

var location: MMKLocation? { get }

Optional property, can be nil.


locationClass

var locationClass: NSNumber? { get }

Optional property, can be nil.


roadName

var roadName: String? { get }

Optional property, can be nil.


routeStatus

var routeStatus: MMKRouteStatus { get }


speedLimitsPolicy

var speedLimitsPolicy: MMKSpeedLimitsPolicy { get }

In case region is not yet available, SpeedingPolicy::region is empty and default speeding config is used.


speedLimitTolerance

var speedLimitTolerance: Double { get set }


speedLimit

var speedLimit: MMKLocalizedValue? { get }

Speed limit of the current road.

Optional property, can be nil.


speedLimitStatus

var speedLimitStatus: MMKSpeedLimitStatus { get }


isValid

var isValid: Bool { get }

Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.