TencentNavKit

TNKRouteTrafficItem.h
Go to the documentation of this file.
1//
2// TNKRouteTrafficItem.h
3// TencentNavKit
4//
5// Created by mol on 2022/10/10.
6// Copyright © 2022 Tencent. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <UIKit/UIKit.h>
11
15 typedef enum _TNKRouteTrafficDataStatus
16{
17 TNKRouteTrafficDataStatusPassed = -1,
18 TNKRouteTrafficDataStatusSmooth = 0,
19 TNKRouteTrafficDataStatusSlow = 1,
20 TNKRouteTrafficDataStatusVerySlow = 2,
21 TNKRouteTrafficDataStatusUnkown = 3,
22 TNKRouteTrafficDataStatusJam = 4,
23 TNKWalkRouteTrafficDataStatus = 5,
24} TNKRouteTrafficDataStatus;
25
26
27NS_ASSUME_NONNULL_BEGIN
28
32@interface TNKRouteTrafficItem : NSObject
33
37@property (nonatomic, readonly) int distance;
38
42@property (nonatomic, readonly) int from;
43
47@property (nonatomic, readonly) int to;
48
52@property (nonatomic, readonly) TNKRouteTrafficDataStatus trafficStatus;
53
54
56UIColor *TNKRouteTrafficStatusColor(TNKRouteTrafficDataStatus trafficDataStatus);
57
59UIColor *TNKRouteTrafficStatusBorderColor(TNKRouteTrafficDataStatus trafficDataStatus);
60
62UIColor *TNKAccompanyRouteTrafficStatusColor(TNKRouteTrafficDataStatus trafficDataStatus);
63
65UIColor *TNKAccompanyRouteTrafficStatusBorderColor(TNKRouteTrafficDataStatus trafficDataStatus);
66
67@end
68
69NS_ASSUME_NONNULL_END
_TNKRouteTrafficDataStatus
_TNKRouteTrafficDataStatus
交通状态
Definition: TNKRouteTrafficItem.h:16
TNKRouteTrafficDataStatusSlow
@ TNKRouteTrafficDataStatusSlow
缓行
Definition: TNKRouteTrafficItem.h:19
TNKRouteTrafficDataStatusUnkown
@ TNKRouteTrafficDataStatusUnkown
未知路况
Definition: TNKRouteTrafficItem.h:21
TNKRouteTrafficDataStatusPassed
@ TNKRouteTrafficDataStatusPassed
已走过的路
Definition: TNKRouteTrafficItem.h:17
TNKWalkRouteTrafficDataStatus
@ TNKWalkRouteTrafficDataStatus
步骑行导航路线颜色
Definition: TNKRouteTrafficItem.h:23
TNKRouteTrafficDataStatusVerySlow
@ TNKRouteTrafficDataStatusVerySlow
堵塞
Definition: TNKRouteTrafficItem.h:20
TNKRouteTrafficDataStatusJam
@ TNKRouteTrafficDataStatusJam
严重堵塞
Definition: TNKRouteTrafficItem.h:22
TNKRouteTrafficDataStatusSmooth
@ TNKRouteTrafficDataStatusSmooth
通畅
Definition: TNKRouteTrafficItem.h:18
TNKRouteTrafficDataStatus
enum _TNKRouteTrafficDataStatus TNKRouteTrafficDataStatus
交通状态
TNKRouteTrafficItem
路线路况分段数据类
Definition: TNKRouteTrafficItem.h:33
-[TNKRouteTrafficItem TNKAccompanyRouteTrafficStatusColor]
UIColor * TNKAccompanyRouteTrafficStatusColor(TNKRouteTrafficDataStatus trafficDataStatus)
获取导航SDK伴随路线默认路况颜色
-[TNKRouteTrafficItem TNKAccompanyRouteTrafficStatusBorderColor]
UIColor * TNKAccompanyRouteTrafficStatusBorderColor(TNKRouteTrafficDataStatus trafficDataStatus)
获取导航SDK伴随路线默认路况描边颜色
-[TNKRouteTrafficItem TNKRouteTrafficStatusColor]
UIColor * TNKRouteTrafficStatusColor(TNKRouteTrafficDataStatus trafficDataStatus)
获取导航SDK默认路况颜色
-[TNKRouteTrafficItem TNKRouteTrafficStatusBorderColor]
UIColor * TNKRouteTrafficStatusBorderColor(TNKRouteTrafficDataStatus trafficDataStatus)
获取导航SDK默认路况描边颜色
TNKRouteTrafficItem::distance
int distance
该段路线距离。单位：米
Definition: TNKRouteTrafficItem.h:37
TNKRouteTrafficItem::trafficStatus
TNKRouteTrafficDataStatus trafficStatus
该段路况状态 0:通畅 1:缓行 2:堵塞 3:未知路况 4:严重堵塞.
Definition: TNKRouteTrafficItem.h:52
TNKRouteTrafficItem::to
int to
该段路线终点在路线点串中的索引. 若该段为偏航前行驶部分, 则索引值为0.
Definition: TNKRouteTrafficItem.h:47
TNKRouteTrafficItem::from
int from
该段路线起点在路线点串中的索引. 索引值从0开始, 若该段为偏航前行驶部分, 则索引值为-1. 绘制导航路况线时请将第一段剔除.
Definition: TNKRouteTrafficItem.h:42