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

Loading...
Searching...
No Matches
Instance Methods | Class Methods | Properties | List of all members
AMapNaviBaseManager Class Reference

`#include <AMapNaviBaseManager.h>`

Inheritance diagram for AMapNaviBaseManager:

## Instance Methods
(BOOL) | - playTTS:forcePlay:
(void) | - pauseNaviSpeech
| 暂停内置导航语音播报，不影响导航状态。暂停期间产生的内置语音不会播报。 Pause built-in navigation voice prompts without affecting navigation state. Built-in prompts generated while paused will not be played.
(void) | - resumeNaviSpeech
| 恢复内置导航语音播报，不影响导航状态。 Resume built-in navigation voice prompts without affecting navigation state.
(void) | - setExternalLocation:isAMapCoordinate:
| 设置外部传入定位的信息 Set externally transmitted location information
(void) | - setEmulatorNaviSpeed:
| 设置模拟导航的速度,默认60 Set the speed of simulated navigation, default is 60
(BOOL) | - startEmulatorNavi
| 开始模拟导航. 注意：必须在路径规划成功的情况下，才能够开始模拟导航 Start simulated navigation. Note: Simulated navigation can only be started after successful route planning.
(BOOL) | - startGPSNavi
| 开始实时导航. 注意：必须在路径规划成功的情况下，才能够开始实时导航 Start real-time navigation. Note: Real-time navigation can only be started when the route planning is successful
(BOOL) | - startEmulatorNavi:
| 开始模拟导航. 注意：必须传入导航的路线组合routeGroup，才能够开始模拟导航. since 7.7.0 Start simulated navigation. Note: The routeGroup for navigation must be passed in to start simulated navigation. since 7.7.0
(BOOL) | - startGPSNavi:
| 开始实时导航. 注意：必须传入导航的路线组合routeGroup，才能够开始实时导航. since 7.7.0 Start real-time navigation. Note: The routeGroup of the navigation must be passed in to start real-time navigation. since 7.7.0
(BOOL) | - stopNavi
| 停止导航,包含实时导航和模拟导航 Stop navigation, including real-time navigation and simulated navigation
(void) | - pauseNavi
| 暂停导航,包含实时导航和模拟导航 Pause navigation, including real-time navigation and simulated navigation
(void) | - resumeNavi
| 继续导航,包含实时导航和模拟导航 Resume navigation, including real-time navigation and simulated navigation
(BOOL) | - readNaviInfoManual
| 实时导航中手动触发一次信息播报. 注意：该接口仅支持驾车和步行，骑行不支持此功能. Manually trigger an information broadcast during real-time navigation. Note: This interface only supports driving and walking, cycling does not support this function.
(NSString *) | - getStructuredInfoInRoute
| 获取行前结构体信息. since 10.1.300
(NSString *) | - getStructuredInfoInNavi
| 获取行中结构体信息. since 10.1.300
(nullable NSArray< AMapNaviGuide * > *) | - getNaviGuideList
| 获取导航路线的路线详情列表 Get the route details list of the navigation route

## Class Methods
(void) | + setAppLang:authCallback:
| 设置app语言类型和语音包路径，要确保AMapNaviDriveManager单例创建前设置。since 11.0.030 * Set the app language type and voice package path, ensure it is set before the singleton creation of AMapNaviDriveManager
(void) | + setAlcLogConfig:recordStorage:
| 设置ALC日志初始化配置，必须在导航任一manager单例创建前调用。since 11.1.080 Set ALC log initialization configuration. This must be called before creating any navigation manager singleton.

## Properties
AMapNaviMode | naviMode
BOOL | screenAlwaysBright
BOOL | pausesLocationUpdatesAutomatically
BOOL | allowsBackgroundLocationUpdates
BOOL | enableExternalLocation
CLLocation * | externalLocation
BOOL | isUseInternalTTS
BOOL | isUseTextPlay

## Detailed Description

注意:该类为导航控制器基类,请不要直接使用 Note: This class is the base class of the navigation controller, please do not use it directly

## Method Documentation

## ◆ getNaviGuideList

- (nullable NSArray< AMapNaviGuide * > *) getNaviGuideList |  |  |

获取导航路线的路线详情列表 Get the route details list of the navigation route

Returns
  导航路线的路线详情列表,参考 AMapNaviGuide 类. Route details list of navigation route, refer to AMapNaviGuide class.

