expo-gaode-map-navigation 2.0.18 → 2.0.19
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.
- package/android/build.gradle +4 -25
- package/build/ExpoGaodeMapNaviView.js +2 -1
- package/build/ExpoGaodeMapNaviView.js.map +1 -1
- package/build/ExpoGaodeMapNavigationModule.d.ts +1 -1
- package/build/ExpoGaodeMapNavigationModule.d.ts.map +1 -1
- package/build/ExpoGaodeMapNavigationModule.js.map +1 -1
- package/build/map/ExpoGaodeMapModule.d.ts +3 -2
- package/build/map/ExpoGaodeMapModule.d.ts.map +1 -1
- package/build/map/ExpoGaodeMapModule.js +3 -1
- package/build/map/ExpoGaodeMapModule.js.map +1 -1
- package/build/map/ExpoGaodeMapOfflineModule.js +1 -1
- package/build/map/ExpoGaodeMapOfflineModule.js.map +1 -1
- package/build/map/ExpoGaodeMapView.js +2 -8
- package/build/map/ExpoGaodeMapView.js.map +1 -1
- package/build/map/components/FoldableMapView.d.ts +3 -2
- package/build/map/components/FoldableMapView.d.ts.map +1 -1
- package/build/map/components/FoldableMapView.js +2 -1
- package/build/map/components/FoldableMapView.js.map +1 -1
- package/build/map/components/MapUI.js +2 -1
- package/build/map/components/MapUI.js.map +1 -1
- package/build/map/components/overlays/Circle.d.ts +1 -1
- package/build/map/components/overlays/Circle.d.ts.map +1 -1
- package/build/map/components/overlays/Circle.js +2 -1
- package/build/map/components/overlays/Circle.js.map +1 -1
- package/build/map/components/overlays/Cluster.d.ts +1 -1
- package/build/map/components/overlays/Cluster.d.ts.map +1 -1
- package/build/map/components/overlays/Cluster.js +2 -1
- package/build/map/components/overlays/Cluster.js.map +1 -1
- package/build/map/components/overlays/HeatMap.d.ts +1 -1
- package/build/map/components/overlays/HeatMap.d.ts.map +1 -1
- package/build/map/components/overlays/HeatMap.js +2 -1
- package/build/map/components/overlays/HeatMap.js.map +1 -1
- package/build/map/components/overlays/Marker.d.ts +1 -1
- package/build/map/components/overlays/Marker.d.ts.map +1 -1
- package/build/map/components/overlays/Marker.js +2 -5
- package/build/map/components/overlays/Marker.js.map +1 -1
- package/build/map/components/overlays/MultiPoint.d.ts +1 -2
- package/build/map/components/overlays/MultiPoint.d.ts.map +1 -1
- package/build/map/components/overlays/MultiPoint.js +2 -1
- package/build/map/components/overlays/MultiPoint.js.map +1 -1
- package/build/map/components/overlays/Polygon.d.ts +1 -1
- package/build/map/components/overlays/Polygon.d.ts.map +1 -1
- package/build/map/components/overlays/Polygon.js +2 -1
- package/build/map/components/overlays/Polygon.js.map +1 -1
- package/build/map/components/overlays/Polyline.d.ts +1 -1
- package/build/map/components/overlays/Polyline.d.ts.map +1 -1
- package/build/map/components/overlays/Polyline.js +2 -1
- package/build/map/components/overlays/Polyline.js.map +1 -1
- package/build/map/search/ExpoGaodeMapSearchModule.d.ts +1 -1
- package/build/map/search/ExpoGaodeMapSearchModule.d.ts.map +1 -1
- package/build/map/search/ExpoGaodeMapSearchModule.js.map +1 -1
- package/build/map/types/common.types.d.ts +1 -1
- package/build/map/types/common.types.d.ts.map +1 -1
- package/build/map/types/common.types.js.map +1 -1
- package/build/map/types/map-view.types.d.ts +2 -2
- package/build/map/types/map-view.types.d.ts.map +1 -1
- package/build/map/types/map-view.types.js.map +1 -1
- package/build/map/utils/GeoUtils.d.ts +1 -1
- package/build/map/utils/GeoUtils.d.ts.map +1 -1
- package/build/map/utils/GeoUtils.js +2 -2
- package/build/map/utils/GeoUtils.js.map +1 -1
- package/build/route-geometry.d.ts.map +1 -1
- package/build/route-geometry.js +24 -8
- package/build/route-geometry.js.map +1 -1
- package/build/src/ExpoGaodeMapNaviView.d.ts +67 -0
- package/build/src/ExpoGaodeMapNaviView.d.ts.map +1 -0
- package/build/src/ExpoGaodeMapNaviView.js +138 -0
- package/build/src/ExpoGaodeMapNaviView.js.map +1 -0
- package/build/src/ExpoGaodeMapNavigation.types.d.ts +2 -0
- package/build/src/ExpoGaodeMapNavigation.types.d.ts.map +1 -0
- package/build/src/ExpoGaodeMapNavigation.types.js +3 -0
- package/build/src/ExpoGaodeMapNavigation.types.js.map +1 -0
- package/build/src/ExpoGaodeMapNavigationModule.d.ts +4 -0
- package/build/src/ExpoGaodeMapNavigationModule.d.ts.map +1 -0
- package/build/src/ExpoGaodeMapNavigationModule.js +27 -0
- package/build/src/ExpoGaodeMapNavigationModule.js.map +1 -0
- package/build/src/index.d.ts +47 -0
- package/build/src/index.d.ts.map +1 -0
- package/build/src/index.js +48 -0
- package/build/src/index.js.map +1 -0
- package/build/src/map/ExpoGaodeMapModule.d.ts +256 -0
- package/build/src/map/ExpoGaodeMapModule.d.ts.map +1 -0
- package/build/src/map/ExpoGaodeMapModule.js +813 -0
- package/build/src/map/ExpoGaodeMapModule.js.map +1 -0
- package/build/src/map/ExpoGaodeMapOfflineModule.d.ts +145 -0
- package/build/src/map/ExpoGaodeMapOfflineModule.d.ts.map +1 -0
- package/build/src/map/ExpoGaodeMapOfflineModule.js +24 -0
- package/build/src/map/ExpoGaodeMapOfflineModule.js.map +1 -0
- package/build/src/map/ExpoGaodeMapView.d.ts +23 -0
- package/build/src/map/ExpoGaodeMapView.d.ts.map +1 -0
- package/build/src/map/ExpoGaodeMapView.js +173 -0
- package/build/src/map/ExpoGaodeMapView.js.map +1 -0
- package/build/src/map/components/FoldableMapView.d.ts +39 -0
- package/build/src/map/components/FoldableMapView.d.ts.map +1 -0
- package/build/src/map/components/FoldableMapView.js +171 -0
- package/build/src/map/components/FoldableMapView.js.map +1 -0
- package/build/src/map/components/MapContext.d.ts +13 -0
- package/build/src/map/components/MapContext.d.ts.map +1 -0
- package/build/src/map/components/MapContext.js +18 -0
- package/build/src/map/components/MapContext.js.map +1 -0
- package/build/src/map/components/MapUI.d.ts +19 -0
- package/build/src/map/components/MapUI.d.ts.map +1 -0
- package/build/src/map/components/MapUI.js +24 -0
- package/build/src/map/components/MapUI.js.map +1 -0
- package/build/src/map/components/overlays/Circle.d.ts +13 -0
- package/build/src/map/components/overlays/Circle.d.ts.map +1 -0
- package/build/src/map/components/overlays/Circle.js +20 -0
- package/build/src/map/components/overlays/Circle.js.map +1 -0
- package/build/src/map/components/overlays/Cluster.d.ts +12 -0
- package/build/src/map/components/overlays/Cluster.d.ts.map +1 -0
- package/build/src/map/components/overlays/Cluster.js +16 -0
- package/build/src/map/components/overlays/Cluster.js.map +1 -0
- package/build/src/map/components/overlays/HeatMap.d.ts +12 -0
- package/build/src/map/components/overlays/HeatMap.d.ts.map +1 -0
- package/build/src/map/components/overlays/HeatMap.js +46 -0
- package/build/src/map/components/overlays/HeatMap.js.map +1 -0
- package/build/src/map/components/overlays/Marker.d.ts +16 -0
- package/build/src/map/components/overlays/Marker.d.ts.map +1 -0
- package/build/src/map/components/overlays/Marker.js +125 -0
- package/build/src/map/components/overlays/Marker.js.map +1 -0
- package/build/src/map/components/overlays/MultiPoint.d.ts +9 -0
- package/build/src/map/components/overlays/MultiPoint.d.ts.map +1 -0
- package/build/src/map/components/overlays/MultiPoint.js +15 -0
- package/build/src/map/components/overlays/MultiPoint.js.map +1 -0
- package/build/src/map/components/overlays/Polygon.d.ts +12 -0
- package/build/src/map/components/overlays/Polygon.d.ts.map +1 -0
- package/build/src/map/components/overlays/Polygon.js +20 -0
- package/build/src/map/components/overlays/Polygon.js.map +1 -0
- package/build/src/map/components/overlays/Polyline.d.ts +12 -0
- package/build/src/map/components/overlays/Polyline.d.ts.map +1 -0
- package/build/src/map/components/overlays/Polyline.js +20 -0
- package/build/src/map/components/overlays/Polyline.js.map +1 -0
- package/build/src/map/components/overlays/index.d.ts +8 -0
- package/build/src/map/components/overlays/index.d.ts.map +1 -0
- package/build/src/map/components/overlays/index.js +8 -0
- package/build/src/map/components/overlays/index.js.map +1 -0
- package/build/src/map/index.d.ts +35 -0
- package/build/src/map/index.d.ts.map +1 -0
- package/build/src/map/index.js +48 -0
- package/build/src/map/index.js.map +1 -0
- package/build/src/map/search/ExpoGaodeMapSearch.types.d.ts +340 -0
- package/build/src/map/search/ExpoGaodeMapSearch.types.d.ts.map +1 -0
- package/build/src/map/search/ExpoGaodeMapSearch.types.js +19 -0
- package/build/src/map/search/ExpoGaodeMapSearch.types.js.map +1 -0
- package/build/src/map/search/ExpoGaodeMapSearchModule.d.ts +74 -0
- package/build/src/map/search/ExpoGaodeMapSearchModule.d.ts.map +1 -0
- package/build/src/map/search/ExpoGaodeMapSearchModule.js +48 -0
- package/build/src/map/search/ExpoGaodeMapSearchModule.js.map +1 -0
- package/build/src/map/search/index.d.ts +156 -0
- package/build/src/map/search/index.d.ts.map +1 -0
- package/build/src/map/search/index.js +171 -0
- package/build/src/map/search/index.js.map +1 -0
- package/build/src/map/types/common.types.d.ts +199 -0
- package/build/src/map/types/common.types.d.ts.map +1 -0
- package/build/src/map/types/common.types.js +33 -0
- package/build/src/map/types/common.types.js.map +1 -0
- package/build/src/map/types/index.d.ts +13 -0
- package/build/src/map/types/index.d.ts.map +1 -0
- package/build/src/map/types/index.js +7 -0
- package/build/src/map/types/index.js.map +1 -0
- package/build/src/map/types/location.types.d.ts +358 -0
- package/build/src/map/types/location.types.d.ts.map +1 -0
- package/build/src/map/types/location.types.js +93 -0
- package/build/src/map/types/location.types.js.map +1 -0
- package/build/src/map/types/map-view.types.d.ts +340 -0
- package/build/src/map/types/map-view.types.d.ts.map +1 -0
- package/build/src/map/types/map-view.types.js +6 -0
- package/build/src/map/types/map-view.types.js.map +1 -0
- package/build/src/map/types/native-module.types.d.ts +395 -0
- package/build/src/map/types/native-module.types.d.ts.map +1 -0
- package/build/src/map/types/native-module.types.js +5 -0
- package/build/src/map/types/native-module.types.js.map +1 -0
- package/build/src/map/types/offline.types.d.ts +133 -0
- package/build/src/map/types/offline.types.d.ts.map +1 -0
- package/build/src/map/types/offline.types.js +5 -0
- package/build/src/map/types/offline.types.js.map +1 -0
- package/build/src/map/types/overlays.types.d.ts +456 -0
- package/build/src/map/types/overlays.types.d.ts.map +1 -0
- package/build/src/map/types/overlays.types.js +6 -0
- package/build/src/map/types/overlays.types.js.map +1 -0
- package/build/src/map/types/route-playback.types.d.ts +28 -0
- package/build/src/map/types/route-playback.types.d.ts.map +1 -0
- package/build/src/map/types/route-playback.types.js +2 -0
- package/build/src/map/types/route-playback.types.js.map +1 -0
- package/build/src/map/utils/ErrorHandler.d.ts +121 -0
- package/build/src/map/utils/ErrorHandler.d.ts.map +1 -0
- package/build/src/map/utils/ErrorHandler.js +470 -0
- package/build/src/map/utils/ErrorHandler.js.map +1 -0
- package/build/src/map/utils/GeoUtils.d.ts +21 -0
- package/build/src/map/utils/GeoUtils.d.ts.map +1 -0
- package/build/src/map/utils/GeoUtils.js +78 -0
- package/build/src/map/utils/GeoUtils.js.map +1 -0
- package/build/src/map/utils/OfflineMapManager.d.ts +153 -0
- package/build/src/map/utils/OfflineMapManager.d.ts.map +1 -0
- package/build/src/map/utils/OfflineMapManager.js +217 -0
- package/build/src/map/utils/OfflineMapManager.js.map +1 -0
- package/build/src/map/utils/PermissionUtils.d.ts +92 -0
- package/build/src/map/utils/PermissionUtils.d.ts.map +1 -0
- package/build/src/map/utils/PermissionUtils.js +252 -0
- package/build/src/map/utils/PermissionUtils.js.map +1 -0
- package/build/src/map/utils/PlatformDetector.d.ts +103 -0
- package/build/src/map/utils/PlatformDetector.d.ts.map +1 -0
- package/build/src/map/utils/PlatformDetector.js +178 -0
- package/build/src/map/utils/PlatformDetector.js.map +1 -0
- package/build/src/map/utils/lazyNativeViewManager.d.ts +3 -0
- package/build/src/map/utils/lazyNativeViewManager.d.ts.map +1 -0
- package/build/src/map/utils/lazyNativeViewManager.js +11 -0
- package/build/src/map/utils/lazyNativeViewManager.js.map +1 -0
- package/build/src/route-geometry.d.ts +13 -0
- package/build/src/route-geometry.d.ts.map +1 -0
- package/build/src/route-geometry.js +154 -0
- package/build/src/route-geometry.js.map +1 -0
- package/build/src/route-planning.d.ts +21 -0
- package/build/src/route-planning.d.ts.map +1 -0
- package/build/src/route-planning.js +67 -0
- package/build/src/route-planning.js.map +1 -0
- package/build/src/types/coordinates.types.d.ts +25 -0
- package/build/src/types/coordinates.types.d.ts.map +1 -0
- package/build/src/types/coordinates.types.js +6 -0
- package/build/src/types/coordinates.types.js.map +1 -0
- package/build/src/types/independent.types.d.ts +385 -0
- package/build/src/types/independent.types.d.ts.map +1 -0
- package/build/src/types/independent.types.js +2 -0
- package/build/src/types/independent.types.js.map +1 -0
- package/build/src/types/index.d.ts +6 -0
- package/build/src/types/index.d.ts.map +1 -0
- package/build/src/types/index.js +7 -0
- package/build/src/types/index.js.map +1 -0
- package/build/src/types/native-module.types.d.ts +74 -0
- package/build/src/types/native-module.types.d.ts.map +1 -0
- package/build/src/types/native-module.types.js +3 -0
- package/build/src/types/native-module.types.js.map +1 -0
- package/build/src/types/naviview.types.d.ts +562 -0
- package/build/src/types/naviview.types.d.ts.map +1 -0
- package/build/src/types/naviview.types.js +2 -0
- package/build/src/types/naviview.types.js.map +1 -0
- package/build/src/types/route.types.d.ts +414 -0
- package/build/src/types/route.types.d.ts.map +1 -0
- package/build/src/types/route.types.js +137 -0
- package/build/src/types/route.types.js.map +1 -0
- package/build/src/web-api-fallback.d.ts +5 -0
- package/build/src/web-api-fallback.d.ts.map +1 -0
- package/build/src/web-api-fallback.js +160 -0
- package/build/src/web-api-fallback.js.map +1 -0
- package/build/src/web-route-following.d.ts +3 -0
- package/build/src/web-route-following.d.ts.map +1 -0
- package/build/src/web-route-following.js +178 -0
- package/build/src/web-route-following.js.map +1 -0
- package/build/types/native-module.types.d.ts +2 -2
- package/build/types/native-module.types.d.ts.map +1 -1
- package/build/types/native-module.types.js.map +1 -1
- package/build/types/naviview.types.d.ts +1 -1
- package/build/types/naviview.types.d.ts.map +1 -1
- package/build/types/naviview.types.js.map +1 -1
- package/build/web-api-fallback.d.ts.map +1 -1
- package/build/web-api-fallback.js +0 -1
- package/build/web-api-fallback.js.map +1 -1
- package/ios/map/ExpoGaodeMapView.swift +145 -3
- package/ios/map/managers/UIManager.swift +3 -0
- package/package.json +10 -7
- package/plugin/build/withGaodeMap.js +19 -14
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 高德地图原生模块类型定义
|
|
3
|
+
*/
|
|
4
|
+
import type { NativeModule } from 'expo';
|
|
5
|
+
import type { LatLng, PrivacyConfig, PrivacyStatus, SDKConfig, PermissionStatus, LatLngPoint } from './common.types';
|
|
6
|
+
import type { CoordinateType, Coordinates, ReGeocode, LocationMode, LocationAccuracy, LocationListener } from './location.types';
|
|
7
|
+
import type { ExpoGaodeMapModuleEvents } from './map-view.types';
|
|
8
|
+
export interface ExpoGaodeMapModule extends NativeModule<ExpoGaodeMapModuleEvents> {
|
|
9
|
+
/**
|
|
10
|
+
* 原生事件订阅方法
|
|
11
|
+
*/
|
|
12
|
+
addListener<K extends keyof ExpoGaodeMapModuleEvents>(eventName: K, listener: ExpoGaodeMapModuleEvents[K]): {
|
|
13
|
+
remove: () => void;
|
|
14
|
+
};
|
|
15
|
+
addListener(eventName: string, listener: (...args: unknown[]) => void): {
|
|
16
|
+
remove: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 初始化高德地图 SDK
|
|
20
|
+
* @param config SDK 配置参数,包含 Android 和 iOS 的 API Key
|
|
21
|
+
*/
|
|
22
|
+
initSDK(config: SDKConfig): void;
|
|
23
|
+
/**
|
|
24
|
+
* 一次性同步完整隐私状态
|
|
25
|
+
*/
|
|
26
|
+
setPrivacyConfig(config: PrivacyConfig): void;
|
|
27
|
+
/**
|
|
28
|
+
* 设置当前隐私协议版本,用于在协议变更时使旧同意失效
|
|
29
|
+
*/
|
|
30
|
+
setPrivacyVersion(version: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* 清空已持久化的隐私同意状态
|
|
33
|
+
*/
|
|
34
|
+
resetPrivacyConsent(): void;
|
|
35
|
+
/**
|
|
36
|
+
* 获取当前隐私政策状态
|
|
37
|
+
*/
|
|
38
|
+
getPrivacyStatus(): PrivacyStatus;
|
|
39
|
+
/**
|
|
40
|
+
* 设置是否加载世界向量地图(海外地图)
|
|
41
|
+
* 必须在地图初始化之前调用
|
|
42
|
+
* 世界地图为高级服务,需要开通相关权限
|
|
43
|
+
*/
|
|
44
|
+
setLoadWorldVectorMap(enabled: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* 获取高德地图 SDK 版本号
|
|
47
|
+
* @returns SDK 版本字符串
|
|
48
|
+
*/
|
|
49
|
+
getVersion(): string;
|
|
50
|
+
/**
|
|
51
|
+
* 开始连续定位
|
|
52
|
+
* 启动后会持续接收位置更新,通过 onLocationUpdate 事件回调
|
|
53
|
+
*/
|
|
54
|
+
start(): void;
|
|
55
|
+
/**
|
|
56
|
+
* 停止定位
|
|
57
|
+
* 停止接收位置更新
|
|
58
|
+
*/
|
|
59
|
+
stop(): void;
|
|
60
|
+
/**
|
|
61
|
+
* 检查是否正在定位
|
|
62
|
+
* @returns 是否正在定位
|
|
63
|
+
*/
|
|
64
|
+
isStarted(): Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* 获取当前位置(单次定位)
|
|
67
|
+
* @returns 位置信息,包含坐标和可选的逆地理编码信息
|
|
68
|
+
*/
|
|
69
|
+
getCurrentLocation(): Promise<Coordinates | ReGeocode>;
|
|
70
|
+
/**
|
|
71
|
+
* 坐标转换
|
|
72
|
+
* 将其他坐标系的坐标转换为高德地图使用的 GCJ-02 坐标系
|
|
73
|
+
* @param coordinate 需要转换的坐标
|
|
74
|
+
* @param type 原坐标系类型
|
|
75
|
+
*/
|
|
76
|
+
coordinateConvert(coordinate: LatLngPoint, type: CoordinateType): Promise<LatLng>;
|
|
77
|
+
/**
|
|
78
|
+
* 设置是否返回逆地理编码信息
|
|
79
|
+
* @param isReGeocode true: 返回地址信息; false: 只返回坐标
|
|
80
|
+
*/
|
|
81
|
+
setLocatingWithReGeocode(isReGeocode: boolean): void;
|
|
82
|
+
/**
|
|
83
|
+
* 设置定位模式(Android)
|
|
84
|
+
* @param mode 定位模式:高精度/低功耗/仅设备
|
|
85
|
+
*/
|
|
86
|
+
setLocationMode(mode: LocationMode): void;
|
|
87
|
+
/**
|
|
88
|
+
* 设置定位间隔(毫秒)
|
|
89
|
+
* @param interval 定位间隔时间,单位毫秒,默认 2000ms
|
|
90
|
+
*/
|
|
91
|
+
setInterval(interval: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* 设置是否单次定位(Android)
|
|
94
|
+
* @param isOnceLocation true: 单次定位; false: 连续定位
|
|
95
|
+
*/
|
|
96
|
+
setOnceLocation(isOnceLocation: boolean): void;
|
|
97
|
+
/**
|
|
98
|
+
* 设置是否使用设备传感器(Android)
|
|
99
|
+
* @param sensorEnable true: 使用传感器; false: 不使用
|
|
100
|
+
*/
|
|
101
|
+
setSensorEnable(sensorEnable: boolean): void;
|
|
102
|
+
/**
|
|
103
|
+
* 设置是否允许 WiFi 扫描(Android)
|
|
104
|
+
* @param wifiScan true: 允许; false: 不允许
|
|
105
|
+
*/
|
|
106
|
+
setWifiScan(wifiScan: boolean): void;
|
|
107
|
+
/**
|
|
108
|
+
* 设置是否 GPS 优先(Android)
|
|
109
|
+
* @param gpsFirst true: GPS 优先; false: 网络优先
|
|
110
|
+
*/
|
|
111
|
+
setGpsFirst(gpsFirst: boolean): void;
|
|
112
|
+
/**
|
|
113
|
+
* 设置是否允许返回模拟位置(Android)
|
|
114
|
+
* @param mockEnable true: 允许; false: 不允许
|
|
115
|
+
*/
|
|
116
|
+
setMockEnable(mockEnable: boolean): void;
|
|
117
|
+
/**
|
|
118
|
+
* 设置是否等待 WiFi 列表刷新(Android)
|
|
119
|
+
* @param onceLocationLatest true: 等待; false: 不等待
|
|
120
|
+
*/
|
|
121
|
+
setOnceLocationLatest(onceLocationLatest: boolean): void;
|
|
122
|
+
/**
|
|
123
|
+
* 设置逆地理编码语言
|
|
124
|
+
* @param language 语言代码,如 "zh-CN", "en"
|
|
125
|
+
*/
|
|
126
|
+
setGeoLanguage(language: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* 设置是否使用缓存策略(Android)
|
|
129
|
+
* @param locationCacheEnable true: 使用缓存; false: 不使用
|
|
130
|
+
*/
|
|
131
|
+
setLocationCacheEnable(locationCacheEnable: boolean): void;
|
|
132
|
+
/**
|
|
133
|
+
* 设置网络请求超时时间(Android)
|
|
134
|
+
* @param httpTimeOut 超时时间,单位毫秒
|
|
135
|
+
*/
|
|
136
|
+
setHttpTimeOut(httpTimeOut: number): void;
|
|
137
|
+
/**
|
|
138
|
+
* 设置期望的定位精度(iOS)
|
|
139
|
+
* @param accuracy 精度级别:最佳/10米/100米/1公里/3公里
|
|
140
|
+
*/
|
|
141
|
+
setDesiredAccuracy(accuracy: LocationAccuracy): void;
|
|
142
|
+
/**
|
|
143
|
+
* 设置定位超时时间(秒)
|
|
144
|
+
* @param timeout 超时时间,单位秒,默认 10 秒
|
|
145
|
+
*/
|
|
146
|
+
setLocationTimeout(timeout: number): void;
|
|
147
|
+
/**
|
|
148
|
+
* 设置逆地理编码超时时间(秒)
|
|
149
|
+
* @param timeout 超时时间,单位秒,默认 5 秒
|
|
150
|
+
*/
|
|
151
|
+
setReGeocodeTimeout(timeout: number): void;
|
|
152
|
+
/**
|
|
153
|
+
* 设置距离过滤器(米)(iOS)
|
|
154
|
+
* 只有移动超过指定距离才会更新位置
|
|
155
|
+
* @param distance 距离阈值,单位米
|
|
156
|
+
*/
|
|
157
|
+
setDistanceFilter(distance: number): void;
|
|
158
|
+
/**
|
|
159
|
+
* 设置是否自动暂停位置更新(iOS)
|
|
160
|
+
* @param pauses true: 自动暂停; false: 不暂停
|
|
161
|
+
*/
|
|
162
|
+
setPausesLocationUpdatesAutomatically(pauses: boolean): void;
|
|
163
|
+
/**
|
|
164
|
+
* 设置是否允许后台定位(iOS)
|
|
165
|
+
* @param allows true: 允许; false: 不允许
|
|
166
|
+
*/
|
|
167
|
+
setAllowsBackgroundLocationUpdates(allows: boolean): void;
|
|
168
|
+
/**
|
|
169
|
+
* iOS 是否已启用后台定位配置
|
|
170
|
+
*/
|
|
171
|
+
readonly isBackgroundLocationEnabled: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* 设置定位协议
|
|
174
|
+
* @param protocol 协议类型
|
|
175
|
+
*/
|
|
176
|
+
setLocationProtocol(protocol: string): void;
|
|
177
|
+
/**
|
|
178
|
+
* 开始更新设备方向(罗盘朝向)(iOS)
|
|
179
|
+
*/
|
|
180
|
+
startUpdatingHeading(): void;
|
|
181
|
+
/**
|
|
182
|
+
* 停止更新设备方向(iOS)
|
|
183
|
+
*/
|
|
184
|
+
stopUpdatingHeading(): void;
|
|
185
|
+
/**
|
|
186
|
+
* 检查前台位置权限状态(增强版)
|
|
187
|
+
* @returns 详细的权限状态信息
|
|
188
|
+
*/
|
|
189
|
+
checkLocationPermission(): Promise<PermissionStatus>;
|
|
190
|
+
/**
|
|
191
|
+
* 请求前台位置权限(增强版)
|
|
192
|
+
* @returns 请求后的权限状态
|
|
193
|
+
*/
|
|
194
|
+
requestLocationPermission(): Promise<PermissionStatus>;
|
|
195
|
+
/**
|
|
196
|
+
* 请求后台位置权限(Android 10+、iOS)
|
|
197
|
+
* 注意:必须在前台权限已授予后才能请求
|
|
198
|
+
* @returns 请求后的权限状态
|
|
199
|
+
*/
|
|
200
|
+
requestBackgroundLocationPermission(): Promise<PermissionStatus>;
|
|
201
|
+
/**
|
|
202
|
+
* 打开应用设置页面
|
|
203
|
+
* 引导用户手动授予权限(当权限被永久拒绝时使用)
|
|
204
|
+
*/
|
|
205
|
+
openAppSettings(): void;
|
|
206
|
+
/**
|
|
207
|
+
* 检查原生 SDK 是否已配置 API Key
|
|
208
|
+
* @returns 是否已配置
|
|
209
|
+
*/
|
|
210
|
+
isNativeSDKConfigured(): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* 添加定位监听器(便捷方法)
|
|
213
|
+
* 封装原生事件订阅,返回带 remove 的订阅对象
|
|
214
|
+
*/
|
|
215
|
+
addLocationListener(listener: LocationListener): {
|
|
216
|
+
remove: () => void;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* 计算两个坐标点之间的距离
|
|
220
|
+
* @param coordinate1 第一个坐标点
|
|
221
|
+
* @param coordinate2 第二个坐标点
|
|
222
|
+
* @returns 两点之间的距离(单位:米)
|
|
223
|
+
*/
|
|
224
|
+
distanceBetweenCoordinates(coordinate1: LatLngPoint, coordinate2: LatLngPoint): number;
|
|
225
|
+
/**
|
|
226
|
+
* 根据多个坐标点计算可同时可见的推荐缩放级别
|
|
227
|
+
* @param points 坐标点集合(至少 1 个)
|
|
228
|
+
* @param viewportWidthPx 视口宽度(像素)
|
|
229
|
+
* @param viewportHeightPx 视口高度(像素)
|
|
230
|
+
* @param paddingPx 内边距(像素)
|
|
231
|
+
* @param minZoom 最小缩放
|
|
232
|
+
* @param maxZoom 最大缩放
|
|
233
|
+
*/
|
|
234
|
+
calculateFitZoom(points: LatLngPoint[], viewportWidthPx: number, viewportHeightPx: number, paddingPx: number, minZoom: number, maxZoom: number): number;
|
|
235
|
+
/**
|
|
236
|
+
* 判断点是否在圆内
|
|
237
|
+
* @param point 要判断的点
|
|
238
|
+
* @param center 圆心坐标
|
|
239
|
+
* @param radius 圆半径(单位:米)
|
|
240
|
+
* @returns 是否在圆内
|
|
241
|
+
*/
|
|
242
|
+
isPointInCircle(point: LatLngPoint, center: LatLngPoint, radius: number): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* 判断点是否在多边形内
|
|
245
|
+
* @param point 要判断的点
|
|
246
|
+
* @param polygon 多边形的顶点坐标数组,支持嵌套数组(多边形空洞)
|
|
247
|
+
* @returns 是否在多边形内
|
|
248
|
+
*/
|
|
249
|
+
isPointInPolygon(point: LatLngPoint, polygon: LatLngPoint[] | LatLngPoint[][]): boolean;
|
|
250
|
+
/**
|
|
251
|
+
* 计算多边形面积
|
|
252
|
+
* @param polygon 多边形的顶点坐标数组,支持嵌套数组(多边形空洞,会自动展平计算)
|
|
253
|
+
* @returns 面积(单位:平方米)
|
|
254
|
+
*/
|
|
255
|
+
calculatePolygonArea(polygon: LatLngPoint[] | LatLngPoint[][]): number;
|
|
256
|
+
/**
|
|
257
|
+
* 计算矩形面积
|
|
258
|
+
* @param southWest 西南角坐标
|
|
259
|
+
* @param northEast 东北角坐标
|
|
260
|
+
* @returns 面积(单位:平方米)
|
|
261
|
+
*/
|
|
262
|
+
calculateRectangleArea(southWest: LatLngPoint, northEast: LatLngPoint): number;
|
|
263
|
+
/**
|
|
264
|
+
* 获取路径上距离目标点最近的点
|
|
265
|
+
* @param path 路径点集合
|
|
266
|
+
* @param target 目标点
|
|
267
|
+
* @returns 最近点信息,包含坐标、索引和距离
|
|
268
|
+
*/
|
|
269
|
+
getNearestPointOnPath(path: LatLngPoint[], target: LatLngPoint): {
|
|
270
|
+
latitude: number;
|
|
271
|
+
longitude: number;
|
|
272
|
+
index: number;
|
|
273
|
+
distanceMeters: number;
|
|
274
|
+
} | null;
|
|
275
|
+
/**
|
|
276
|
+
* 计算多边形质心
|
|
277
|
+
* @param polygon 多边形顶点坐标数组,支持嵌套数组
|
|
278
|
+
* @returns 质心坐标
|
|
279
|
+
*/
|
|
280
|
+
calculateCentroid(polygon: LatLngPoint[] | LatLngPoint[][]): LatLng | null;
|
|
281
|
+
/**
|
|
282
|
+
* 计算路径边界和中心点
|
|
283
|
+
* @param points 路径点
|
|
284
|
+
* @returns 边界和中心点
|
|
285
|
+
*/
|
|
286
|
+
calculatePathBounds(points: LatLngPoint[]): {
|
|
287
|
+
north: number;
|
|
288
|
+
south: number;
|
|
289
|
+
east: number;
|
|
290
|
+
west: number;
|
|
291
|
+
center: LatLngPoint;
|
|
292
|
+
} | null;
|
|
293
|
+
/**
|
|
294
|
+
* GeoHash 编码
|
|
295
|
+
* @param coordinate 坐标点
|
|
296
|
+
* @param precision 精度 (1-12)
|
|
297
|
+
* @returns GeoHash 字符串
|
|
298
|
+
*/
|
|
299
|
+
encodeGeoHash(coordinate: LatLngPoint, precision: number): string;
|
|
300
|
+
/**
|
|
301
|
+
* 轨迹抽稀 (RDP 算法)
|
|
302
|
+
* @param points 原始轨迹点
|
|
303
|
+
* @param tolerance 允许误差(米)
|
|
304
|
+
* @returns 简化后的轨迹点
|
|
305
|
+
*/
|
|
306
|
+
simplifyPolyline(points: LatLngPoint[], tolerance: number): LatLng[];
|
|
307
|
+
/**
|
|
308
|
+
* 计算路径总长度
|
|
309
|
+
* @param points 路径点
|
|
310
|
+
* @returns 长度(米)
|
|
311
|
+
*/
|
|
312
|
+
calculatePathLength(points: LatLngPoint[]): number;
|
|
313
|
+
/**
|
|
314
|
+
* 解析高德地图 API 返回的 Polyline 字符串
|
|
315
|
+
* 格式: "lng,lat;lng,lat;..."
|
|
316
|
+
* @param polylineStr 高德原始 polyline 字符串,或包含 polyline 属性的对象
|
|
317
|
+
* @returns 解析后的点集
|
|
318
|
+
*/
|
|
319
|
+
parsePolyline(polylineStr: string | {
|
|
320
|
+
polyline: string;
|
|
321
|
+
}): LatLng[];
|
|
322
|
+
/**
|
|
323
|
+
* 获取路径上指定距离的点
|
|
324
|
+
* @param points 路径点
|
|
325
|
+
* @param distance 距离起点的米数
|
|
326
|
+
* @returns 点信息(坐标+角度)
|
|
327
|
+
*/
|
|
328
|
+
getPointAtDistance(points: LatLngPoint[], distance: number): {
|
|
329
|
+
latitude: number;
|
|
330
|
+
longitude: number;
|
|
331
|
+
angle: number;
|
|
332
|
+
} | null;
|
|
333
|
+
/**
|
|
334
|
+
* 瓦片坐标转换:经纬度 -> 瓦片坐标
|
|
335
|
+
* @param coordinate 坐标点
|
|
336
|
+
* @param zoom 缩放级别
|
|
337
|
+
* @returns 瓦片坐标 (x, y, z)
|
|
338
|
+
*/
|
|
339
|
+
latLngToTile(coordinate: LatLngPoint, zoom: number): {
|
|
340
|
+
x: number;
|
|
341
|
+
y: number;
|
|
342
|
+
z: number;
|
|
343
|
+
} | null;
|
|
344
|
+
/**
|
|
345
|
+
* 瓦片坐标转换:瓦片坐标 -> 经纬度
|
|
346
|
+
* @param tile 瓦片坐标 (x, y, z)
|
|
347
|
+
* @returns 经纬度
|
|
348
|
+
*/
|
|
349
|
+
tileToLatLng(tile: {
|
|
350
|
+
x: number;
|
|
351
|
+
y: number;
|
|
352
|
+
z: number;
|
|
353
|
+
}): LatLng | null;
|
|
354
|
+
/**
|
|
355
|
+
* 像素坐标转换:经纬度 -> 像素坐标
|
|
356
|
+
* @param coordinate 坐标点
|
|
357
|
+
* @param zoom 缩放级别
|
|
358
|
+
* @returns 像素坐标 (x, y)
|
|
359
|
+
*/
|
|
360
|
+
latLngToPixel(coordinate: LatLngPoint, zoom: number): {
|
|
361
|
+
x: number;
|
|
362
|
+
y: number;
|
|
363
|
+
} | null;
|
|
364
|
+
/**
|
|
365
|
+
* 像素坐标转换:像素坐标 -> 经纬度
|
|
366
|
+
* @param pixel 像素坐标 (x, y)
|
|
367
|
+
* @param zoom 缩放级别
|
|
368
|
+
* @returns 经纬度
|
|
369
|
+
*/
|
|
370
|
+
pixelToLatLng(pixel: {
|
|
371
|
+
x: number;
|
|
372
|
+
y: number;
|
|
373
|
+
}, zoom: number): LatLng | null;
|
|
374
|
+
/**
|
|
375
|
+
* 批量地理围栏检测
|
|
376
|
+
* @param point 待检测点
|
|
377
|
+
* @param polygons 多边形集合 (支持嵌套)
|
|
378
|
+
* @returns 包含该点的多边形索引,若不在任何多边形内返回 -1
|
|
379
|
+
*/
|
|
380
|
+
findPointInPolygons(point: LatLngPoint, polygons: LatLngPoint[][] | LatLngPoint[][][]): number;
|
|
381
|
+
/**
|
|
382
|
+
* 生成热力图网格数据 (C++ 加速)
|
|
383
|
+
* @param points 点集,包含权重
|
|
384
|
+
* @param gridSizeMeters 网格大小(米)
|
|
385
|
+
* @returns 聚合后的网格点
|
|
386
|
+
*/
|
|
387
|
+
generateHeatmapGrid(points: Array<LatLngPoint & {
|
|
388
|
+
weight?: number;
|
|
389
|
+
}>, gridSizeMeters: number): Array<{
|
|
390
|
+
latitude: number;
|
|
391
|
+
longitude: number;
|
|
392
|
+
intensity: number;
|
|
393
|
+
}>;
|
|
394
|
+
}
|
|
395
|
+
//# sourceMappingURL=native-module.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-module.types.d.ts","sourceRoot":"","sources":["../../../../src/map/types/native-module.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IAChF;;OAEG;IACH,WAAW,CAAC,CAAC,SAAS,MAAM,wBAAwB,EAClD,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACpC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC1B,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GACrC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAG1B;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAE5B;;OAEG;IACH,gBAAgB,IAAI,aAAa,CAAC;IAElC;;;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IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE5E;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;IAE/F;;;;;OAKG;IACH,mBAAmB,CACjB,MAAM,EAAE,KAAK,CAAC,WAAW,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAChD,cAAc,EAAE,MAAM,GACrB,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-module.types.js","sourceRoot":"","sources":["../../../../src/map/types/native-module.types.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * 高德地图原生模块类型定义\n */\n\nimport type { NativeModule } from 'expo';\n\nimport type {\n LatLng,\n PrivacyConfig,\n PrivacyStatus,\n SDKConfig,\n PermissionStatus,\n LatLngPoint,\n} from './common.types';\nimport type {\n CoordinateType,\n Coordinates,\n ReGeocode,\n LocationMode,\n LocationAccuracy,\n LocationListener,\n} from './location.types';\nimport type { ExpoGaodeMapModuleEvents } from './map-view.types';\n\nexport interface ExpoGaodeMapModule extends NativeModule<ExpoGaodeMapModuleEvents> {\n /**\n * 原生事件订阅方法\n */\n addListener<K extends keyof ExpoGaodeMapModuleEvents>(\n eventName: K,\n listener: ExpoGaodeMapModuleEvents[K],\n ): { remove: () => void };\n addListener(\n eventName: string,\n listener: (...args: unknown[]) => void,\n ): { remove: () => void };\n\n\n /**\n * 初始化高德地图 SDK\n * @param config SDK 配置参数,包含 Android 和 iOS 的 API Key\n */\n initSDK(config: SDKConfig): void;\n\n /**\n * 一次性同步完整隐私状态\n */\n setPrivacyConfig(config: PrivacyConfig): void;\n\n /**\n * 设置当前隐私协议版本,用于在协议变更时使旧同意失效\n */\n setPrivacyVersion(version: string): void;\n\n /**\n * 清空已持久化的隐私同意状态\n */\n resetPrivacyConsent(): void;\n\n /**\n * 获取当前隐私政策状态\n */\n getPrivacyStatus(): PrivacyStatus;\n\n /**\n * 设置是否加载世界向量地图(海外地图)\n * 必须在地图初始化之前调用\n * 世界地图为高级服务,需要开通相关权限\n */\n setLoadWorldVectorMap(enabled: boolean): void;\n\n /**\n * 获取高德地图 SDK 版本号\n * @returns SDK 版本字符串\n */\n getVersion(): string;\n\n /**\n * 开始连续定位\n * 启动后会持续接收位置更新,通过 onLocationUpdate 事件回调\n */\n start(): void;\n\n /**\n * 停止定位\n * 停止接收位置更新\n */\n stop(): void;\n\n /**\n * 检查是否正在定位\n * @returns 是否正在定位\n */\n isStarted(): Promise<boolean>;\n\n /**\n * 获取当前位置(单次定位)\n * @returns 位置信息,包含坐标和可选的逆地理编码信息\n */\n getCurrentLocation(): Promise<Coordinates | ReGeocode>;\n\n /**\n * 坐标转换\n * 将其他坐标系的坐标转换为高德地图使用的 GCJ-02 坐标系\n * @param coordinate 需要转换的坐标\n * @param type 原坐标系类型\n */\n coordinateConvert(coordinate: LatLngPoint, type: CoordinateType): Promise<LatLng>;\n\n\n /**\n * 设置是否返回逆地理编码信息\n * @param isReGeocode true: 返回地址信息; false: 只返回坐标\n */\n setLocatingWithReGeocode(isReGeocode: boolean): void;\n\n /**\n * 设置定位模式(Android)\n * @param mode 定位模式:高精度/低功耗/仅设备\n */\n setLocationMode(mode: LocationMode): void;\n\n /**\n * 设置定位间隔(毫秒)\n * @param interval 定位间隔时间,单位毫秒,默认 2000ms\n */\n setInterval(interval: number): void;\n\n /**\n * 设置是否单次定位(Android)\n * @param isOnceLocation true: 单次定位; false: 连续定位\n */\n setOnceLocation(isOnceLocation: boolean): void;\n\n /**\n * 设置是否使用设备传感器(Android)\n * @param sensorEnable true: 使用传感器; false: 不使用\n */\n setSensorEnable(sensorEnable: boolean): void;\n\n /**\n * 设置是否允许 WiFi 扫描(Android)\n * @param wifiScan true: 允许; false: 不允许\n */\n setWifiScan(wifiScan: boolean): void;\n\n /**\n * 设置是否 GPS 优先(Android)\n * @param gpsFirst true: GPS 优先; false: 网络优先\n */\n setGpsFirst(gpsFirst: boolean): void;\n\n /**\n * 设置是否允许返回模拟位置(Android)\n * @param mockEnable true: 允许; false: 不允许\n */\n setMockEnable(mockEnable: boolean): void;\n\n /**\n * 设置是否等待 WiFi 列表刷新(Android)\n * @param onceLocationLatest true: 等待; false: 不等待\n */\n setOnceLocationLatest(onceLocationLatest: boolean): void;\n\n /**\n * 设置逆地理编码语言\n * @param language 语言代码,如 \"zh-CN\", \"en\"\n */\n setGeoLanguage(language: string): void;\n\n /**\n * 设置是否使用缓存策略(Android)\n * @param locationCacheEnable true: 使用缓存; false: 不使用\n */\n setLocationCacheEnable(locationCacheEnable: boolean): void;\n\n /**\n * 设置网络请求超时时间(Android)\n * @param httpTimeOut 超时时间,单位毫秒\n */\n setHttpTimeOut(httpTimeOut: number): void;\n\n /**\n * 设置期望的定位精度(iOS)\n * @param accuracy 精度级别:最佳/10米/100米/1公里/3公里\n */\n setDesiredAccuracy(accuracy: LocationAccuracy): void;\n\n /**\n * 设置定位超时时间(秒)\n * @param timeout 超时时间,单位秒,默认 10 秒\n */\n setLocationTimeout(timeout: number): void;\n\n /**\n * 设置逆地理编码超时时间(秒)\n * @param timeout 超时时间,单位秒,默认 5 秒\n */\n setReGeocodeTimeout(timeout: number): void;\n\n /**\n * 设置距离过滤器(米)(iOS)\n * 只有移动超过指定距离才会更新位置\n * @param distance 距离阈值,单位米\n */\n setDistanceFilter(distance: number): void;\n\n /**\n * 设置是否自动暂停位置更新(iOS)\n * @param pauses true: 自动暂停; false: 不暂停\n */\n setPausesLocationUpdatesAutomatically(pauses: boolean): void;\n\n /**\n * 设置是否允许后台定位(iOS)\n * @param allows true: 允许; false: 不允许\n */\n setAllowsBackgroundLocationUpdates(allows: boolean): void;\n\n /**\n * iOS 是否已启用后台定位配置\n */\n readonly isBackgroundLocationEnabled: boolean;\n\n /**\n * 设置定位协议\n * @param protocol 协议类型\n */\n setLocationProtocol(protocol: string): void;\n\n /**\n * 开始更新设备方向(罗盘朝向)(iOS)\n */\n startUpdatingHeading(): void;\n\n /**\n * 停止更新设备方向(iOS)\n */\n stopUpdatingHeading(): void;\n\n /**\n * 检查前台位置权限状态(增强版)\n * @returns 详细的权限状态信息\n */\n checkLocationPermission(): Promise<PermissionStatus>;\n\n /**\n * 请求前台位置权限(增强版)\n * @returns 请求后的权限状态\n */\n requestLocationPermission(): Promise<PermissionStatus>;\n\n /**\n * 请求后台位置权限(Android 10+、iOS)\n * 注意:必须在前台权限已授予后才能请求\n * @returns 请求后的权限状态\n */\n requestBackgroundLocationPermission(): Promise<PermissionStatus>;\n\n /**\n * 打开应用设置页面\n * 引导用户手动授予权限(当权限被永久拒绝时使用)\n */\n openAppSettings(): void;\n\n /**\n * 检查原生 SDK 是否已配置 API Key\n * @returns 是否已配置\n */\n isNativeSDKConfigured(): boolean;\n\n /**\n * 添加定位监听器(便捷方法)\n * 封装原生事件订阅,返回带 remove 的订阅对象\n */\n addLocationListener(listener: LocationListener): { remove: () => void };\n\n /**\n * 计算两个坐标点之间的距离\n * @param coordinate1 第一个坐标点\n * @param coordinate2 第二个坐标点\n * @returns 两点之间的距离(单位:米)\n */\n distanceBetweenCoordinates(coordinate1: LatLngPoint, coordinate2: LatLngPoint): number;\n\n /**\n * 根据多个坐标点计算可同时可见的推荐缩放级别\n * @param points 坐标点集合(至少 1 个)\n * @param viewportWidthPx 视口宽度(像素)\n * @param viewportHeightPx 视口高度(像素)\n * @param paddingPx 内边距(像素)\n * @param minZoom 最小缩放\n * @param maxZoom 最大缩放\n */\n calculateFitZoom(\n points: LatLngPoint[],\n viewportWidthPx: number,\n viewportHeightPx: number,\n paddingPx: number,\n minZoom: number,\n maxZoom: number\n ): number;\n\n // ==================== 几何计算 ====================\n\n /**\n * 判断点是否在圆内\n * @param point 要判断的点\n * @param center 圆心坐标\n * @param radius 圆半径(单位:米)\n * @returns 是否在圆内\n */\n isPointInCircle(point: LatLngPoint, center: LatLngPoint, radius: number): boolean;\n\n /**\n * 判断点是否在多边形内\n * @param point 要判断的点\n * @param polygon 多边形的顶点坐标数组,支持嵌套数组(多边形空洞)\n * @returns 是否在多边形内\n */\n isPointInPolygon(point: LatLngPoint, polygon: LatLngPoint[] | LatLngPoint[][]): boolean;\n\n /**\n * 计算多边形面积\n * @param polygon 多边形的顶点坐标数组,支持嵌套数组(多边形空洞,会自动展平计算)\n * @returns 面积(单位:平方米)\n */\n calculatePolygonArea(polygon: LatLngPoint[] | LatLngPoint[][]): number;\n\n /**\n * 计算矩形面积\n * @param southWest 西南角坐标\n * @param northEast 东北角坐标\n * @returns 面积(单位:平方米)\n */\n calculateRectangleArea(southWest: LatLngPoint, northEast: LatLngPoint): number;\n\n /**\n * 获取路径上距离目标点最近的点\n * @param path 路径点集合\n * @param target 目标点\n * @returns 最近点信息,包含坐标、索引和距离\n */\n getNearestPointOnPath(path: LatLngPoint[], target: LatLngPoint): {\n latitude: number;\n longitude: number;\n index: number;\n distanceMeters: number;\n } | null;\n\n /**\n * 计算多边形质心\n * @param polygon 多边形顶点坐标数组,支持嵌套数组\n * @returns 质心坐标\n */\n calculateCentroid(polygon: LatLngPoint[] | LatLngPoint[][]): LatLng | null;\n\n /**\n * 计算路径边界和中心点\n * @param points 路径点\n * @returns 边界和中心点\n */\n calculatePathBounds(points: LatLngPoint[]): {\n north: number;\n south: number;\n east: number;\n west: number;\n center: LatLngPoint;\n } | null;\n\n /**\n * GeoHash 编码\n * @param coordinate 坐标点\n * @param precision 精度 (1-12)\n * @returns GeoHash 字符串\n */\n encodeGeoHash(coordinate: LatLngPoint, precision: number): string;\n\n /**\n * 轨迹抽稀 (RDP 算法)\n * @param points 原始轨迹点\n * @param tolerance 允许误差(米)\n * @returns 简化后的轨迹点\n */\n simplifyPolyline(points: LatLngPoint[], tolerance: number): LatLng[];\n\n /**\n * 计算路径总长度\n * @param points 路径点\n * @returns 长度(米)\n */\n calculatePathLength(points: LatLngPoint[]): number;\n\n /**\n * 解析高德地图 API 返回的 Polyline 字符串\n * 格式: \"lng,lat;lng,lat;...\"\n * @param polylineStr 高德原始 polyline 字符串,或包含 polyline 属性的对象\n * @returns 解析后的点集\n */\n parsePolyline(polylineStr: string | { polyline: string }): LatLng[];\n\n /**\n * 获取路径上指定距离的点\n * @param points 路径点\n * @param distance 距离起点的米数\n * @returns 点信息(坐标+角度)\n */\n getPointAtDistance(points: LatLngPoint[], distance: number): {\n latitude: number;\n longitude: number;\n angle: number;\n } | null;\n\n /**\n * 瓦片坐标转换:经纬度 -> 瓦片坐标\n * @param coordinate 坐标点\n * @param zoom 缩放级别\n * @returns 瓦片坐标 (x, y, z)\n */\n latLngToTile(coordinate: LatLngPoint, zoom: number): { x: number; y: number; z: number } | null;\n\n /**\n * 瓦片坐标转换:瓦片坐标 -> 经纬度\n * @param tile 瓦片坐标 (x, y, z)\n * @returns 经纬度\n */\n tileToLatLng(tile: { x: number; y: number; z: number }): LatLng | null;\n\n /**\n * 像素坐标转换:经纬度 -> 像素坐标\n * @param coordinate 坐标点\n * @param zoom 缩放级别\n * @returns 像素坐标 (x, y)\n */\n latLngToPixel(coordinate: LatLngPoint, zoom: number): { x: number; y: number } | null;\n\n /**\n * 像素坐标转换:像素坐标 -> 经纬度\n * @param pixel 像素坐标 (x, y)\n * @param zoom 缩放级别\n * @returns 经纬度\n */\n pixelToLatLng(pixel: { x: number; y: number }, zoom: number): LatLng | null;\n\n /**\n * 批量地理围栏检测\n * @param point 待检测点\n * @param polygons 多边形集合 (支持嵌套)\n * @returns 包含该点的多边形索引,若不在任何多边形内返回 -1\n */\n findPointInPolygons(point: LatLngPoint, polygons: LatLngPoint[][] | LatLngPoint[][][]): number;\n\n /**\n * 生成热力图网格数据 (C++ 加速)\n * @param points 点集,包含权重\n * @param gridSizeMeters 网格大小(米)\n * @returns 聚合后的网格点\n */\n generateHeatmapGrid(\n points: Array<LatLngPoint & { weight?: number }>,\n gridSizeMeters: number\n ): Array<{ latitude: number; longitude: number; intensity: number }>;\n}\n"]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 高德地图离线地图类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 离线地图下载状态
|
|
6
|
+
*/
|
|
7
|
+
export type OfflineMapStatus = 'not_downloaded' | 'downloading' | 'downloaded' | 'paused' | 'failed' | 'updating' | 'unzipping';
|
|
8
|
+
/**
|
|
9
|
+
* 离线地图信息
|
|
10
|
+
*/
|
|
11
|
+
export interface OfflineMapInfo {
|
|
12
|
+
/** 城市代码 */
|
|
13
|
+
cityCode: string;
|
|
14
|
+
/** 城市名称 */
|
|
15
|
+
cityName: string;
|
|
16
|
+
/** 地图大小(字节) */
|
|
17
|
+
size: number;
|
|
18
|
+
/** 下载状态 */
|
|
19
|
+
status: OfflineMapStatus;
|
|
20
|
+
/** 下载进度 (0-100) */
|
|
21
|
+
progress: number;
|
|
22
|
+
/** 版本号 */
|
|
23
|
+
version: string;
|
|
24
|
+
/** 是否有更新 */
|
|
25
|
+
hasUpdate?: boolean;
|
|
26
|
+
/** 省份名称 */
|
|
27
|
+
provinceName?: string;
|
|
28
|
+
/** 省份代码 */
|
|
29
|
+
provinceCode?: string;
|
|
30
|
+
/** 已下载大小(字节) */
|
|
31
|
+
downloadedSize?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 离线地图下载配置
|
|
35
|
+
*/
|
|
36
|
+
export interface OfflineMapDownloadConfig {
|
|
37
|
+
/** 城市代码 */
|
|
38
|
+
cityCode: string;
|
|
39
|
+
/** 是否允许移动网络下载 @default false */
|
|
40
|
+
allowCellular?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 离线地图下载进度事件
|
|
44
|
+
*/
|
|
45
|
+
export interface OfflineMapDownloadEvent {
|
|
46
|
+
/** 城市代码 */
|
|
47
|
+
cityCode: string;
|
|
48
|
+
/** 城市名称 */
|
|
49
|
+
cityName: string;
|
|
50
|
+
/** 下载进度 (0-100) */
|
|
51
|
+
progress: number;
|
|
52
|
+
/** 已下载大小(字节) */
|
|
53
|
+
downloadedSize: number;
|
|
54
|
+
/** 总大小(字节) */
|
|
55
|
+
totalSize: number;
|
|
56
|
+
/** 下载状态 */
|
|
57
|
+
status: OfflineMapStatus;
|
|
58
|
+
/** 当前状态描述 */
|
|
59
|
+
statusMessage?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 离线地图完成事件
|
|
63
|
+
*/
|
|
64
|
+
export interface OfflineMapCompleteEvent {
|
|
65
|
+
/** 城市代码 */
|
|
66
|
+
cityCode: string;
|
|
67
|
+
/** 城市名称 */
|
|
68
|
+
cityName: string;
|
|
69
|
+
/** 是否成功 */
|
|
70
|
+
success: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 离线地图暂停事件
|
|
74
|
+
*/
|
|
75
|
+
export interface OfflineMapPausedEvent {
|
|
76
|
+
/** 城市代码 */
|
|
77
|
+
cityCode: string;
|
|
78
|
+
/** 城市名称 */
|
|
79
|
+
cityName: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 离线地图取消事件
|
|
83
|
+
*/
|
|
84
|
+
export interface OfflineMapCancelledEvent {
|
|
85
|
+
/** 城市代码 */
|
|
86
|
+
cityCode: string;
|
|
87
|
+
/** 城市名称 */
|
|
88
|
+
cityName: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 离线地图错误事件
|
|
92
|
+
*/
|
|
93
|
+
export interface OfflineMapErrorEvent {
|
|
94
|
+
/** 城市代码 */
|
|
95
|
+
cityCode: string;
|
|
96
|
+
/** 城市名称 */
|
|
97
|
+
cityName: string;
|
|
98
|
+
/** 错误信息 */
|
|
99
|
+
error: string;
|
|
100
|
+
/** 错误代码 */
|
|
101
|
+
errorCode?: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 离线地图存储信息
|
|
105
|
+
*/
|
|
106
|
+
export interface OfflineMapStorageInfo {
|
|
107
|
+
/** 总存储空间(字节) */
|
|
108
|
+
totalSpace: number;
|
|
109
|
+
/** 已使用空间(字节) */
|
|
110
|
+
usedSpace: number;
|
|
111
|
+
/** 可用空间(字节) */
|
|
112
|
+
availableSpace: number;
|
|
113
|
+
/** 离线地图占用空间(字节) */
|
|
114
|
+
offlineMapSize: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 离线地图事件类型
|
|
118
|
+
*/
|
|
119
|
+
export type OfflineMapEvents = {
|
|
120
|
+
/** 下载进度更新 */
|
|
121
|
+
onDownloadProgress: (event: OfflineMapDownloadEvent) => void;
|
|
122
|
+
/** 下载完成 */
|
|
123
|
+
onDownloadComplete: (event: OfflineMapCompleteEvent) => void;
|
|
124
|
+
/** 下载错误 */
|
|
125
|
+
onDownloadError: (event: OfflineMapErrorEvent) => void;
|
|
126
|
+
/** 解压进度更新 */
|
|
127
|
+
onUnzipProgress: (event: OfflineMapDownloadEvent) => void;
|
|
128
|
+
/** 下载暂停 */
|
|
129
|
+
onDownloadPaused: (event: OfflineMapPausedEvent) => void;
|
|
130
|
+
/** 下载取消 */
|
|
131
|
+
onDownloadCancelled: (event: OfflineMapCancelledEvent) => void;
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=offline.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline.types.d.ts","sourceRoot":"","sources":["../../../../src/map/types/offline.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,WAAW,CAAC;AAEhB;;GAEG;AACH,MAAM,WAAW,cAAc;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EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,WAAW;IACX,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,WAAW;IACX,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW;IACX,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gBAAgB;IAChB,UAAU,EAAE,MAAM,CAAC;IAEnB,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAC;IAElB,eAAe;IACf,cAAc,EAAE,MAAM,CAAC;IAEvB,mBAAmB;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa;IACb,kBAAkB,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAE7D,WAAW;IACX,kBAAkB,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAE7D,WAAW;IACX,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEvD,aAAa;IACb,eAAe,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAE1D,WAAW;IACX,gBAAgB,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAEzD,WAAW;IACX,mBAAmB,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAChE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline.types.js","sourceRoot":"","sources":["../../../../src/map/types/offline.types.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * 高德地图离线地图类型定义\n */\n\n/**\n * 离线地图下载状态\n */\nexport type OfflineMapStatus = \n | 'not_downloaded' // 未下载\n | 'downloading' // 下载中\n | 'downloaded' // 已下载\n | 'paused' // 已暂停\n | 'failed' // 下载失败\n | 'updating' // 更新中\n | 'unzipping'; // 解压中\n\n/**\n * 离线地图信息\n */\nexport interface OfflineMapInfo {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n \n /** 地图大小(字节) */\n size: number;\n \n /** 下载状态 */\n status: OfflineMapStatus;\n \n /** 下载进度 (0-100) */\n progress: number;\n \n /** 版本号 */\n version: string;\n \n /** 是否有更新 */\n hasUpdate?: boolean;\n \n /** 省份名称 */\n provinceName?: string;\n \n /** 省份代码 */\n provinceCode?: string;\n \n /** 已下载大小(字节) */\n downloadedSize?: number;\n}\n\n/**\n * 离线地图下载配置\n */\nexport interface OfflineMapDownloadConfig {\n /** 城市代码 */\n cityCode: string;\n \n /** 是否允许移动网络下载 @default false */\n allowCellular?: boolean;\n}\n\n/**\n * 离线地图下载进度事件\n */\nexport interface OfflineMapDownloadEvent {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n \n /** 下载进度 (0-100) */\n progress: number;\n \n /** 已下载大小(字节) */\n downloadedSize: number;\n \n /** 总大小(字节) */\n totalSize: number;\n \n /** 下载状态 */\n status: OfflineMapStatus;\n \n /** 当前状态描述 */\n statusMessage?: string;\n}\n\n/**\n * 离线地图完成事件\n */\nexport interface OfflineMapCompleteEvent {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n \n /** 是否成功 */\n success: boolean;\n}\n\n/**\n * 离线地图暂停事件\n */\nexport interface OfflineMapPausedEvent {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n}\n\n/**\n * 离线地图取消事件\n */\nexport interface OfflineMapCancelledEvent {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n}\n\n/**\n * 离线地图错误事件\n */\nexport interface OfflineMapErrorEvent {\n /** 城市代码 */\n cityCode: string;\n \n /** 城市名称 */\n cityName: string;\n \n /** 错误信息 */\n error: string;\n \n /** 错误代码 */\n errorCode?: number;\n}\n\n/**\n * 离线地图存储信息\n */\nexport interface OfflineMapStorageInfo {\n /** 总存储空间(字节) */\n totalSpace: number;\n \n /** 已使用空间(字节) */\n usedSpace: number;\n \n /** 可用空间(字节) */\n availableSpace: number;\n \n /** 离线地图占用空间(字节) */\n offlineMapSize: number;\n}\n\n/**\n * 离线地图事件类型\n */\nexport type OfflineMapEvents = {\n /** 下载进度更新 */\n onDownloadProgress: (event: OfflineMapDownloadEvent) => void;\n \n /** 下载完成 */\n onDownloadComplete: (event: OfflineMapCompleteEvent) => void;\n \n /** 下载错误 */\n onDownloadError: (event: OfflineMapErrorEvent) => void;\n \n /** 解压进度更新 */\n onUnzipProgress: (event: OfflineMapDownloadEvent) => void;\n \n /** 下载暂停 */\n onDownloadPaused: (event: OfflineMapPausedEvent) => void;\n \n /** 下载取消 */\n onDownloadCancelled: (event: OfflineMapCancelledEvent) => void;\n};"]}
|