YMKNavigation

class YMKNavigation : NSObject

Undocumented

Summary

Instance methods

func requestRoutes(with points: [YMKRequestPoint],
                initialAzimuth: NSNumber?,
                   routesCount: NSNumber?)
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: YMKNavigationListener)
The class does not retain the object in the 'navigationListener' parameter

func removeListener(with navigationListener: YMKNavigationListener)
Undocumented

func startGuidance(with route: YMKDrivingRoute?)
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 vehicleOptionsYMKDrivingVehicleOptions { 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: [YMKLinearRing] { get set }
avoidedZones instructs the router to return routes that avoid provided polygons

var annotationLanguageYMKAnnotationLanguage { get set }
Set the annotation language

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

var guidanceYMKGuidance { get }
Undocumented

Instance methods

requestRoutes(with:initialAzimuth:routesCount:)

func requestRoutes(with points: [YMKRequestPoint],
                initialAzimuth: NSNumber?,
                   routesCount: NSNumber?)

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

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

Undocumented


startGuidance(with:)

func startGuidance(with route: YMKDrivingRoute?)

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: YMKDrivingVehicleOptions { 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: [YMKLinearRing] { 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 YMKDrivingTooComplexAvoidedZonesError will be returned. Changing this option may trigger reroute.


annotationLanguage

var annotationLanguage: YMKAnnotationLanguage { get set }

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


routes

var routes: [YMKDrivingRoute] { 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: YMKGuidance { get }

Undocumented


Предыдущая
Следующая