## ◆ getStructuredInfoInNavi

- (NSString *) getStructuredInfoInNavi |  |  |

获取行中结构体信息. since 10.1.300

## ◆ getStructuredInfoInRoute

- (NSString *) getStructuredInfoInRoute |  |  |

获取行前结构体信息. since 10.1.300

## ◆ pauseNavi

- (void) pauseNavi |  |  |

暂停导航,包含实时导航和模拟导航 Pause navigation, including real-time navigation and simulated navigation

## ◆ pauseNaviSpeech

- (void) pauseNaviSpeech |  |  |

暂停内置导航语音播报，不影响导航状态。暂停期间产生的内置语音不会播报。 Pause built-in navigation voice prompts without affecting navigation state. Built-in prompts generated while paused will not be played.

## ◆ playTTS:forcePlay:

- (BOOL) playTTS: |  | (NSString *) | text
forcePlay: |  | (BOOL) | forcePlay

播放自定义文字，注意如果当前正在播放导航语音，可能导致播放失败， Play custom text. Note that if navigation audio is currently playing, playback may fail,

Parameters

  text | 自定义播报的文本 Custom broadcast text
  forcePlay | 是否强制播报，当传入true时如果当前有其他导航语音，会等导航语音播放完毕后 播放该文字，但是可能导致导航丢失掉关键引导信息；当传入false时如果当前有其他导航语音，则不播报 Whether to enforce playback: when set to true, if there are other navigation voice prompts currently playing, it will wait until the navigation voice playback is completed Play this text, but it may cause the navigation to lose critical guidance information; when false is passed, if there is other navigation voice currently playing, it will not be announced

Since
  10.0.520

## ◆ readNaviInfoManual

- (BOOL) readNaviInfoManual |  |  |

实时导航中手动触发一次信息播报. 注意：该接口仅支持驾车和步行，骑行不支持此功能. Manually trigger an information broadcast during real-time navigation. Note: This interface only supports driving and walking, cycling does not support this function.

Returns
  是否成功 Whether successful

## ◆ resumeNavi

- (void) resumeNavi |  |  |

继续导航,包含实时导航和模拟导航 Resume navigation, including real-time navigation and simulated navigation

## ◆ resumeNaviSpeech

- (void) resumeNaviSpeech |  |  |

恢复内置导航语音播报，不影响导航状态。 Resume built-in navigation voice prompts without affecting navigation state.

## ◆ setAlcLogConfig:recordStorage:

+ (void) setAlcLogConfig: |  | (AMapNaviALCLogLevel) | loglevelMask
recordStorage: |  | (BOOL) | recordStorage

设置ALC日志初始化配置，必须在导航任一manager单例创建前调用。since 11.1.080 Set ALC log initialization configuration. This must be called before creating any navigation manager singleton.

Parameters

  loglevelMask | ALC日志级别掩码，传0表示使用默认级别(Error | Fatal) ALC log level mask. Pass 0 to use the default levels (Error | Fatal)
  recordStorage | 是否写入ALC本地storage Whether to write ALC logs into local storage

## ◆ setAppLang:authCallback:

+ (void) setAppLang: |  | (AMapNaviAppLangOptions *) | options
authCallback: |  | (void(^)(BOOL isAuthSuc)) | authCallback

设置app语言类型和语音包路径，要确保AMapNaviDriveManager单例创建前设置。since 11.0.030 * Set the app language type and voice package path, ensure it is set before the singleton creation of AMapNaviDriveManager

Parameters

  options | 语言设置选项，包含语言类型和语音包地址。 Language settings options, including language type and voice package address.
  authCallback | 鉴权结果回调

## ◆ setEmulatorNaviSpeed:

- (void) setEmulatorNaviSpeed: |  | (int) | speed |

设置模拟导航的速度,默认60 Set the speed of simulated navigation, default is 60

Parameters

  speed | 模拟导航的速度(范围:[10,120]; 单位:km/h) Speed of simulated navigation (range: [10,120]; unit: km/h)

## ◆ setExternalLocation:isAMapCoordinate:

- (void) setExternalLocation: |  | (CLLocation *) | externalLocation
isAMapCoordinate: |  | (BOOL) | isAMapCoordinate

设置外部传入定位的信息 Set externally transmitted location information

