高德地图SDK(导航) V11.2.0501

Loading...
Searching...
No Matches
Instance Methods | List of all members
<AMapNaviDriveManagerDelegate> Protocol Reference

`#include <AMapNaviDriveManager.h>`

Inheritance diagram for <AMapNaviDriveManagerDelegate>:

## Instance Methods
(void) | - driveManager:error:
| 发生错误时,会调用代理的此方法 When an error occurs, this method of the delegate will be called
(void) | - driveManagerOnCalculateRouteSuccess:
| 驾车路径规划成功后的回调函数，请尽量使用 -driveManager:onCalculateRouteSuccessWithType: 替代此方法 Callback function after successful driving route planning, please try to use -driveManager:onCalculateRouteSuccessWithType: instead of this method
(void) | - driveManager:onCalculateRouteSuccessWithType:
| 驾车路径规划成功后的回调函数 since 6.1.0 Callback function after successful driving route planning
(void) | - driveManager:onCalculateRouteSuccessWithType:calculateRouteResult:
| 驾车路径规划成功后的回调函数 since 10.1.111 Callback function after successful driving route planning
(void) | - driveManager:onCalculateRouteFailure:
| 驾车路径规划失败后的回调函数. 从5.3.0版本起,算路失败后导航SDK只对外通知算路失败,SDK内部不再执行停止导航的相关逻辑.因此,当算路失败后,不会收到 driveManager:updateNaviMode: 回调; AMapNaviDriveManager.naviMode 不会切换到 AMapNaviModeNone 状态, 而是会保持在 AMapNaviModeGPS or AMapNaviModeEmulator 状态. Callback function after driving route planning fails. Starting from version 5.3.0, when route calculation fails, the navigation SDK only notifies the failure externally and no longer executes the related logic to stop navigation internally. Therefore, when route calculation fails, the driveManager:updateNaviMode: callback will not be received; AMapNaviDriveManager.naviMode will not switch to AMapNaviModeNone state, but will remain in AMapNaviModeGPS or AMapNaviModeEmulator state.
(void) | - driveManager:onCalculateRouteFailure:routePlanType:
| 驾车路径规划失败后的回调函数. since 6.1.0 Callback function after driving route planning fails
(void) | - driveManager:onCalculateRouteFailure:routePlanType:calculateRouteResult:
| 驾车路径规划失败后的回调函数. since 10.1.111 Callback function after driving route planning fails
(void) | - driveManager:didStartNavi:
| 启动导航后回调函数 Callback function after navigation starts
(void) | - driveManager:didStopNavi:
| 停止导航后回调函数. since 10.1.300
(void) | - driveManagerNeedRecalculateRouteForYaw:
| 出现偏航需要重新计算路径时的回调函数.偏航后 SDK 内部将自动重新路径规划,该方法将在自动重新路径规划前通知您进行额外的处理，您无需自行算路. Callback function when route recalculation is needed due to deviation. After deviation, the SDK will automatically replan the route internally. This method will notify you for additional processing before automatic rerouting, so you don't need to calculate the route yourself.
(void) | - driveManagerNeedRecalculateRouteForTrafficJam:
| 前方遇到拥堵需要重新计算路径时的回调函数.拥堵后 SDK 将自动重新路径规划,该方法将在自动重新路径规划前通知您进行额外的处理，您无需自行算路. The callback function when encountering congestion ahead and needing to recalculate the route. After congestion, the SDK will automatically recalculate the route. This method will notify you for additional processing before the automatic route recalculation, and you do not need to calculate the route yourself.
(void) | - driveManager:onArrivedWayPoint:
| 导航到达某个途经点的回调函数 Callback function when navigation reaches a waypoint
(BOOL) | - driveManagerIsNaviSoundPlaying:
| 开发者请根据实际情况返回是否正在播报语音，如果正在播报语音，请返回YES, 如果没有在播报语音，请返回NO Developers, please return whether voice is currently being broadcast based on the actual situation. If voice is being broadcast, please return YES. If no voice is being broadcast, please return NO
(void) | - driveManager:playNaviSoundString:soundStringType:
| 导航播报信息回调函数,此回调函数需要和driveManagerIsNaviSoundPlaying:配合使用 Navigation broadcast information callback function, this callback function needs to be used in conjunction with driveManagerIsNaviSoundPlaying:
(void) | - driveManagerDidEndEmulatorNavi:
| 模拟导航到达目的地后的回调函数 Callback function after simulated navigation reaches the destination
(void) | - driveManagerOnArrivedDestination:
| 实时导航到达目的地后的回调函数 Callback function after real-time navigation reaches the destination
(void) | - driveManager:onNaviPlayRing:
| 导航(巡航)过程中播放提示音的回调函数. since 5.4.0 Callback function for playing prompts during navigation (cruising)
(void) | - driveManager:updateGPSSignalStrength:
| 卫星定位信号强弱回调函数. since 5.5.0 Callback function for satellite positioning signal strength
(void) | - driveManager:postRouteNotification:
| 实时导航中关于路线的‘信息通知’回调. since 6.2.0 'Information notification' callback regarding the route in real-time navigation
(void) | - driveManager:onSuggestChangeMainNaviRoute:
| 多路线实时导航模式下，建议将某备选路线切换为主导航路线的回调函数. since 6.3.0 Callback function suggesting switching an alternative route to the main navigation route in multi-route real-time navigation mode
(void) | - driveManager:onUpdateDriveComfort:
| 驾车导航道路舒适度回调。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.3.5 Driving navigation road comfort callback. Special note: This is a paid API. If you wish to apply for a trial or official use, please submit a business cooperation ticket via the ticket system for communication https://lbs.amap.com/
(void) | - driveManager:onUpdateDriveEvent:
| 驾车导航三急（急加速/急减速/急转弯）事件回调。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.3.5 Driving navigation three emergency (rapid acceleration/rapid deceleration/rapid turning) event callback. Special note: The current interface is a paid interface. If you apply for a trial or formal application, please submit a business cooperation work order through the work order system for communication. https://lbs. amap. com/since 9.3.5
(void) | - driveManager:onUpdateNaviSpeedLimitSection:
| 路段限速值，进入新的路段后，会回调当前路段的限速值，进入没有限速的路段时，限速值回调为0。since 9.6.0 The speed limit value of the road section. After entering a new road section, the speed limit value of the current road section will be called back. When entering a road section without a speed limit, the speed limit value will be called back to 0. since 9.6.0
(void) | - driveManager:onStartPlayPCMData:
| 开始播放PCM数据回调函数 Callback function when starting to play PCM data
(void) | - driveManager:onPlayPCMData:
| 播放PCM数据回调函数 Callback function when playing PCM data
(void) | - driveManager:onPCMDataFinished:
| PCM数据播放完成回调函数 Callback function when PCM data playback is finished.

