expo-gaode-map-navigation 1.0.1-next.1 → 1.0.1-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/build/map/ExpoGaodeMapModule.js +5 -5
  2. package/package.json +15 -6
  3. package/package.json.backup +0 -47
  4. package/plugin/README.md +0 -52
  5. package/plugin/src/withGaodeMap.ts +0 -231
  6. package/plugin/tsconfig.tsbuildinfo +0 -1
  7. package/src/ExpoGaodeMapNaviView.tsx +0 -94
  8. package/src/ExpoGaodeMapNavigation.types.ts +0 -3
  9. package/src/ExpoGaodeMapNavigationModule.ts +0 -11
  10. package/src/index.ts +0 -262
  11. package/src/map/ExpoGaodeMap.types.ts +0 -46
  12. package/src/map/ExpoGaodeMapModule.ts +0 -315
  13. package/src/map/ExpoGaodeMapView.tsx +0 -120
  14. package/src/map/components/overlays/Circle.tsx +0 -20
  15. package/src/map/components/overlays/Cluster.tsx +0 -26
  16. package/src/map/components/overlays/HeatMap.tsx +0 -27
  17. package/src/map/components/overlays/Marker.tsx +0 -88
  18. package/src/map/components/overlays/MultiPoint.tsx +0 -27
  19. package/src/map/components/overlays/Polygon.tsx +0 -19
  20. package/src/map/components/overlays/Polyline.tsx +0 -19
  21. package/src/map/components/overlays/index.ts +0 -7
  22. package/src/map/index.ts +0 -37
  23. package/src/map/types/common.types.ts +0 -126
  24. package/src/map/types/index.ts +0 -55
  25. package/src/map/types/location.types.ts +0 -368
  26. package/src/map/types/map-view.types.ts +0 -281
  27. package/src/map/types/overlays.types.ts +0 -404
  28. package/src/map/utils/EventManager.ts +0 -23
  29. package/src/map/utils/ModuleLoader.ts +0 -115
  30. package/src/types/coordinates.types.ts +0 -25
  31. package/src/types/independent.types.ts +0 -288
  32. package/src/types/index.ts +0 -5
  33. package/src/types/naviview.types.ts +0 -330
  34. package/src/types/route.types.ts +0 -305