Parameters

  externalLocation | 外部传入的定位信息 Externally transmitted location information
  isAMapCoordinate | 外部传入的坐标是否采用高德坐标,YES表示采用高德坐标(GCJ02),NO表示使用WGS84坐标. Whether externally transmitted coordinates use AMAP coordinates, YES means using AMAP coordinates (GCJ02), NO means using WGS84 coordinates.

## ◆ startEmulatorNavi

- (BOOL) startEmulatorNavi |  |  |

开始模拟导航. 注意：必须在路径规划成功的情况下，才能够开始模拟导航 Start simulated navigation. Note: Simulated navigation can only be started after successful route planning.

Returns
  是否成功 Whether successful

## ◆ startEmulatorNavi:

- (BOOL) startEmulatorNavi: |  | (AMapNaviRouteGroup *) | routeGroup |

开始模拟导航. 注意：必须传入导航的路线组合routeGroup，才能够开始模拟导航. since 7.7.0 Start simulated navigation. Note: The routeGroup for navigation must be passed in to start simulated navigation. since 7.7.0

Parameters

  routeGroup | 本次导航需要传入的路线组合 This navigation requires the input of the route combination

Returns
  是否成功 Whether successful

## ◆ startGPSNavi

- (BOOL) startGPSNavi |  |  |

开始实时导航. 注意：必须在路径规划成功的情况下，才能够开始实时导航 Start real-time navigation. Note: Real-time navigation can only be started when the route planning is successful

Returns
  是否成功 Whether successful

## ◆ startGPSNavi:

- (BOOL) startGPSNavi: |  | (AMapNaviRouteGroup *) | routeGroup |

开始实时导航. 注意：必须传入导航的路线组合routeGroup，才能够开始实时导航. since 7.7.0 Start real-time navigation. Note: The routeGroup of the navigation must be passed in to start real-time navigation. since 7.7.0

Parameters

  routeGroup | 本次导航需要传入的路线组合 This navigation requires the input of the route combination

Returns
  是否成功 Whether successful

## ◆ stopNavi

- (BOOL) stopNavi |  |  |

停止导航,包含实时导航和模拟导航 Stop navigation, including real-time navigation and simulated navigation

Returns
  是否停止导航成功，如果已经停止导航，再次调用返回NO. since 10.1.300

## Property Documentation

## ◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
| read write nonatomic assign

是否允许后台定位.默认为NO(只在iOS 9.0及以后版本起作用).注意:设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常. Whether to allow background location. Default is NO (only works in iOS 9.0 and later versions). Note: When set to YES, make sure that Location updates in Background Modes is selected, otherwise an exception will be thrown.

## ◆ enableExternalLocation

- (BOOL) enableExternalLocation
| read write nonatomic assign

是否采用外部传入定位信息.注意:默认NO. Whether to use externally provided location information. Note: Default is NO

## ◆ externalLocation

- (CLLocation*) externalLocation
| read write nonatomic copy

外部传入定位信息(enableExternalLocation为YES时有效).该方法坐标需使用WGS84坐标系. External location information (valid when enableExternalLocation is YES). The coordinates of this method need to use the WGS84 coordinate system.

## ◆ isUseInternalTTS

- (BOOL) isUseInternalTTS
| read write nonatomic assign

是否使用内置播放器进行导航播报, 如果为YES，就是由导航SDK来播报导航信息. 默认为NO. since 5.5.0 Whether to use the built-in player for navigation announcements. If set to YES, the navigation SDK will broadcast navigation information. Default is NO. since 5.5.0

## ◆ isUseTextPlay

- (BOOL) isUseTextPlay
| read write nonatomic assign

是否使用文本播放，如果设置YES，使用文本TTS播放， NO使用PCM播报，默认是NO。 Whether to use text playback, if set to YES, use text TTS playback, NO use PCM playback, default is NO.

## ◆ naviMode

- (AMapNaviMode) naviMode
| read nonatomic assign

当前导航模式,参考 AMapNaviMode . The current navigation mode, refer to AMapNaviMode

## ◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
| read write nonatomic assign

指定定位是否会被系统自动暂停。默认为YES。 Specifies whether the location will be automatically paused by the system. Default is YES

## ◆ screenAlwaysBright

- (BOOL) screenAlwaysBright
| read write nonatomic assign

是否在导航过程中让屏幕常亮,默认YES. Whether to keep the screen always on during navigation, default is YES.

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

- AMapNaviBaseManager.h

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