KNGuidance
INFO
This English reference is based on Directions SDK 1.12.12. For the latest version, see the Korean reference.
- Inherits from: NSObject
- Declared in: KNGuidance.h
Manages the route guidance feature and provides route information.
TIP
This class must be created through KNSDK.
Example code — KNGuidance
objc
KNSDK.sharedInstance.sharedGuidanceProperties
| Name | Description | Type |
|---|---|---|
excludedSafeties | Safe driving exclusion codes. (default: nil) | @property (nonatomic, strong) NSSet<NSNumber*> *excludedSafeties |
guideImgType | Guidance image type (complex intersection) (default: KNGuideImgType_DayLarge ) | @property (nonatomic, assign) KNGuideImgType guideImgType |
guideState | Guidance state | @property (nonatomic, readonly) KNGuideState guideState |
guideStateDelegate | Guidance state delegate. Called when the guidance state changes while driving; all callbacks are delivered on the main thread. | @property (nonatomic, weak) id<KNGuidance_GuideStateDelegate> _Nullable guideStateDelegate |
locationGuide | Location guidance information including GPS data and location along the route (requires locationGuideDelegate to be set) | @property (nonatomic, readonly) KNGuide_Location *locationGuide |
locationGuideDelegate | Location guidance delegate. Called when the guidance location changes while driving; all callbacks are delivered on the main thread. | @property (nonatomic, weak) id<KNGuidance_LocationGuideDelegate> _Nullable locationGuideDelegate |
routeGuide | Information about the elements required for route guidance (requires routeGuideDelegate to be set) | @property (nonatomic, readonly) KNGuide_Route *routeGuide |
routeGuideDelegate | Route guidance delegate. Called when the route guidance information changes while driving; all callbacks are delivered on the main thread. | @property (nonatomic, weak) id<KNGuidance_RouteGuideDelegate> _Nullable routeGuideDelegate |
routesOnGuide | Current driving route. If route guidance is interrupted for reasons such as screen initialization, the last set information is loaded. | @property (nonatomic, readonly) NSArray<KNRoute*> *routesOnGuide |
safetyGuide | Information about the elements required for safe driving guidance ( afetyGuideDelegate setting Required) | @property (nonatomic, readonly) KNGuide_Safety *safetyGuide |
safetyGuideDelegate | Safe driving delegate. Called when the safe driving information changes while driving; all callbacks are delivered on the main thread. | @property (nonatomic, weak) id<KNGuidance_SafetyGuideDelegate> _Nullable safetyGuideDelegate |
sndContainer | Guidance voice setting. You can change the guidance voice by setting voice data that follows the Kakao Navi voice data format (default: default voice). When changing the voice data file provided by the Directions SDK with UI, the following file format must be observed — File format: .mp3, Bitrate: 128 kbit/s, Audio channel: monophonic sound. | @property (nonatomic, strong) KNSoundContainer *sndContainer |
trip | Route for route guidance. Not used in safe driving mode. | @property (nonatomic, readonly) KNTrip *trip |
useAutoReroute | Whether automatic rerouting is enabledYES: Enables automatic reroutingNO: Disables automatic rerouting(default: YES) | @property (nonatomic, assign) BOOL useAutoReroute |
useBackgroundUpdate | Whether background updates are enabledYES: Enables updatesNO: Disables updates(default: YES) | @property (nonatomic, assign) BOOL useBackgroundUpdate |
useDirSound | Whether voice direction guidance is enabledYES: Enables voice guidanceNO: Disables voice guidance(default: YES) | @property (nonatomic, assign) BOOL useDirSound |
voiceGuideDelegate | Voice guidance delegate. Requests and delivers information related to the start and end of voice guidance; all callbacks are delivered on the main thread. | @property (nonatomic, weak) id<KNGuidance_VoiceGuideDelegate>_Nullable voiceGuideDelegate |
aroundSafeties | Safe driving information near the current location | @property (nonatomic, readonly) NSArray<KNSafety*> *aroundSafeties |
citsGuide | Latest C-ITS (Cooperative Intelligent Transport Systems) information. This property is not updated unless citsGuideDelegate is set. | @property (nonatomic, readonly) KNGuide_Cits *citsGuide |
directionFreqModeNormalWay | Turn guidance frequency on normal roads | @property (nonatomic, assign) KNGuideFrequencyMode directionFreqModeNormalWay |
safetyFreqModeNormalWay | Safe driving guidance frequency on normal roads | @property (nonatomic, assign) KNGuideFrequencyMode safetyFreqModeNormalWay |
judgeOverSpeedAlert | Whether to sound an alert at a speed enforcement Camera location (default: nil) | @property (nonatomic, copy) (KNSafetyJudgeOverSpeedAlertBlock judgeOverSpeedAlert |
judgeOverSpeedViolation | Determines whether a speeding violation occurred(default: nil) | @property (nonatomic, copy) (KNSafetyJudgeOverSpeedAlertBlock judgeOverSpeedAlert |
Methods
startWithTrip:priority:avoidOptions
Starts route guidance by setting the route and route options.
objc
- (void) startWithTrip: (KNTrip *_Nullable) aTrip
priority: (KNRoutePriority) aPriority
avoidOptions: (SInt32) aAvoidOptionsParameters
| Name | Description |
|---|---|
aTrip | Route to use for driving |
aPriority | Items to prioritize when choosing a route during route guidance |
aAvoidOptions | Sections to avoid in the route |
stop
Ends route guidance. Any voice guidance in progress is also stopped immediately. After ending, it does not switch to safe driving mode.
objc
- (void) stop