KNDriveGuidance
INFO
This English reference is based on Directions SDK 1.12.8-hotfix02. For the latest version, see the Korean reference.
Manages the route guidance feature and provides route information.
TIP
- This class must be created through
KNSDK. - Only one
KNDriveGuidanceinstance currently exists.
Example code — KNDriveGuidance
kotlin
class KNDriveGuidance(application: Application) : KNGuidance, KNGPSReceiver, KNLTEReceiverProperties
| Name | Description | Type |
|---|---|---|
useAutoReroute | Whether to use automatic rerouting. true : use automatic rerouting, false : do not use automatic rerouting (default: true ) | var useAutoReroute: Boolean |
Methods
cancelRoute
Ends route guidance and switches to safe driving mode.
kotlin
fun cancelRoute(): UnitchangeRoute
Changes the main route being driven to an alternative route. Ignored if there is no alternative route.
kotlin
fun changeRoute(): UnitreRoute
Recalculates the route.
kotlin
fun reRoute(): UnitreRouteWithPriority
Recalculates the route by selecting the items to prioritize when choosing a route during route guidance and the sections to avoid in the route.
kotlin
fun reRouteWithPriority( priority: KNRoutePriority,
avoidOptions: Int ): UnitParameters
| Name | Description |
|---|---|
priority | Items to prioritize when choosing a route during route guidance |
avoidOptions | Sections to avoid in the route |
startWithoutTrip
Starts guidance in safe driving mode without setting a destination.
kotlin
fun startWithoutTrip(): Unit