expo-gaode-map-navigation 1.0.1-next.0 → 1.0.1-next.2

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 (40) hide show
  1. package/README.md +117 -28
  2. package/android/src/main/java/expo/modules/gaodemap/map/ExpoGaodeMapModule.kt +7 -0
  3. package/android/src/main/java/expo/modules/gaodemap/map/modules/SDKInitializer.kt +38 -3
  4. package/build/map/ExpoGaodeMapModule.js +5 -5
  5. package/ios/map/ExpoGaodeMapModule.swift +22 -6
  6. package/package.json +13 -6
  7. package/package.json.backup +0 -47
  8. package/plugin/README.md +0 -52
  9. package/plugin/build/withGaodeMap.d.ts +0 -22
  10. package/plugin/build/withGaodeMap.js +0 -169
  11. package/plugin/src/withGaodeMap.ts +0 -231
  12. package/plugin/tsconfig.tsbuildinfo +0 -1
  13. package/src/ExpoGaodeMapNaviView.tsx +0 -94
  14. package/src/ExpoGaodeMapNavigation.types.ts +0 -3
  15. package/src/ExpoGaodeMapNavigationModule.ts +0 -11
  16. package/src/index.ts +0 -262
  17. package/src/map/ExpoGaodeMap.types.ts +0 -46
  18. package/src/map/ExpoGaodeMapModule.ts +0 -315
  19. package/src/map/ExpoGaodeMapView.tsx +0 -120
  20. package/src/map/components/overlays/Circle.tsx +0 -20
  21. package/src/map/components/overlays/Cluster.tsx +0 -26
  22. package/src/map/components/overlays/HeatMap.tsx +0 -27
  23. package/src/map/components/overlays/Marker.tsx +0 -88
  24. package/src/map/components/overlays/MultiPoint.tsx +0 -27
  25. package/src/map/components/overlays/Polygon.tsx +0 -19
  26. package/src/map/components/overlays/Polyline.tsx +0 -19
  27. package/src/map/components/overlays/index.ts +0 -7
  28. package/src/map/index.ts +0 -37
  29. package/src/map/types/common.types.ts +0 -126
  30. package/src/map/types/index.ts +0 -55
  31. package/src/map/types/location.types.ts +0 -368
  32. package/src/map/types/map-view.types.ts +0 -281
  33. package/src/map/types/overlays.types.ts +0 -404
  34. package/src/map/utils/EventManager.ts +0 -23
  35. package/src/map/utils/ModuleLoader.ts +0 -115
  36. package/src/types/coordinates.types.ts +0 -25
  37. package/src/types/independent.types.ts +0 -288
  38. package/src/types/index.ts +0 -5
  39. package/src/types/naviview.types.ts +0 -330
  40. package/src/types/route.types.ts +0 -305