## Method Documentation

## ◆ driveManager:didStartNavi:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
didStartNavi: |  | (AMapNaviMode) | naviMode
| optional

启动导航后回调函数 Callback function after navigation starts

Parameters

  naviMode | 导航类型，参考 AMapNaviMode . Navigation type, refer to AMapNaviMode
  driveManager | 驾车导航管理类 Driving navigation management class

## ◆ driveManager:didStopNavi:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
didStopNavi: |  | (BOOL) | isStopped
| optional

停止导航后回调函数. since 10.1.300

Parameters

  driveManager | 驾车导航管理类
  isStopped | 是否停止导航成功

## ◆ driveManager:error:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
error: |  | (NSError *) | error
| optional

发生错误时,会调用代理的此方法 When an error occurs, this method of the delegate will be called

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  error | 错误信息 Error message

## ◆ driveManager:onArrivedWayPoint:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onArrivedWayPoint: |  | (int) | wayPointIndex
| optional

导航到达某个途经点的回调函数 Callback function when navigation reaches a waypoint

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  wayPointIndex | 到达的途径点的索引值，表示的是 AMapNaviRoute.wayPointsInfo 的索引. The index value of the reached waypoint, which represents the index of AMapNaviRoute.wayPointsInfo.

## ◆ driveManager:onCalculateRouteFailure:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onCalculateRouteFailure: |  | (NSError *) | error
| optional