@@ -1,368 +0,0 @@
1
- /**
2
- * 高德地图定位相关类型定义
3
- * 基于 Expo Modules API
4
- */
5
-
6
- import type { LatLng } from './common.types';
7
-
8
- /**
9
- * 坐标信息(基础定位)
10
- */
11
- export interface Coordinates extends LatLng {
12
- /**
13
- * 海拔高度(米)
14
- */
15
- altitude: number;
16
-
17
- /**
18
- * 水平精度(米)
19
- */
20
- accuracy: number;
21
-
22
- /**
23
- * 移动方向(度,需要 GPS)
24
- */
25
- heading: number;
26
-
27
- /**
28
- * 移动速度(米/秒,需要 GPS)
29
- */
30
- speed: number;
31
-
32
- /**
33
- * 时间戳
34
- */
35
- timestamp: number;
36
-
37
- /**
38
- * 是否有可用坐标
39
- * @platform ios
40
- */
41
- isAvailableCoordinate?: boolean;
42
-
43
- /**
44
- * 格式化地址(仅在启用逆地理编码时可用)
45
- */
46
- address?: string;
47
- }
48
-
49
- /**
50
- * 逆地理编码信息
51
- */
52
- export interface ReGeocode extends Coordinates {
53
- /**
54
- * 格式化地址
55
- */
56
- address: string;
57
-
58
- /**
59
- * 国家
60
- */
61
- country: string;
62
-
63
- /**
64
- * 省/直辖市,如 `湖北省`
65
- */
66
- province: string;
67
-
68
- /**
69
- * 市,如 `武汉市`
70
- */
71
- city: string;
72
-
73
- /**
74
- * 区,如 `武昌区`
75
- */
76
- district: string;
77
-
78
- /**
79
- * 城市编码
80
- */
81
- cityCode: string;
82
-
83
- /**
84
- * 区域编码
85
- */
86
- adCode: string;
87
-
88
- /**
89
- * 街道名称
90
- */
91
- street: string;
92
-
93
- /**
94
- * 门牌号
95
- */
96
- streetNumber: string;
97
-
98
- /**
99
- * 兴趣点名称
100
- */
101
- poiName: string;
102
-
103
- /**
104
- * 所属兴趣点名称
105
- */
106
- aoiName: string;
107
-
108
- /**
109
- * 定位信息描述
110
- * @platform android
111
- */
112
- description?: string;
113
-
114
- /**
115
- * 坐标系类型
116
- * @platform android
117
- */
118
- coordType?: 'GCJ02' | 'WGS84';
119
-
120
- /**
121
- * 室内定位建筑物ID
122
- * @platform android
123
- */
124
- buildingId?: string;
125
- }
126
-
127
- /**
128
- * 定位精度级别
129
- * @platform ios
130
- */
131
- export enum LocationAccuracy {
132
- /**
133
- * 最适合导航
134
- */
135
- BestForNavigation = 0,
136
-
137
- /**
138
- * 最高精度(约10米,耗时约10秒)
139
- */
140
- Best = 1,
141
-
142
- /**
143
- * 10米精度
144
- */
145
- NearestTenMeters = 2,
146
-
147
- /**
148
- * 100米精度(推荐)
149
- */
150
- HundredMeters = 3,
151
-
152
- /**
153
- * 1公里精度
154
- */
155
- Kilometer = 4,
156
-
157
- /**
158
- * 3公里精度
159
- */
160
- ThreeKilometers = 5,
161
- }
162
-
163
- /**
164
- * 定位模式
165
- * @platform android
166
- */
167
- export enum LocationMode {
168
- /**
169
- * 高精度模式(网络+卫星)
170
- */
171
- HighAccuracy = 1,
172
-
173
- /**
174
- * 低功耗模式(仅网络)
175
- */
176
- BatterySaving = 2,
177
-
178
- /**
179
- * 仅设备模式(仅卫星)
180
- */
181
- DeviceSensors = 3,
182
- }
183
-
184
- /**
185
- * 坐标系类型
186
- */
187
- export enum CoordinateType {
188
- /**
189
- * 高德坐标系
190
- */
191
- AMap = -1,
192
-
193
- /**
194
- * 百度坐标系
195
- */
196
- Baidu = 0,
197
-
198
- /**
199
- * MapBar坐标系
200
- */
201
- MapBar = 1,
202
-
203
- /**
204
- * MapABC坐标系
205
- */
206
- MapABC = 2,
207
-
208
- /**
209
- * 搜搜地图坐标系
210
- */
211
- SoSoMap = 3,
212
-
213
- /**
214
- * 阿里云坐标系
215
- */
216
- AliYun = 4,
217
-
218
- /**
219
- * 谷歌坐标系
220
- */
221
- Google = 5,
222
-
223
- /**
224
- * GPS坐标系
225
- */
226
- GPS = 6,
227
- }
228
-
229
- /**
230
- * 地理语言
231
- */
232
- export type GeoLanguage = 'DEFAULT' | 'EN' | 'ZH';
233
-
234
- /**
235
- * 网络协议
236
- * @platform android
237
- */
238
- export type LocationProtocol = 'HTTP' | 'HTTPS';
239
-
240
- /**
241
- * 定位配置选项
242
- */
243
- export interface LocationOptions {
244
- /**
245
- * 是否返回逆地理信息
246
- * @default true
247
- */
248
- withReGeocode?: boolean;
249
-
250
- /**
251
- * 定位精度
252
- * @platform ios
253
- */
254
- accuracy?: LocationAccuracy;
255
-
256
- /**
257
- * 定位模式
258
- * @platform android
259
- */
260
- mode?: LocationMode;
261
-
262
- /**
263
- * 是否单次定位
264
- * @platform android
265
- * @default false
266
- */
267
- onceLocation?: boolean;
268
-
269
- /**
270
- * 定位间隔(毫秒)
271
- * @platform android
272
- * @default 2000
273
- */
274
- interval?: number;
275
-
276
- /**
277
- * 定位超时时间(秒)
278
- * @platform ios
279
- * @default 10
280
- */
281
- timeout?: number;
282
-
283
- /**
284
- * 逆地理编码超时时间(秒)
285
- * @platform ios
286
- * @default 2
287
- */
288
- reGeocodeTimeout?: number;
289
-
290
- /**
291
- * 最小更新距离(米)
292
- * @platform ios
293
- */
294
- distanceFilter?: number;
295
-
296
- /**
297
- * 是否启用设备传感器
298
- * @platform android
299
- * @default false
300
- */
301
- sensorEnable?: boolean;
302
-
303
- /**
304
- * 是否允许WIFI刷新
305
- * @platform android
306
- * @default true
307
- */
308
- wifiScan?: boolean;
309
-
310
- /**
311
- * 是否GPS优先
312
- * @platform android
313
- * @default false
314
- */
315
- gpsFirst?: boolean;
316
-
317
- /**
318
- * 是否等待WIFI列表刷新
319
- * 定位精度会更高,但是定位速度会变慢1-3秒
320
- * @platform android
321
- * @default false
322
- */
323
- onceLocationLatest?: boolean;
324
-
325
- /**
326
- * 逆地理语言
327
- */
328
- geoLanguage?: GeoLanguage;
329
-
330
- /**
331
- * 是否允许后台定位
332
- * @default false
333
- */
334
- allowsBackgroundLocationUpdates?: boolean;
335
-
336
- /**
337
- * 是否自动暂停定位
338
- * @platform ios
339
- * @default false
340
- */
341
- pausesLocationUpdatesAutomatically?: boolean;
342
-
343
- /**
344
- * 是否使用缓存策略
345
- * @platform android
346
- * @default true
347
- */
348
- locationCacheEnable?: boolean;
349
-
350
- /**
351
- * 网络请求超时时间(毫秒)
352
- * @platform android
353
- * @default 30000
354
- */
355
- httpTimeout?: number;
356
-
357
- /**
358
- * 网络协议
359
- * @platform android
360
- * @default 'HTTP'
361
- */
362
- protocol?: LocationProtocol;
363
- }
364
-
365
- /**
366
- * 定位事件监听器
367
- */
368
- export type LocationListener = (location: Coordinates | ReGeocode) => void;
@@ -1,281 +0,0 @@
1
- /**
2
- * 高德地图视图相关类型定义
3
- * 基于 Expo Modules API
4
- */
5
-
6
- import type { StyleProp, ViewStyle, NativeSyntheticEvent } from 'react-native';
7
- import type { CameraPosition, LatLng, LatLngBounds, MapPoi, MapType, Point } from './common.types';
8
-
9
- /**
10
- * 定位事件数据
11
- */
12
- export interface LocationEvent {
13
- /**
14
- * 纬度
15
- */
16
- latitude: number;
17
-
18
- /**
19
- * 经度
20
- */
21
- longitude: number;
22
-
23
- /**
24
- * 定位精度(米)
25
- */
26
- accuracy: number;
27
- }
28
-
29
-
30
- /**
31
- * 地图相机事件
32
- */
33
- export interface CameraEvent {
34
- /**
35
- * 相机位置
36
- */
37
- cameraPosition: CameraPosition;
38
-
39
- /**
40
- * 可见区域边界
41
- */
42
- latLngBounds: LatLngBounds;
43
- }
44
-
45
- /**
46
- * 地图视图属性
47
- */
48
- export interface MapViewProps {
49
- /**
50
- * 地图类型
51
- */
52
- mapType?: MapType;
53
-
54
- /**
55
- * 初始相机位置
56
- */
57
- initialCameraPosition?: CameraPosition;
58
-
59
- /**
60
- * 是否显示当前定位
61
- */
62
- myLocationEnabled?: boolean;
63
-
64
- /**
65
- * 是否跟随用户位置
66
- * @default false
67
- */
68
- followUserLocation?: boolean;
69
-
70
- /**
71
- * 定位蓝点配置
72
- */
73
- userLocationRepresentation?: {
74
- /** 精度圈是否显示 @default true */
75
- showsAccuracyRing?: boolean;
76
- /** 是否显示方向指示 @default true @platform ios */
77
- showsHeadingIndicator?: boolean;
78
- /** 精度圈填充颜色 支持 '#RRGGBB'、'red' 或 ARGB 数字 */
79
- fillColor?: string | number;
80
- /** 精度圈边线颜色 */
81
- strokeColor?: string | number;
82
- /** 精度圈边线宽度 @default 0 */
83
- lineWidth?: number;
84
- /** 内部蓝色圆点是否使用律动效果 @default true @platform ios */
85
- enablePulseAnimation?: boolean;
86
- /** 定位点背景色 @default 'white' @platform ios */
87
- locationDotBgColor?: string | number;
88
- /** 定位点蓝色圆点颜色 @default 'blue' @platform ios */
89
- locationDotFillColor?: string | number;
90
- /** 定位图标 支持网络图片(http/https)、本地文件(file://)或资源名称 */
91
- image?: string;
92
- /** 定位图标宽度(像素) */
93
- imageWidth?: number;
94
- /** 定位图标高度(像素) */
95
- imageHeight?: number;
96
- };
97
-
98
- /**
99
- * 是否显示室内地图
100
- *
101
- */
102
- indoorViewEnabled?: boolean;
103
-
104
- /**
105
- * 是否显示3D建筑
106
- */
107
- buildingsEnabled?: boolean;
108
-
109
- /**
110
- * 是否显示标注
111
- */
112
- labelsEnabled?: boolean;
113
-
114
- /**
115
- * 是否显示指南针
116
- */
117
- compassEnabled?: boolean;
118
-
119
- /**
120
- * 是否显示缩放按钮
121
- * @platform android
122
- */
123
- zoomControlsEnabled?: boolean;
124
-
125
- /**
126
- * 是否显示比例尺
127
- */
128
- scaleControlsEnabled?: boolean;
129
-
130
- /**
131
- * 是否显示定位按钮
132
- * @platform android
133
- */
134
- myLocationButtonEnabled?: boolean;
135
-
136
- /**
137
- * 是否显示路况
138
- */
139
- trafficEnabled?: boolean;
140
-
141
- /**
142
- * 最大缩放级别
143
- */
144
- maxZoom?: number;
145
-
146
- /**
147
- * 最小缩放级别
148
- */
149
- minZoom?: number;
150
-
151
- /**
152
- * 是否启用缩放手势
153
- */
154
- zoomGesturesEnabled?: boolean;
155
-
156
- /**
157
- * 是否启用滑动手势
158
- */
159
- scrollGesturesEnabled?: boolean;
160
-
161
- /**
162
- * 是否启用旋转手势
163
- */
164
- rotateGesturesEnabled?: boolean;
165
-
166
- /**
167
- * 是否启用倾斜手势
168
- */
169
- tiltGesturesEnabled?: boolean;
170
-
171
- /**
172
- * 定位的最小更新距离(米)
173
- * @platform ios
174
- */
175
- distanceFilter?: number;
176
-
177
- /**
178
- * 最小更新角度(度)
179
- * @platform ios
180
- */
181
- headingFilter?: number;
182
-
183
- /**
184
- * 样式
185
- */
186
- style?: StyleProp<ViewStyle>;
187
-
188
- /**
189
- * 点击地图事件
190
- */
191
- onMapPress?: (event: NativeSyntheticEvent<LatLng>) => void;
192
-
193
- /**
194
- * 点击标注点事件
195
- */
196
- onPressPoi?: (event: NativeSyntheticEvent<MapPoi>) => void;
197
-
198
- /**
199
- * 长按地图事件
200
- */
201
- onMapLongPress?: (event: NativeSyntheticEvent<LatLng>) => void;
202
-
203
- /**
204
- * 地图状态改变事件(实时触发)
205
- */
206
- onCameraMove?: (event: NativeSyntheticEvent<CameraEvent>) => void;
207
-
208
- /**
209
- * 地图状态改变完成事件
210
- */
211
- onCameraIdle?: (event: NativeSyntheticEvent<CameraEvent>) => void;
212
-
213
- /**
214
- * 地图加载完成事件
215
- */
216
- onLoad?: (event: NativeSyntheticEvent<{}>) => void;
217
-
218
- /**
219
- * 地图定位更新事件
220
- */
221
- onLocation?: (event: NativeSyntheticEvent<LocationEvent>) => void;
222
-
223
- /**
224
- * 子组件
225
- */
226
- children?: React.ReactNode;
227
- }
228
-
229
- /**
230
- * 地图视图方法
231
- */
232
- export interface MapViewMethods {
233
- /**
234
- * 移动相机
235
- * @param cameraPosition 目标相机位置
236
- * @param duration 动画时长(毫秒)
237
- */
238
- moveCamera(cameraPosition: CameraPosition, duration?: number): void;
239
-
240
- /**
241
- * 将屏幕坐标转换为地理坐标
242
- * @param point 屏幕坐标
243
- * @returns 地理坐标
244
- */
245
- getLatLng(point: Point): Promise<LatLng>;
246
-
247
- /**
248
- * 设置地图中心点
249
- * @param center 中心点
250
- * @param animated 是否启用动画
251
- */
252
- setCenter(center: LatLng, animated?: boolean): void;
253
-
254
- /**
255
- * 设置地图缩放级别
256
- * @param zoom 缩放级别
257
- * @param animated 是否启用动画
258
- */
259
- setZoom(zoom: number, animated?: boolean): void;
260
-
261
- /**
262
- * 获取相机位置
263
- * @returns 相机位置
264
- */
265
- getCameraPosition(): Promise<CameraPosition>;
266
-
267
-
268
- }
269
-
270
- /**
271
- * MapView Ref 公开接口(用户使用)
272
- */
273
- export interface MapViewRef {
274
- moveCamera(position: CameraPosition, duration?: number): Promise<void>;
275
- getLatLng(point: Point): Promise<LatLng>;
276
- setCenter(center: LatLng, animated?: boolean): Promise<void>;
277
- setZoom(zoom: number, animated?: boolean): Promise<void>;
278
- getCameraPosition(): Promise<CameraPosition>;
279
-
280
- }
281
-