KNGuidance
INFO
This English reference is based on Directions SDK with UI 1.12.12. For the latest version, see the Korean reference.
- Inherits from: NSObject
- Declared in: KNGuidance.h
Manages route guidance 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 (requires afetyGuideDelegate to be set) | @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 used for guidance. Not used in safe driving mode. | @property (nonatomic, readonly) KNTrip *trip |
useAutoReroute | Whether to use automatic reroutingYES: enabledNO: disabled(default: YES) | @property (nonatomic, assign) BOOL useAutoReroute |
useBackgroundUpdate | Whether to update in the backgroundYES: enabledNO: disabled(default: YES) | @property (nonatomic, assign) BOOL useBackgroundUpdate |
useDirSound | Whether to use directional voice guidanceYES: enabledNO: disabled(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 around the current location | @property (nonatomic, readonly) NSArray<KNSafety*> *aroundSafeties |
citsGuide | Latest C-ITS (Cooperative-Intelligent Transport Systems) information. This information 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 | Determines whether to sound a warning at a speed enforcement camera (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 with the specified 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 | Item to prioritize when selecting route guidance |
aAvoidOptions | Sections to avoid in the route |
stop
Stops route guidance and any voice guidance currently playing. It does not switch to safe driving mode afterward.
objc
- (void) stop