驾车路径规划失败后的回调函数. 从5.3.0版本起,算路失败后导航SDK只对外通知算路失败,SDK内部不再执行停止导航的相关逻辑.因此,当算路失败后,不会收到 driveManager:updateNaviMode: 回调; AMapNaviDriveManager.naviMode 不会切换到 AMapNaviModeNone 状态, 而是会保持在 AMapNaviModeGPS or AMapNaviModeEmulator 状态. Callback function after driving route planning fails. Starting from version 5.3.0, when route calculation fails, the navigation SDK only notifies the failure externally and no longer executes the related logic to stop navigation internally. Therefore, when route calculation fails, the driveManager:updateNaviMode: callback will not be received; AMapNaviDriveManager.naviMode will not switch to AMapNaviModeNone state, but will remain in AMapNaviModeGPS or AMapNaviModeEmulator state.

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  error | 错误信息,error.code参照 AMapNaviCalcRouteState Error message, error.code reference AMapNaviCalcRouteState

## ◆ driveManager:onCalculateRouteFailure:routePlanType:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onCalculateRouteFailure: |  | (NSError *) | error
routePlanType: |  | (AMapNaviRoutePlanType) | type
| optional

驾车路径规划失败后的回调函数. since 6.1.0 Callback function after driving route planning fails

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  error | 错误信息,error.code参照 AMapNaviCalcRouteState Error message, error.code reference AMapNaviCalcRouteState
  type | 路径规划类型,参考 AMapNaviRoutePlanType Route planning type, refer to AMapNaviRoutePlanType

## ◆ driveManager:onCalculateRouteFailure:routePlanType:calculateRouteResult:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onCalculateRouteFailure: |  | (NSError *) | error
routePlanType: |  | (AMapNaviRoutePlanType) | type
calculateRouteResult: |  | (AMapNaviCalculateRouteResult *) | calculateRouteResult
| optional

驾车路径规划失败后的回调函数. since 10.1.111 Callback function after driving route planning fails

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  error | 错误信息,error.code参照 AMapNaviCalcRouteState Error message, error.code reference AMapNaviCalcRouteState
  type | 路径规划类型,参考 AMapNaviRoutePlanType Route planning type, refer to AMapNaviRoutePlanType
  calculateRouteResult | calculateRouteResult 算路结果，算路唯一标识在此对象中。 Routing result, the unique identifier of the routing is in this object

## ◆ driveManager:onCalculateRouteSuccessWithType:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onCalculateRouteSuccessWithType: |  | (AMapNaviRoutePlanType) | type
| optional

驾车路径规划成功后的回调函数 since 6.1.0 Callback function after successful driving route planning

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  type | 路径规划类型,参考 AMapNaviRoutePlanType Route planning type, refer to AMapNaviRoutePlanType

## ◆ driveManager:onCalculateRouteSuccessWithType:calculateRouteResult:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onCalculateRouteSuccessWithType: |  | (AMapNaviRoutePlanType) | type
calculateRouteResult: |  | (AMapNaviCalculateRouteResult *) | calculateRouteResult
| optional

驾车路径规划成功后的回调函数 since 10.1.111 Callback function after successful driving route planning

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  type | 路径规划类型,参考 AMapNaviRoutePlanType Route planning type, refer to AMapNaviRoutePlanType
  calculateRouteResult | 算路结果，算路唯一标识在此对象中。 Route calculation result, the unique identifier of the route calculation is in this object

## ◆ driveManager:onNaviPlayRing:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onNaviPlayRing: |  | (AMapNaviRingType) | ringType
| optional

导航(巡航)过程中播放提示音的回调函数. since 5.4.0 Callback function for playing prompts during navigation (cruising)

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  ringType | 提示音类型,参考 AMapNaviRingType . Prompt tone type, refer to AMapNaviRingType

## ◆ driveManager:onPCMDataFinished:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onPCMDataFinished: |  | (nonnull AMapNaviPCMTask *) | playTask
| optional

PCM数据播放完成回调函数 Callback function when PCM data playback is finished.

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  playTask | PCM播放任务对象 PCM play task object

## ◆ driveManager:onPlayPCMData:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onPlayPCMData: |  | (nonnull AMapNaviPCMTask *) | playTask
| optional

播放PCM数据回调函数 Callback function when playing PCM data

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  info | PCM数据信息对象 PCM data info object

## ◆ driveManager:onStartPlayPCMData:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onStartPlayPCMData: |  | (nonnull AMapNaviPCMTask *) | playTask
| optional

