types.ts
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
import { ImageSourcePropType, ColorValue } from "react-native";
/**
* 点坐标
*/
export interface Point {
x: number;
y: number;
}
/**
* 地理坐标
*/
export interface LatLng {
/**
* 纬度
*/
latitude: number;
/**
* 经度
*/
longitude: number;
}
/**
* 地图标注点
*/
export interface MapPoi {
/**
* 标注点 ID
*/
id: string;
/**
* 标注点名称
*/
name: string;
/**
* 标注点坐标
*/
position: LatLng;
}
/**
* 矩形坐标边界
*/
export interface LatLngBounds {
/**
* 西南坐标
*/
southwest: LatLng;
/**
* 东北坐标
*/
northeast: LatLng;
}
/**
* 地图状态
*/
export interface CameraPosition {
/**
* 中心坐标
*/
target?: LatLng;
/**
* 缩放级别
*/
zoom?: number;
/**
* 朝向、旋转角度
*/
bearing?: number;
/**
* 倾斜角度
*/
tilt?: number;
}
/**
* 定位
*/
export interface Location extends LatLng {
/**
* 精度
*/
accuracy: number;
/**
* 朝向
*/
heading: number;
/**
* 海拔
*/
altitude: number;
/**
* 运动速度
*/
speed: number;
}
/**
* 地图类型
*/
export enum MapType {
/**
* 标准地图
*/
Standard,
/**
* 卫星地图
*/
Satellite,
/**
* 夜间地图
*/
Night,
/**
* 导航地图
*/
Navi,
/**
* 公交地图
*/
Bus,
}
export enum RouteType {
/**驾车 */
DRIVE,
/**步行 */
WALK,
/**公交 */
BUS,
/** 骑行 */
RIDE,
/** 货车 */
TRUCK,
}
/**
* 路线规划参数
*/
export interface RouteProps {
/**
* 出行方式(目前只实现了驾车)
*/
type: RouteType;
/**
* 起点
*/
startPoint: LatLng;
/**
* 终点
*/
endPoint: LatLng;
/**
* 途经点
*/
throughPointList?: LatLng[];
/**
* 显示途经点
*/
throughPointVisible?: boolean;
/**
* 根据不同的路段拥堵情况展示不同的颜色
*/
colorFulLine?: boolean;
/**
* 线段宽度
*/
width?: number;
/**
* 路线的纹理
*/
roadLine?: ImageSourcePropType;
/**
* 起点图标
*/
startIcon?: ImageSourcePropType;
/**
* 终点图标
*/
endIcon?: ImageSourcePropType;
/**
* 途经点图标
*/
throughPointIcon?: ImageSourcePropType;
/**
* 线段颜色
*/
lineColor?: ColorValue;
}