package/src/map/index.ts DELETED
@@ -1,37 +0,0 @@
1
-
2
- // 导出类型定义
3
- export * from './ExpoGaodeMap.types';
4
- export * from './types';
5
-
6
- // 导出原生模块 - 直接使用,无需封装
7
- export { default as ExpoGaodeMapModule } from './ExpoGaodeMapModule';
8
-
9
- // 从 ExpoGaodeMapModule 重新导出类型,方便使用
10
- export type { SDKConfig, PermissionStatus } from './ExpoGaodeMapModule';
11
-
12
- // 导出地图视图组件
13
- export { default as MapView } from './ExpoGaodeMapView';
14
- export type { MapViewRef } from './ExpoGaodeMapView';
15
-
16
- // 导出覆盖物组件
17
- export {
18
- Marker,
19
- Polyline,
20
- Polygon,
21
- Circle,
22
- HeatMap,
23
- MultiPoint,
24
- Cluster,
25
- } from './components/overlays';
26
-
27
- // 导出模块检测工具
28
- export {
29
- requireModule,
30
- OptionalModules,
31
- getInstalledModules,
32
- printModuleInfo,
33
- createLazyLoader,
34
- } from './utils/ModuleLoader';
35
-
36
- // 默认导出原生模块
37
- export { default } from './ExpoGaodeMapModule';
@@ -1,126 +0,0 @@
1
- /**
2
- * 高德地图通用类型定义
3
- * 基于 Expo Modules API
4
- */
5
-
6
- /**
7
- * 点坐标(屏幕坐标)
8
- */
9
- export interface Point {
10
- x: number;
11
- y: number;
12
- }
13
-
14
- /**
15
- * 地理坐标
16
- */
17
- export interface LatLng {
18
- /**
19
- * 纬度
20
- */
21
- latitude: number;
22
-
23
- /**
24
- * 经度
25
- */
26
- longitude: number;
27
- }
28
-
29
- /**
30
- * 地图标注点(POI)
31
- */
32
- export interface MapPoi {
33
- /**
34
- * 标注点 ID
35
- */
36
- id: string;
37
-
38
- /**
39
- * 标注点名称
40
- */
41
- name: string;
42
-
43
- /**
44
- * 标注点坐标
45
- */
46
- position: LatLng;
47
- }
48
-
49
- /**
50
- * 矩形坐标边界
51
- */
52
- export interface LatLngBounds {
53
- /**
54
- * 西南坐标
55
- */
56
- southwest: LatLng;
57
-
58
- /**
59
- * 东北坐标
60
- */
61
- northeast: LatLng;
62
- }
63
-
64
- /**
65
- * 地图相机位置
66
- */
67
- export interface CameraPosition {
68
- /**
69
- * 中心坐标
70
- */
71
- target?: LatLng;
72
-
73
- /**
74
- * 缩放级别(3-20)
75
- */
76
- zoom?: number;
77
-
78
- /**
79
- * 朝向、旋转角度(0-360度)
80
- */
81
- bearing?: number;
82
-
83
- /**
84
- * 倾斜角度(0-60度)
85
- */
86
- tilt?: number;
87
- }
88
-
89
- /**
90
- * 地图类型
91
- */
92
- export enum MapType {
93
- /**
94
- * 标准地图
95
- */
96
- Standard = 0,
97
-
98
- /**
99
- * 卫星地图
100
- */
101
- Satellite = 1,
102
-
103
- /**
104
- * 夜间地图
105
- */
106
- Night = 2,
107
-
108
- /**
109
- * 导航地图
110
- */
111
- Navi = 3,
112
-
113
- /**
114
- * 公交地图
115
- * @platform android
116
- */
117
- Bus = 4,
118
- }
119
-
120
- /**
121
- * 颜色值类型
122
- * 支持:
123
- * - 十六进制字符串: '#AARRGGBB' 或 '#RRGGBB'
124
- * - 数字格式: 0xAARRGGBB (用于 Android)
125
- */
126
- export type ColorValue = string | number;
@@ -1,55 +0,0 @@
1
- /**
2
- * 高德地图 Expo Module 类型定义统一导出
3
- * 基于 Expo Modules API 重新设计
4
- */
5
-
6
- // 通用类型
7
- export type {
8
- Point,
9
- LatLng,
10
- MapPoi,
11
- LatLngBounds,
12
- CameraPosition,
13
- ColorValue,
14
- } from './common.types';
15
-
16
- export { MapType } from './common.types';
17
-
18
- // 地图视图类型
19
- export type {
20
- LocationEvent,
21
- CameraEvent,
22
- MapViewProps,
23
- MapViewMethods,
24
- MapViewRef,
25
- } from './map-view.types';
26
-
27
- // 定位类型
28
- export type {
29
- Coordinates,
30
- ReGeocode,
31
- LocationOptions,
32
- LocationListener,
33
- GeoLanguage,
34
- LocationProtocol,
35
- } from './location.types';
36
-
37
- export {
38
- LocationAccuracy,
39
- LocationMode,
40
- CoordinateType,
41
- } from './location.types';
42
-
43
- // 覆盖物类型
44
- export type {
45
- MarkerProps,
46
- PolylineProps,
47
- PolygonProps,
48
- CircleProps,
49
- HeatMapProps,
50
- MultiPointItem,
51
- MultiPointProps,
52
- ClusterParams,
53
- ClusterPoint,
54
- ClusterProps,
55
- } from './overlays.types';
@@ -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;