开始播放PCM数据回调函数 Callback function when starting to play PCM data

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  playTask | PCM播放任务对象 PCM play task object

## ◆ driveManager:onSuggestChangeMainNaviRoute:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
onSuggestChangeMainNaviRoute: |  | (AMapNaviSuggestChangeMainNaviRouteInfo *) | suggestChangeMainNaviRouteInfo
| optional

多路线实时导航模式下，建议将某备选路线切换为主导航路线的回调函数. since 6.3.0 Callback function suggesting switching an alternative route to the main navigation route in multi-route real-time navigation mode

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  suggestChangeMainNaviRouteInfo | 切换主导航路线的相关信息, 参考 AMapNaviSuggestChangeMainNaviRouteInfo . Information about switching the main navigation route, refer to AMapNaviSuggestChangeMainNaviRouteInfo

## ◆ driveManager:onUpdateDriveComfort:

- (void) driveManager: |  | (AMapNaviDriveManager *_Nullable) | manager
onUpdateDriveComfort: |  | (AMapNaviDriveComfort *_Nonnull) | driveComfort
| optional

驾车导航道路舒适度回调。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.3.5 Driving navigation road comfort callback. Special note: This is a paid API. If you wish to apply for a trial or official use, please submit a business cooperation ticket via the ticket system for communication https://lbs.amap.com/

Parameters

  manager | 驾车导航管理类 Driving navigation management class
  driveComfort | 驾车舒适度信息对象 Driving comfort information object

## ◆ driveManager:onUpdateDriveEvent:

- (void) driveManager: |  | (AMapNaviDriveManager *_Nullable) | manager
onUpdateDriveEvent: |  | (AMapNaviDriveEvent *_Nonnull) | driveEvent
| optional

驾车导航三急（急加速/急减速/急转弯）事件回调。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.3.5 Driving navigation three emergency (rapid acceleration/rapid deceleration/rapid turning) event callback. Special note: The current interface is a paid interface. If you apply for a trial or formal application, please submit a business cooperation work order through the work order system for communication. https://lbs. amap. com/since 9.3.5

驾车导航三急（急加速/急减速/急转弯）事件回调。特别注意：当前接口为收费接口，您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.3.5 Driving navigation three urgent (sudden acceleration/sudden deceleration/sudden turn) event callback. Special note: This is a paid API. If you wish to apply for a trial or official use, please submit a business cooperation ticket via the ticket system for communication https://lbs.amap.com/

Parameters

  manager | 驾车导航管理类 Driving navigation management class
  driveEvent | 驾驶事件信息对象 Driving event information object

## ◆ driveManager:onUpdateNaviSpeedLimitSection:

- (void) driveManager: |  | (AMapNaviDriveManager *_Nullable) | manager
onUpdateNaviSpeedLimitSection: |  | (NSInteger) | speed
| optional

路段限速值，进入新的路段后，会回调当前路段的限速值，进入没有限速的路段时，限速值回调为0。since 9.6.0 The speed limit value of the road section. After entering a new road section, the speed limit value of the current road section will be called back. When entering a road section without a speed limit, the speed limit value will be called back to 0. since 9.6.0

路段限速值，进入新的路段后，会回调当前路段的限速值，进入没有限速的路段时，限速值回调为0。since 9.6.0 Road speed limit value. After entering a new road section, the speed limit value of the current section will be called back. When entering a road section without a speed limit, the speed limit value will be called back to 0

Parameters

  manager | 驾车导航管理类 Driving navigation management class
  speed | 路段限速值 Road speed limit value

## ◆ driveManager:playNaviSoundString:soundStringType:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
playNaviSoundString: |  | (NSString *) | soundString
soundStringType: |  | (AMapNaviSoundType) | soundStringType
| optional

导航播报信息回调函数,此回调函数需要和driveManagerIsNaviSoundPlaying:配合使用 Navigation broadcast information callback function, this callback function needs to be used in conjunction with driveManagerIsNaviSoundPlaying:

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  soundString | 播报文字 Broadcast text
  soundStringType | 播报类型,参考 AMapNaviSoundType. 注意：since 6.0.0 AMapNaviSoundType 只返回 AMapNaviSoundTypeDefault Broadcast type, refer to AMapNaviSoundType. Note: since 6.0.0 AMapNaviSoundType only returns AMapNaviSoundTypeDefault

