// // AMapNaviDriveDataRepresentable.h // AMapNaviKit // // Created by 刘博 on 16/1/13. // Copyright © 2016年 Amap. All rights reserved. // #import "AMapNaviCommonObj.h" NS_ASSUME_NONNULL_BEGIN @class AMapNaviInfo; @class AMapNaviRoute; @class AMapNaviLocation; @class AMapNaviStatisticsInfo; @class AMapNaviDriveManager; /** * @brief AMapNaviDriveDataRepresentable协议.实例对象可以通过实现该协议,并将其通过 AMapNaviDriveManager 的addDataRepresentative:方法进行注册,便可获取导航过程中的导航数据更新. * AMapNaviDriveDataRepresentable Protocol. Instance objects can implement this protocol and register it through the addDataRepresentative: method of AMapNaviDriveManager to receive navigation data updates during the navigation process. * 可以根据不同需求,选取使用特定的数据进行导航界面自定义. * The navigation interface can be customized by selecting specific data according to different needs. * AMapNaviDriveView 即通过该协议实现导航过程展示.也可以依据导航数据的更新进行其他的逻辑处理. * AMapNaviDriveView displays the navigation process through this protocol. Other logic processing can also be performed based on the update of navigation data. */ @protocol AMapNaviDriveDataRepresentable @optional /** * @brief 导航模式更新回调. 从5.3.0版本起,算路失败后导航SDK只对外通知算路失败,SDK内部不再执行停止导航的相关逻辑.因此,当算路失败后,不会收到 driveManager:updateNaviMode: 回调; AMapNaviDriveManager.naviMode 不会切换到 AMapNaviModeNone 状态, 而是会保持在 AMapNaviModeGPS or AMapNaviModeEmulator 状态. * Navigation mode update callback. Starting from version 5.3.0, after route calculation fails, the navigation SDK only notifies externally about the route calculation failure, and the SDK no longer executes the related logic to stop navigation internally. Therefore, after route calculation fails, the driveManager:updateNaviMode: callback will not be received. AMapNaviDriveManager.naviMode will not switch to the AMapNaviModeNone state, but will remain in the AMapNaviModeGPS or AMapNaviModeEmulator state. * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param naviMode 导航模式,参考 AMapNaviMode 值 * Navigation mode, refer to AMapNaviMode value */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNaviMode:(AMapNaviMode)naviMode; /** * @brief 路径ID更新回调. 注意:请不要在此回调中调用 -selectNaviRouteWithRouteID: 接口,否则会出现死循环调用. * Route ID update callback. Note: Please do not call the -selectNaviRouteWithRouteID: interface in this callback, otherwise it will cause an infinite loop call. * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param naviRouteID 导航路径ID * Navigation Path ID */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNaviRouteID:(NSInteger)naviRouteID; /** * @brief 路径信息更新回调. 注意:请不要在此回调中调用 -selectNaviRouteWithRouteID: 接口,否则会出现死循环调用. * Path Information Update Callback. Note: Please do not call the -selectNaviRouteWithRouteID: interface in this callback, otherwise it will cause an infinite loop call. * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param naviRoute 路径信息,参考 AMapNaviRoute 类 * Path Information, refer to AMapNaviRoute class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNaviRoute:(nullable AMapNaviRoute *)naviRoute; /** * @brief 导航信息更新回调 * Navigation Information Update Callback * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param naviInfo 导航信息,参考 AMapNaviInfo 类 * Navigation Information, refer to AMapNaviInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNaviInfo:(nullable AMapNaviInfo *)naviInfo; /** * @brief 自车位置更新回调 (since 5.0.0,模拟导航和实时导航的自车位置更新都会走此回调) * Self-Vehicle Position Update Callback (since 5.0.0, both simulated navigation and real-time navigation's ego vehicle position updates will trigger this callback) * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param naviLocation 自车位置信息,参考 AMapNaviLocation 类 * Self-Vehicle Position Information, refer to AMapNaviLocation class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNaviLocation:(nullable AMapNaviLocation *)naviLocation; /** * @brief 需要显示路口放大图时的回调。注意:10.0.2版本开始,自定义View中如果设置了showCrossImage为YES,回调中crossImage为nil * Callback when an enlarged intersection view is needed. Note: Starting from version 10.0.2, if showCrossImage is set to YES in a custom View, crossImage will be nil in the callback. * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param crossImage 路口放大图Image(宽:高 = 25:16) * Junction enlarged view Image (width:height = 25:16) */ - (void)driveManager:(AMapNaviDriveManager *)driveManager showCrossImage:(nullable UIImage *)crossImage; /** * @brief 需要隐藏路口放大图时的回调。 * Callback when the junction enlarged view needs to be hidden. * @param driveManager 驾车导航管理类 * Driving Navigation Management class */ - (void)driveManagerHideCrossImage:(AMapNaviDriveManager *)driveManager; /** * @brief 需要显示车道信息时的回调.可通过 UIImage *CreateLaneInfoImageWithLaneInfo(NSString *laneBackInfo, NSString *laneSelectInfo); 方法创建车道信息图片 * Callback when lane information needs to be displayed. Lane information images can be created using the UIImage *CreateLaneInfoImageWithLaneInfo(NSString *laneBackInfo, NSString *laneSelectInfo); method. * 0-直行; 1-左转; 2-直行和左转; 3-右转; * 0-Go straight; 1-Turn left; 2-Go straight and turn left; 3-Turn right; * 4-直行和右转; 5-左转掉头; 6-左转和右转; 7-直行和左转和右转; * 4-Go straight and turn right; 5-U-turn left; 6-Turn left and right; 7-Go straight, turn left and right; * 8-右转掉头; 9-直行和左转掉头; 10-直行和右转掉头; 11-左转和左转掉头; * 8-Turn right and make a U-turn; 9-Go straight and make a left U-turn; 10-Go straight and make a right U-turn; 11-Turn left and make a left U-turn; * 12-右转和右转掉头; 13-直行左侧道路变宽; 14-左转和左转掉头左侧变宽; 16-直行和左转和左掉头; * 12-Turn right and make a right U-turn; 13-The left lane widens when going straight; 14-The left lane widens when turning left and making a left U-turn; 16-Go straight, turn left, and make a left U-turn; * 17-右转和左掉头; 18-左转和左掉头和右转; 19-直行和右转和左掉头; 20-左转和右掉头; 21-公交车道; 23-可变车道; * 17-Right turn and left U-turn; 18-Left turn and left U-turn and right turn; 19-Straight and right turn and left U-turn; 20-Left turn and right U-turn; 21-Bus lane; 23-Variable lane; * 255-只会出现在laneSelectInfo,表示目前规划的路径,不可以走这个车道 * 255-Only appears in laneSelectInfo, indicating that the currently planned route cannot take this lane * * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param laneBackInfo 车道背景信息,例如:@"1|0|0|4",表示当前道路有4个车道,分别为"左转|直行|直行|右转+直行" * Lane background information, for example: @"1|0|0|4", indicating that the current road has 4 lanes, which are "left turn | straight | straight | right turn + straight * @param laneSelectInfo 车道前景信息,其个数一定和车道背景信息一样,例如:@"255|0|0|0",表示选择了当前道路的第2、3、4三个直行车道。 * The number of lane foreground information must be the same as the lane background information, for example: @"255|0|0|0" indicates that the second, third, and fourth straight lanes of the current road are selected. */ - (void)driveManager:(AMapNaviDriveManager *)driveManager showLaneBackInfo:(NSString *)laneBackInfo laneSelectInfo:(NSString *)laneSelectInfo; /** * @brief 需要隐藏车道信息时的回调 * Callback when lane information needs to be hidden * @param driveManager 驾车导航管理类 * Driving Navigation Management class */ - (void)driveManagerHideLaneInfo:(AMapNaviDriveManager *)driveManager; /** * @brief 路况光柱信息更新回调 * Traffic light bar information update callback * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param trafficStatus 路况光柱信息数组,参考 AMapNaviTrafficStatus 类 * Traffic light bar information array, refer to AMapNaviTrafficStatus class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateTrafficStatus:(nullable NSArray *)trafficStatus; /** * @brief 电子眼信息更新回调 since 5.0.0 * Electronic eye information update callback. since 5.0.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param cameraInfos 电子眼信息,参考 AMapNaviCameraInfo 类 * Electronic eye information, refer to AMapNaviCameraInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateCameraInfos:(nullable NSArray *)cameraInfos; /** * @brief 服务区和收费站信息更新回调 since 5.0.0 * Service area and toll station information update callback since 5.0.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param serviceAreaInfos 服务区信息,参考 AMapNaviServiceAreaInfo 类 * Service area information, refer to AMapNaviServiceAreaInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateServiceAreaInfos:(nullable NSArray *)serviceAreaInfos; /** * @brief 路线服务区详情列表信息回调,仅当算路成功或主路线更新时回调此方法 since 10.1.0 * Route service area detail list information callback, only callback when the route calculation is successful or the main route is updated since 10.1.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management Category * @param serviceAreaDetails 服务区详情列表信息,参考 AMapNaviServiceAreaDetailInfo 类 * Service area detail list information, refer to AMapNaviServiceAreaDetailInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateServiceAreaDetailInfos:(nullable NSArray *)serviceAreaDetails; /** * @brief 导航路线坡度列表信息回调,仅当算路成功或主路线更新时回调此方法 since 10.1.0 * Callback for navigation route gradient list information, this method is only called when route calculation succeeds or the main route is updated since 10.1.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management Category * @param slopeInfos 路线上的坡度信息,参考 AMapNaviSlopeInfo 类 * Slope information along the route, refer to AMapNaviSlopeInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateSlopeInfos:(nullable NSArray *)slopeInfos; /** * @brief 通知当前是否可以进行平行道路切换,包括主路、辅路以及高架桥上、高架桥下. since 5.3.0 * Notify whether parallel road switching is currently possible, including main roads, auxiliary roads, and overpasses and underpasses. since 5.3.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param parallelRoadStatus 平行道路信息,参考 AMapNaviParallelRoadStatus 类 * Parallel road information, refer to AMapNaviParallelRoadStatus class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateParallelRoadStatus:(nullable AMapNaviParallelRoadStatus *)parallelRoadStatus; /** * @brief 区间电子眼信息更新回调 since 6.0.0 * Interval electronic eye information update callback since 6.0.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param state 自车位置和区间测速电子眼路段的位置关系,参考 AMapNaviIntervalCameraPositionState 类 * Position relationship between the vehicle's location and the interval speed measurement electronic eye section, refer to AMapNaviIntervalCameraPositionState class * @param startInfo 电子眼信息,参考 AMapNaviCameraInfo 类 * Electronic eye information, refer to AMapNaviCameraInfo class * @param endInfo 电子眼信息,参考 AMapNaviCameraInfo 类 * Electronic eye information, refer to AMapNaviCameraInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateIntervalCameraWithPositionState:(AMapNaviIntervalCameraPositionState)state startInfo:(nullable AMapNaviCameraInfo *)startInfo endInfo:(nullable AMapNaviCameraInfo *)endInfo; /** * @brief 导航中的转向图标更新回调 since 6.2.0 * Turn icon update callback in navigation since 6.2.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param turnIconImage 导航段转向图标, 默认大小为(255,255) * Navigation segment turn icon, default size is (255,255) * @param turnIconType 导航段转向图标类型,参考 AMapNaviIconType 类 * Turn icon type in navigation section, refer to AMapNaviIconType class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateTurnIconImage:(nullable UIImage *)turnIconImage turnIconType:(AMapNaviIconType)turnIconType; /** * @brief 导航中相对于当前转向图标,下一个转向图标更新回调 since 6.9.0 * Next turn icon update callback relative to current turn icon during navigation. since 6.9.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param turnIconImage 导航段下一个路口转向图标, 默认大小为(255,255) * Next intersection turn icon in navigation segment, default size is (255,255) * @param turnIconType 导航段下一个转向图标类型,参考 AMapNaviIconType 类 * Next turn icon type in navigation segment, refer to AMapNaviIconType class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateNextTurnIconImage:(nullable UIImage *)turnIconImage nextTurnIconType:(AMapNaviIconType)turnIconType; /** * @brief 多路线导航模式下的备选路线更新回调, 注意:此函数只有在 driveManager 设置了多路线导航模式才会回调. since 6.3.0 * Alternate route update callback in multi-route navigation mode, Note: This function will only be called back if driveManager has set multi-route navigation mode. since 6.3.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param backupRoutes 备选路线信息数组, 参考 AMapNaviRoute 类 * Alternate route information array, refer to AMapNaviRoute class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateBackupRoute:(nullable NSArray *)backupRoutes; /** * @brief 前方拥堵区域信息的更新回调. since 7.5.0 * Update callback for congestion area information ahead. since 7.5.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param congestionInfo 拥堵区域信息, 参考 AMapNaviCongestionInfo 类,如果已通过该拥堵区域或者其不再拥堵时,congestionInfo会返回nil * Congestion area information, refer to AMapNaviCongestionInfo class, When the congestion area is passed or no longer congested, congestionInfo will return nil */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateCongestionInfo:(nullable AMapNaviCongestionInfo *)congestionInfo; /** * @brief 交通事件信息的更新回调. since 10.0.920 * Update callback of traffic incident information since 10.0.920 * @param driveManager 驾车导航管理类 * Driving Navigation Management Category * @param events 交通事件信息 * Traffic incident information */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateTrafficEvents:(nullable NSArray *)events; #pragma mark - 智能巡航 Intelligent Cruise #pragma mark - 智能巡航 /** * @brief 巡航道路设施信息更新回调.该更新回调只有在detectedMode开启后有效 * Cruise road facility information update callback. This update callback is only effective when detectedMode is enabled * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param trafficFacilities 道路设施信息数组,参考 AMapNaviTrafficFacilityInfo 类 * Road facility information array, refer to AMapNaviTrafficFacilityInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateTrafficFacilities:(nullable NSArray *)trafficFacilities; /** * @brief 巡航时自车前方电子眼信息.该更新回调只有在detectedMode开启后有效 since 6.7.0 * Electronic eye information in front of the vehicle during cruise. This update callback is only effective when detectedMode is enabled. since 6.7.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param cameraInfos 电子眼信息数组,参考 AMapNaviTrafficFacilityInfo 类 * Electronic eye information array, refer to AMapNaviTrafficFacilityInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateCruiseElecCameraInfos:(NSArray *)cameraInfos; /** * @brief 巡航信息更新回调.该更新回调只有在detectedMode开启后有效 * Cruise information update callback. This update callback is only effective when detectedMode is enabled. * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param cruiseInfo 巡航信息,参考 AMapNaviCruiseInfo 类 * Cruise information, refer to AMapNaviCruiseInfo class */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateCruiseInfo:(nullable AMapNaviCruiseInfo *)cruiseInfo; /** * @brief 巡航状态下的拥堵区域信息. 该更新回调只有在detectedMode开启后有效 since 6.7.0 * Congestion area information during cruise. This update callback is only effective when detectedMode is enabled. since 6.7.0 * @param driveManager 驾车导航管理类 * Driving Navigation Management class * @param congestionInfo 巡航拥堵信息, 参考 AMapNaviCruiseCongestionInfo 类, 当前方无拥堵信息时, congestionInfo 的值为 nil . * Cruise congestion information, refer to AMapNaviCruiseCongestionInfo class. When there is no congestion information ahead, the value of congestionInfo is nil. */ - (void)driveManager:(AMapNaviDriveManager *)driveManager updateCruiseCongestionInfo:(AMapNaviCruiseCongestionInfo *)congestionInfo; @end NS_ASSUME_NONNULL_END