// // AMapNaviRoute.h // AMapNaviKit // // Created by AutoNavi on 14-7-11. // Copyright (c) 2014年 Amap. All rights reserved. // #import #import "AMapNaviCommonObj.h" NS_ASSUME_NONNULL_BEGIN #pragma mark - AMapNaviRouteGuideSegment ///路线详情的分段信息. since 7.5.0 ///Section information of route details @interface AMapNaviRouteGuideSegment : NSObject ///分段的转向类型 ///Turn type of section @property (nonatomic, assign) AMapNaviIconType iconType; ///分段的详细描述 ///Detailed description of section @property (nonatomic, strong, nullable) NSString *detailedDescription; ///分段是否到达途径点 ///Whether the section reaches the waypoint @property (nonatomic, assign) BOOL isArriveWayPoint; @end #pragma mark - AMapNaviRouteGuideGroup ///路线详情的分组信息. since 7.5.0 ///Group information of route details @interface AMapNaviRouteGuideGroup : NSObject ///分组的名称描述 ///Name description of group @property (nonatomic, strong, nullable) NSString *groupName; ///分组的长度(单位:米) ///Length of group (unit: meter) @property (nonatomic, assign) NSInteger distance; ///分组的转向类型和该组中分段的第一个转向类型一致 ///The turn type of the group is consistent with the first turn type of the segments in the group @property (nonatomic, assign) AMapNaviIconType iconType; ///分组的预估时间(单位:秒) ///Estimated time of the group (unit: seconds) @property (nonatomic, assign) NSInteger time; ///分组导航段路口点的坐标 ///Coordinates of the intersection points in the group navigation segment @property (nonatomic, strong) AMapNaviPoint *coordinate; ///分组中的所有分段 ///All segments in the group @property (nonatomic, strong) NSArray *guideSegments; ///分组的红绿灯数量,注意:只针对驾车. ///Number of grouped traffic lights, note: only for driving @property (nonatomic, assign) NSInteger trafficLightCount; @end // AMapNaviLink --组成--> AMapNaviSegment --组成--> AMapNaviRoute #pragma mark - AMapNaviLink ///分段的Link信息 ///Segmented Link information @interface AMapNaviLink : NSObject ///Link的所有坐标 ///All coordinates of the Link @property (nonatomic, strong) NSArray *coordinates; ///Link的长度(单位:米) ///Length of the Link (unit: meters) @property (nonatomic, assign) NSInteger length; ///Link的预估时间(单位:秒) ///Estimated time of the Link (unit: seconds) @property (nonatomic, assign) NSInteger time; ///Link的道路名称 ///Road name of the Link @property (nonatomic, strong, nullable) NSString *roadName; ///Link的道路类型 ///Link's road type @property (nonatomic, assign) AMapNaviRoadClass roadClass; ///Link的FormWay信息 ///Link's FormWay information @property (nonatomic, assign) AMapNaviFormWay formWay; ///Link是否有红绿灯 ///Whether the Link has traffic lights @property (nonatomic, assign) BOOL isHadTrafficLights; ///Link的路况信息. 注意:只针对驾车. since 6.3.0 ///Link's traffic condition information, note: only for driving @property (nonatomic, assign) AMapNaviRouteStatus trafficStatus; /* 获取带有深绿路况新的表达方式的交通状态,(获取交通状态, 当前Link无精细数据时有效) Obtain traffic status with a new expression of dark green traffic condition, (Obtain traffic status, effective when the current Link has no detailed data) 畅通状态: 100--200; 而不在 [110,140)深绿、 [160,190)绿内,则路况状态默认为 “畅通”(绿色) Unblocked status: 100--200; if not within [110,140) dark green or [160,190) green, the traffic status defaults to "unblocked" (green) 缓行状态: 200--300; 而不在 [210,290)内, 则路况状态默认为 “缓行”(黄色) Slow traffic condition: 200--300; if not within [210, 290), the traffic condition defaults to "Slow" (yellow) 拥堵状态: 300--400; 而不在 [310,340)拥堵、 [360,390)极度拥堵内,则路况状态默认为“拥堵”(红色) Congestion status: 300--400; if not within [310, 340) congestion or [360, 390) severe congestion, the traffic status defaults to 'congested' (red) 无交通流: 900--999; 路况全部为“无交通流” No traffic flow: 900--999; All traffic conditions are "No traffic flow" 在以上区间之外的,包括0 以及所有其他无效值,均按照“未知”处理。 Outside the above range, including 0 and all other invalid values, are treated as "Unknown" 特别注意:当前接口为收费接口,您如果申请试用或者正式应用都请通过工单系统提交商务合作类工单进行沟通 https://lbs.amap.com/ since 9.6.0 Special Note: The current interface is a paid service. If you wish to apply for a trial or official use, please submit a business cooperation ticket through the ticketing system for communication at https://lbs.amap.com/ since 9.6.0 */ @property (nonatomic, assign) NSInteger trafficFineStatus; ///Link的类型. 注意:只针对驾车. since 6.3.0 ///Type of Link, note: only for driving @property (nonatomic, assign) AMapNaviLinkType linkType; ///Link的ownership类型. 注意:只针对驾车. since 9.6.0 ///Ownership type of Link, note: only for driving @property (nonatomic, assign) AMapNaviOwnershipType ownershipType; @end #pragma mark - AMapNaviSegment ///路径的分段信息 ///Segment information of the path @interface AMapNaviSegment : NSObject ///分段的所有坐标 ///All coordinates of the segment @property (nonatomic, strong) NSArray *coordinates; ///分段的所有Link ///All Links of the segment @property (nonatomic, strong) NSArray *links; ///分段的长度(单位:米) ///Length of the segment (unit: meters) @property (nonatomic, assign) NSInteger length; ///分段的预估时间(单位:秒) ///Estimated time of the segment (unit: seconds) @property (nonatomic, assign) NSInteger time; ///分段的转向类型 ///Segment turning type @property (nonatomic, assign) AMapNaviIconType iconType; ///分段的收费路长度(单位:米). 注意:只针对驾车. ///Segment toll road length (unit: meters), note: only for driving @property (nonatomic, assign) NSInteger chargeLength; ///分段的收费金额. 注意:只针对驾车. ///Segment toll amount, note: only for driving @property (nonatomic, assign) NSInteger tollCost; ///分段的红绿灯数量 ///Segment traffic light count @property (nonatomic, assign) NSInteger trafficLightCount; ///分段是否到达途经点. 注意:只针对驾车. ///Whether the segment reaches a waypoint, note: only for driving @property (nonatomic, assign) BOOL isArriveWayPoint; @end #pragma mark - AMapNaviRoute ///导航路径信息 ///Navigation path information @interface AMapNaviRoute : NSObject ///导航路径总长度(单位:米) ///Total length of the navigation path (unit: meters) @property (nonatomic, assign) NSInteger routeLength; ///导航路径所需的时间(单位:秒) ///Time required for the navigation path (unit: seconds) @property (nonatomic, assign) NSInteger routeTime; ///导航路线最小坐标点和最大坐标点围成的矩形区域 ///Rectangular area enclosed by the minimum and maximum coordinate points of the navigation route @property (nonatomic, strong) AMapNaviPointBounds *routeBounds; ///导航路线的中心点,即导航路径的最小外接矩形对角线的交点 ///The center point of the navigation route, which is the intersection point of the diagonals of the minimum bounding rectangle of the navigation path @property (nonatomic, strong) AMapNaviPoint *routeCenterPoint; ///导航路线的所有形状点 ///All shape points of the navigation route @property (nonatomic, strong) NSArray *routeCoordinates; ///路线方案的起点坐标 ///Starting point coordinates of the route plan @property (nonatomic, strong) AMapNaviPoint *routeStartPoint; ///路线方案的终点坐标 ///Ending point coordinates of the route plan @property (nonatomic, strong) AMapNaviPoint *routeEndPoint; ///路线方案的起点POI @property (nonatomic, strong) AMapNaviPOIInfo *startPoi; ///路线方案的终点POI @property (nonatomic, strong) AMapNaviPOIInfo *endPoi; ///路线方案的途经点的POI数组 @property (nonatomic, strong) NSArray *viaPois; ///导航路线的所有分段 ///All segments of the navigation route @property (nonatomic, strong) NSArray *routeSegments; ///导航路线上分段的总数 ///Total number of segments on the navigation route @property (nonatomic, assign) NSInteger routeSegmentCount; ///导航路线上的所有电子眼. 注意:只针对驾车. ///All speed cameras on the navigation route, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeCameras; ///导航路线上红绿灯的总数 ///Total number of traffic lights on the navigation route @property (nonatomic, assign) NSInteger routeTrafficLightCount; ///导航路线上的标签信息. 注意:只针对驾车. since 5.0.0 ///Label information on the navigation route, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeLabels; ///导航路线的花费金额(单位:元). 注意:只针对驾车. ///Cost of the navigation route (unit: yuan), note: only for driving @property (nonatomic, assign) NSInteger routeTollCost; ///路径的途经点坐标 ///Coordinates of the waypoints on the path @property (nonatomic, strong, nullable) NSArray *wayPoints __attribute__((deprecated("This field is deprecated, use wayPointsInfo instead, since 6.7.0"))); ///路径的途经点所在segment段的index ///Index of the segment where the waypoints on the path are located @property (nonatomic, strong, nullable) NSIndexPath *wayPointsIndexes __attribute__((deprecated("This field is deprecated, use wayPointsInfo instead, since 6.7.0"))); ///路径的途经点在routeCoordinates上对应的index ///The index of waypoints on routeCoordinates @property (nonatomic, strong, nullable) NSArray *wayPointCoordIndexes __attribute__((deprecated("This field is deprecated, use wayPointsInfo instead, since 6.7.0"))); ///路径限行信息. 注意:只针对驾车. since 5.0.0 ///Path restriction information, note: only for driving @property (nonatomic, strong, nullable) AMapNaviRestrictionInfo *restrictionInfo; ///路径的路况信息. 注意:只针对驾车. since 5.1.0 ///Path traffic conditions, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeTrafficStatuses; ///路径的聚合段信息. 注意:只针对驾车. since 5.1.0 ///Path segment aggregation information, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeGroupSegments; ///路径经过的城市的adcode列表. 注意:只针对驾车. since 5.1.0 ///List of adcodes for cities along the path, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeCityAdcodes; ///路径的所有红绿灯坐标. 注意:只针对驾车. since 5.3.0 ///Coordinates of all traffic lights on the route, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeTrafficLights; ///路径上的禁行标示信息. 注意:只针对驾车. since 6.0.0 ///No-entry sign information on the route, note: only for driving @property (nonatomic, strong, nullable) NSArray *forbiddenInfo; ///道路设施信息. 注意:只针对驾车. since 6.0.0 ///Road facility information, note: only for driving @property (nonatomic, strong, nullable) NSArray *roadFacilityInfo; ///路径的扎点. 注意:只针对驾车. since 6.3.0 ///Stops on the route, note: only for driving @property (nonatomic, strong, nullable) NSArray *routeIconPoints; ///道路交通事件信息. 注意:只针对驾车. since 6.4.0 ///Road traffic event information, note: only for driving @property (nonatomic, strong, nullable) NSArray *trafficIncidentInfo; ///路径的途径点相关信息, 具体参考 AMapNaviRouteWayPointInfo . 注意:驾车支持起始版本 since 6.7.0,骑步行支持起始版本 since 10.1.300 ///Related information of waypoints on the route, refer to AMapNaviRouteWayPointInfo for details, note: only for driving @property (nonatomic, strong, nullable) NSArray *wayPointsInfo; ///根据路况生成的纹理索引数组, 可直接用于路线多彩线 MAMultiPolyline 的创建 .注意:只针对驾车. since 6.7.0 ///Texture index array generated based on road conditions, which can be directly used for the creation of colorful route MAMultiPolyline, note: only for driving @property (nonatomic, strong, nullable) NSArray *drawStyleIndexes; ///当前路线的唯一标识ID . since 6.7.0 ///The unique identifier ID of the current route @property (nonatomic, assign) NSUInteger routeUID; ///路线详情信息. since 7.5.0 ///Route detail information @property (nonatomic, strong) NSArray *guideGroups; ///路线检索起点坐标 since 10.0.820 ///Route search starting point coordinates since 10.0.820 @property (nonatomic, strong, readonly, nullable) AMapNaviPoint *searchStartPoint; ///获取路线检索终点坐标 since 10.0.820 ///Get the destination coordinates for route search since 10.0.820 @property (nonatomic, strong, readonly, nullable) AMapNaviPoint *searchEndPoint; @end ///算路结果回调。since 10.1.111 ///Route calculation result callback @interface AMapNaviCalculateRouteResult : NSObject ///算路唯一标识,用于串联发起算路到算路成功各个节点。 since 10.1.111 ///Route calculation unique identifier, used to connect each node from initiating route calculation to successful calculation @property (nonatomic, assign) NSInteger routeRequestId; @end ///导航路径信息集合. since 7.7.0 ///Navigation path information collection @interface AMapNaviRouteGroup : NSObject - (nullable instancetype)init NS_UNAVAILABLE; ///当前默认选中导航路径的ID ///ID of the currently selected default navigation path @property (nonatomic, readonly) NSInteger naviRouteID; ///当前默认导航路径的信息,参考 AMapNaviRoute 类. ///Information of the current default navigation path, refer to AMapNaviRoute class. @property (nonatomic, readonly, nullable) AMapNaviRoute *naviRoute; ///多路径规划时的所有路径ID,路径ID为 NSInteger 类型. ///All route IDs during multi-route planning, where the route ID is of type NSInteger @property (nonatomic, readonly, nullable) NSArray *naviRouteIDs; ///多路径规划时的所有路径信息,参考 AMapNaviRoute 类. ///All route information during multi-route planning, refer to AMapNaviRoute class. @property (nonatomic, readonly, nullable) NSDictionary *naviRoutes; ///当前默认导航路径的信息,参考 AMapNaviRoute 类。since 10.1.111 ///Information of the current default navigation route, refer to AMapNaviRoute class. @property (nonatomic, readonly, nullable) AMapNaviCalculateRouteResult *calculateRouteResult; /** * @brief 多路径规划时选择路径.注意:该方法仅限于在开始导航前使用,开始导航后该方法无效. * Selecting a route during multi-route planning. Note: This method is only available before starting navigation and becomes invalid after navigation starts. * @param routeID 路径ID * Route ID * @return 是否选择路径成功 * Whether the route selection is successful */ - (BOOL)selectNaviRouteWithRouteID:(NSInteger)routeID; @end NS_ASSUME_NONNULL_END