TencentNavKit

TNKCommonObj.h
Go to the documentation of this file.
1//
2// TNKCommonObj.h
3// TencentNavKit
4//
5// Created by mol on 2022/7/26.
6// Copyright © 2022 Tencent. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import <CoreLocation/CLLocation.h>
11
12NS_ASSUME_NONNULL_BEGIN
13
14 typedef enum _TNKTravelMode
15{
16 TNKTravelModeDriving = 0,
17 TNKTravelModeRiding = 1,
18 TNKTravelModeWalking = 2,
19} TNKTravelMode;
20
21
22 typedef enum _TNKSearchNavPointAdsorbType
23{
24 TNKSearchNavPointAdsorbTypeDefault = 0,
25 TNKSearchNavPointAdsorbTypeStation = 1,
26 TNKSearchNavPointAdsorbTypeAvoidPoi = 5,
27} TNKSearchNavPointAdsorbType;
28
32 typedef enum _TNKNavStartFailCode {
33 TNKNavStartFailCodeAlreadyStarted = 1001,
34 TNKNavStartFailCodeRoutePlanEmpty = 2001,
35 TNKNavStartFailCodeRoutePlanError = 2002,
36 TNKNavStartFailCodeRouteIdEmpty = 3001,
37 TNKNavStartFailCodeRouteIdNotExist = 3002,
38 TNKNavStartFailCodeInternalError = 3002,
39} TNKNavStartFailCode;
40
42@interface TNKCoordinatePoint : NSObject<NSCopying>
43
45@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
46
47@end
48
50@interface TNKRoutePoint : NSObject<NSCopying>
51
53@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
54
56@property (nonatomic, assign) int pointIndex;
57
59@property (nonatomic, assign) int offsetDistance;
60
61@end
62
63
65@interface TNKSearchNavPoint : TNKCoordinatePoint<NSCopying>
66
68@property (nonatomic, copy, nullable) NSString *poiID;
70@property (nonatomic, copy, nullable) NSString *title;
72@property (nonatomic, assign) TNKSearchNavPointAdsorbType adsorbType;
73
77@property (nonatomic, copy) NSString *searchUID;
78
79@end
80
82@interface TNKRouteRequest: NSObject
83
85@property (nonatomic, strong) TNKSearchNavPoint *origin;
87@property (nonatomic, strong) TNKSearchNavPoint *destination;
88
89@end
90
94@interface TNKRouteMilestone : NSObject
95
99@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
100
104@property (nonatomic, readonly) int pointIndex;
105
109@property (nonatomic, readonly) int distance;
110
111@end
112
113
114NS_ASSUME_NONNULL_END
TNKNavStartFailCode
enum _TNKNavStartFailCode TNKNavStartFailCode
导航开启失败错误内容
TNKSearchNavPointAdsorbType
enum _TNKSearchNavPointAdsorbType TNKSearchNavPointAdsorbType
起终点吸附逻辑
TNKTravelMode
NS_ASSUME_NONNULL_BEGIN enum _TNKTravelMode TNKTravelMode
出行方式
_TNKNavStartFailCode
_TNKNavStartFailCode
导航开启失败错误内容
Definition: TNKCommonObj.h:32
TNKNavStartFailCodeRouteIdNotExist
@ TNKNavStartFailCodeRouteIdNotExist
路线ID不存在
Definition: TNKCommonObj.h:37
TNKNavStartFailCodeRoutePlanError
@ TNKNavStartFailCodeRoutePlanError
路径规划失败
Definition: TNKCommonObj.h:35
TNKNavStartFailCodeInternalError
@ TNKNavStartFailCodeInternalError
内部错误
Definition: TNKCommonObj.h:38
TNKNavStartFailCodeRouteIdEmpty
@ TNKNavStartFailCodeRouteIdEmpty
路线ID为空
Definition: TNKCommonObj.h:36
TNKNavStartFailCodeRoutePlanEmpty
@ TNKNavStartFailCodeRoutePlanEmpty
路径规划为空
Definition: TNKCommonObj.h:34
TNKNavStartFailCodeAlreadyStarted
@ TNKNavStartFailCodeAlreadyStarted
已开启导航
Definition: TNKCommonObj.h:33
_TNKTravelMode
_TNKTravelMode
Definition: TNKCommonObj.h:15
TNKTravelModeDriving
@ TNKTravelModeDriving
驾车
Definition: TNKCommonObj.h:16
TNKTravelModeWalking
@ TNKTravelModeWalking
步行
Definition: TNKCommonObj.h:18
TNKTravelModeRiding
@ TNKTravelModeRiding
骑行
Definition: TNKCommonObj.h:17
_TNKSearchNavPointAdsorbType
_TNKSearchNavPointAdsorbType
Definition: TNKCommonObj.h:23
TNKSearchNavPointAdsorbTypeStation
@ TNKSearchNavPointAdsorbTypeStation
场站策略
Definition: TNKCommonObj.h:25
TNKSearchNavPointAdsorbTypeDefault
@ TNKSearchNavPointAdsorbTypeDefault
默认
Definition: TNKCommonObj.h:24
TNKSearchNavPointAdsorbTypeAvoidPoi
@ TNKSearchNavPointAdsorbTypeAvoidPoi
去掉反查逻辑
Definition: TNKCommonObj.h:26
TNKCoordinatePoint
经纬度类
Definition: TNKCommonObj.h:42
TNKCoordinatePoint::coordinate
CLLocationCoordinate2D coordinate
坐标，必填
Definition: TNKCommonObj.h:45
TNKRouteMilestone
步骑行里程碑类
Definition: TNKCommonObj.h:95
TNKRoutePoint
路线上的坐标类
Definition: TNKCommonObj.h:50
TNKRouteRequest
算路请求类
Definition: TNKCommonObj.h:83