// // AMapNaviBaseManager.h // AMapNaviKit // // Created by 刘博 on 16/1/12. // Copyright © 2016年 Amap. All rights reserved. // #import "AMapNaviCommonObj.h" NS_ASSUME_NONNULL_BEGIN @class CLLocation; @class AMapNaviInfo; @class AMapNaviRoute; @class AMapNaviLocation; @class AMapNaviStatisticsInfo; @class AMapNaviRouteGroup; @class AMapNaviCalculateRouteResult; @class AMapNaviTTSInfo; ///注意:该类为导航控制器基类,请不要直接使用 ///Note: This class is the base class of the navigation controller, please do not use it directly @interface AMapNaviBaseManager : NSObject #pragma mark - Navi Mode ///当前导航模式,参考 AMapNaviMode . ///The current navigation mode, refer to AMapNaviMode @property (nonatomic, readonly) AMapNaviMode naviMode; #pragma mark - Options ///是否在导航过程中让屏幕常亮,默认YES. ///Whether to keep the screen always on during navigation, default is YES. @property (nonatomic, assign) BOOL screenAlwaysBright; ///指定定位是否会被系统自动暂停。默认为YES。 ///Specifies whether the location will be automatically paused by the system. Default is YES @property(nonatomic, assign) BOOL pausesLocationUpdatesAutomatically; ///是否允许后台定位.默认为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. @property (nonatomic, assign) BOOL allowsBackgroundLocationUpdates; #pragma mark - External Location ///是否采用外部传入定位信息.注意:默认NO. ///Whether to use externally provided location information. Note: Default is NO @property (nonatomic, assign) BOOL enableExternalLocation; ///外部传入定位信息(enableExternalLocation为YES时有效).该方法坐标需使用WGS84坐标系. ///External location information (valid when enableExternalLocation is YES). The coordinates of this method need to use the WGS84 coordinate system. @property (nonatomic, copy) CLLocation *externalLocation; ///是否使用内置播放器进行导航播报, 如果为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 @property (nonatomic, assign) BOOL isUseInternalTTS; ///是否使用文本播放,如果设置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. @property (nonatomic, assign) BOOL isUseTextPlay; /// 播放自定义文字,注意如果当前正在播放导航语音,可能导致播放失败, /// Play custom text. Note that if navigation audio is currently playing, playback may fail, /// @param text 自定义播报的文本 /// Custom broadcast text /// @param 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 - (BOOL)playTTS:(NSString *)text forcePlay:(BOOL)forcePlay; #pragma mark - Navi Speech /** * @brief 暂停内置导航语音播报,不影响导航状态。暂停期间产生的内置语音不会播报。 * Pause built-in navigation voice prompts without affecting navigation state. Built-in prompts generated while paused will not be played. */ - (void)pauseNaviSpeech; /** * @brief 恢复内置导航语音播报,不影响导航状态。 * Resume built-in navigation voice prompts without affecting navigation state. */ - (void)resumeNaviSpeech; /** * @brief 设置外部传入定位的信息 * Set externally transmitted location information * @param externalLocation 外部传入的定位信息 * Externally transmitted location information * @param isAMapCoordinate 外部传入的坐标是否采用高德坐标,YES表示采用高德坐标(GCJ02),NO表示使用WGS84坐标. * Whether externally transmitted coordinates use AMAP coordinates, YES means using AMAP coordinates (GCJ02), NO means using WGS84 coordinates. */ - (void)setExternalLocation:(CLLocation *)externalLocation isAMapCoordinate:(BOOL)isAMapCoordinate; #pragma mark - 实时导航 & 模拟导航 Real-time Navigation & Simulation Navigation /** * @brief 设置模拟导航的速度,默认60 * Set the speed of simulated navigation, default is 60 * @param speed 模拟导航的速度(范围:[10,120]; 单位:km/h) * Speed of simulated navigation (range: [10,120]; unit: km/h) */ - (void)setEmulatorNaviSpeed:(int)speed; /** * @brief 开始模拟导航. 注意:必须在路径规划成功的情况下,才能够开始模拟导航 * Start simulated navigation. Note: Simulated navigation can only be started after successful route planning. * @return 是否成功 * Whether successful */ - (BOOL)startEmulatorNavi; /** * @brief 开始实时导航. 注意:必须在路径规划成功的情况下,才能够开始实时导航 * Start real-time navigation. Note: Real-time navigation can only be started when the route planning is successful * @return 是否成功 * Whether successful */ - (BOOL)startGPSNavi; /** * @brief 开始模拟导航. 注意:必须传入导航的路线组合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 * @param routeGroup 本次导航需要传入的路线组合 * This navigation requires the input of the route combination * @return 是否成功 * Whether successful */ - (BOOL)startEmulatorNavi:(AMapNaviRouteGroup *)routeGroup; /** * @brief 开始实时导航. 注意:必须传入导航的路线组合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 * @param routeGroup 本次导航需要传入的路线组合 * This navigation requires the input of the route combination * @return 是否成功 * Whether successful */ - (BOOL)startGPSNavi:(AMapNaviRouteGroup *)routeGroup; /** * @brief 停止导航,包含实时导航和模拟导航 * Stop navigation, including real-time navigation and simulated navigation * @return 是否停止导航成功,如果已经停止导航,再次调用返回NO. since 10.1.300 */ - (BOOL)stopNavi; /** * @brief 暂停导航,包含实时导航和模拟导航 * Pause navigation, including real-time navigation and simulated navigation */ - (void)pauseNavi; /** * @brief 继续导航,包含实时导航和模拟导航 * Resume navigation, including real-time navigation and simulated navigation */ - (void)resumeNavi; /** * @brief 设置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 * @param options 语言设置选项,包含语言类型和语音包地址。 * Language settings options, including language type and voice package address. *@param authCallback 鉴权结果回调 */ + (void)setAppLang:(AMapNaviAppLangOptions *)options authCallback:(void(^)(BOOL isAuthSuc))authCallback; /** * @brief 设置ALC日志初始化配置,必须在导航任一manager单例创建前调用。since 11.1.080 * Set ALC log initialization configuration. This must be called before creating any navigation manager singleton. * @param loglevelMask ALC日志级别掩码,传0表示使用默认级别(Error | Fatal) * ALC log level mask. Pass 0 to use the default levels (Error | Fatal) * @param recordStorage 是否写入ALC本地storage * Whether to write ALC logs into local storage */ + (void)setAlcLogConfig:(AMapNaviALCLogLevel)loglevelMask recordStorage:(BOOL)recordStorage; #pragma mark - Manual /** * @brief 实时导航中手动触发一次信息播报. 注意:该接口仅支持驾车和步行,骑行不支持此功能. * Manually trigger an information broadcast during real-time navigation. Note: This interface only supports driving and walking, cycling does not support this function. * @return 是否成功 * Whether successful */ - (BOOL)readNaviInfoManual; #pragma mark - 导航结构体信息 /** * @brief 获取行前结构体信息. since 10.1.300 */ - (NSString *)getStructuredInfoInRoute; /** * @brief 获取行中结构体信息. since 10.1.300 */ - (NSString *)getStructuredInfoInNavi; #pragma mark - Navi Guide /** * @brief 获取导航路线的路线详情列表 * Get the route details list of the navigation route * @return 导航路线的路线详情列表,参考 AMapNaviGuide 类. * Route details list of navigation route, refer to AMapNaviGuide class. */ - (nullable NSArray *)getNaviGuideList __attribute__((deprecated("Deprecated, please use guideGroups from AMapNaviRoute instead of since 7.5.0"))); @end NS_ASSUME_NONNULL_END