## ◆ driveManager:postRouteNotification:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
postRouteNotification: |  | (AMapNaviRouteNotifyData *) | notifyData
| optional

实时导航中关于路线的‘信息通知’回调. since 6.2.0 'Information notification' callback regarding the route in real-time navigation

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  notifyData | 通知信息, 参考 AMapNaviRouteNotifyData . Notification information, refer to AMapNaviRouteNotifyData

## ◆ driveManager:updateGPSSignalStrength:

- (void) driveManager: |  | (AMapNaviDriveManager *) | driveManager
updateGPSSignalStrength: |  | (AMapNaviGPSSignalStrength) | gpsSignalStrength
| optional

卫星定位信号强弱回调函数. since 5.5.0 Callback function for satellite positioning signal strength

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class
  gpsSignalStrength | 卫星定位信号强度类型,参考 AMapNaviGPSSignalStrength . Satellite positioning signal strength type, refer to AMapNaviGPSSignalStrength

## ◆ driveManagerDidEndEmulatorNavi:

- (void) driveManagerDidEndEmulatorNavi: |  | (AMapNaviDriveManager *) | driveManager |
| optional

模拟导航到达目的地后的回调函数 Callback function after simulated navigation reaches the destination

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

## ◆ driveManagerIsNaviSoundPlaying:

- (BOOL) driveManagerIsNaviSoundPlaying: |  | (AMapNaviDriveManager *) | driveManager |
| optional

开发者请根据实际情况返回是否正在播报语音，如果正在播报语音，请返回YES, 如果没有在播报语音，请返回NO Developers, please return whether voice is currently being broadcast based on the actual situation. If voice is being broadcast, please return YES. If no voice is being broadcast, please return NO

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

Returns
  如一直返回YES，SDK内部会认为外界声道较忙，导致部分文字无法吐出; 如一直返回NO，文字吐出的频率可能会过快，会出现打断的情况，所以请根据实际情况返回。 If YES is returned continuously, the SDK will consider the external audio channel to be busy, causing some text to be unable to be output; if NO is returned continuously, the frequency of text output may be too fast, leading to interruptions, so please return based on the actual situation.

## ◆ driveManagerNeedRecalculateRouteForTrafficJam:

- (void) driveManagerNeedRecalculateRouteForTrafficJam: |  | (AMapNaviDriveManager *) | driveManager |
| optional

前方遇到拥堵需要重新计算路径时的回调函数.拥堵后 SDK 将自动重新路径规划,该方法将在自动重新路径规划前通知您进行额外的处理，您无需自行算路. The callback function when encountering congestion ahead and needing to recalculate the route. After congestion, the SDK will automatically recalculate the route. This method will notify you for additional processing before the automatic route recalculation, and you do not need to calculate the route yourself.

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

## ◆ driveManagerNeedRecalculateRouteForYaw:

- (void) driveManagerNeedRecalculateRouteForYaw: |  | (AMapNaviDriveManager *) | driveManager |
| optional

出现偏航需要重新计算路径时的回调函数.偏航后 SDK 内部将自动重新路径规划,该方法将在自动重新路径规划前通知您进行额外的处理，您无需自行算路. Callback function when route recalculation is needed due to deviation. After deviation, the SDK will automatically replan the route internally. This method will notify you for additional processing before automatic rerouting, so you don't need to calculate the route yourself.

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

## ◆ driveManagerOnArrivedDestination:

- (void) driveManagerOnArrivedDestination: |  | (AMapNaviDriveManager *) | driveManager |
| optional

实时导航到达目的地后的回调函数 Callback function after real-time navigation reaches the destination

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

## ◆ driveManagerOnCalculateRouteSuccess:

- (void) driveManagerOnCalculateRouteSuccess: |  | (AMapNaviDriveManager *) | driveManager |
| optional

驾车路径规划成功后的回调函数，请尽量使用 -driveManager:onCalculateRouteSuccessWithType: 替代此方法 Callback function after successful driving route planning, please try to use -driveManager:onCalculateRouteSuccessWithType: instead of this method

Parameters

  driveManager | 驾车导航管理类 Driving navigation management class

The documentation for this protocol was generated from the following file:

- AMapNaviDriveManager.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。