expo-gaode-map 1.0.1 → 1.0.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 (81) hide show
  1. package/build/ExpoGaodeMap.types.d.ts.map +1 -1
  2. package/build/ExpoGaodeMap.types.js +0 -10
  3. package/build/ExpoGaodeMap.types.js.map +1 -1
  4. package/build/ExpoGaodeMapModule.d.ts.map +1 -1
  5. package/build/ExpoGaodeMapModule.js +0 -10
  6. package/build/ExpoGaodeMapModule.js.map +1 -1
  7. package/build/ExpoGaodeMapView.d.ts +13 -19
  8. package/build/ExpoGaodeMapView.d.ts.map +1 -1
  9. package/build/ExpoGaodeMapView.js +133 -30
  10. package/build/ExpoGaodeMapView.js.map +1 -1
  11. package/build/components/overlays/Circle.d.ts +17 -12
  12. package/build/components/overlays/Circle.d.ts.map +1 -1
  13. package/build/components/overlays/Circle.js +22 -23
  14. package/build/components/overlays/Circle.js.map +1 -1
  15. package/build/components/overlays/Cluster.d.ts +3 -15
  16. package/build/components/overlays/Cluster.d.ts.map +1 -1
  17. package/build/components/overlays/Cluster.js +3 -25
  18. package/build/components/overlays/Cluster.js.map +1 -1
  19. package/build/components/overlays/HeatMap.d.ts +3 -14
  20. package/build/components/overlays/HeatMap.d.ts.map +1 -1
  21. package/build/components/overlays/HeatMap.js +3 -24
  22. package/build/components/overlays/HeatMap.js.map +1 -1
  23. package/build/components/overlays/Marker.d.ts +12 -11
  24. package/build/components/overlays/Marker.d.ts.map +1 -1
  25. package/build/components/overlays/Marker.js +12 -21
  26. package/build/components/overlays/Marker.js.map +1 -1
  27. package/build/components/overlays/MultiPoint.d.ts +3 -14
  28. package/build/components/overlays/MultiPoint.d.ts.map +1 -1
  29. package/build/components/overlays/MultiPoint.js +3 -24
  30. package/build/components/overlays/MultiPoint.js.map +1 -1
  31. package/build/components/overlays/Polygon.d.ts +13 -16
  32. package/build/components/overlays/Polygon.d.ts.map +1 -1
  33. package/build/components/overlays/Polygon.js +13 -26
  34. package/build/components/overlays/Polygon.js.map +1 -1
  35. package/build/components/overlays/Polyline.d.ts +12 -14
  36. package/build/components/overlays/Polyline.d.ts.map +1 -1
  37. package/build/components/overlays/Polyline.js +12 -24
  38. package/build/components/overlays/Polyline.js.map +1 -1
  39. package/build/components/overlays/index.d.ts.map +1 -1
  40. package/build/components/overlays/index.js +0 -10
  41. package/build/components/overlays/index.js.map +1 -1
  42. package/build/index.d.ts.map +1 -1
  43. package/build/index.js +0 -10
  44. package/build/index.js.map +1 -1
  45. package/build/modules/AMapLocation.d.ts +47 -10
  46. package/build/modules/AMapLocation.d.ts.map +1 -1
  47. package/build/modules/AMapLocation.js +48 -20
  48. package/build/modules/AMapLocation.js.map +1 -1
  49. package/build/modules/AMapPermissions.d.ts +3 -1
  50. package/build/modules/AMapPermissions.d.ts.map +1 -1
  51. package/build/modules/AMapPermissions.js +3 -11
  52. package/build/modules/AMapPermissions.js.map +1 -1
  53. package/build/modules/AMapSDK.d.ts +5 -4
  54. package/build/modules/AMapSDK.d.ts.map +1 -1
  55. package/build/modules/AMapSDK.js +5 -14
  56. package/build/modules/AMapSDK.js.map +1 -1
  57. package/build/modules/AMapView.d.ts.map +1 -1
  58. package/build/modules/AMapView.js +0 -8
  59. package/build/modules/AMapView.js.map +1 -1
  60. package/build/types/index.d.ts.map +1 -1
  61. package/build/types/index.js +0 -10
  62. package/build/types/index.js.map +1 -1
  63. package/docs/RELEASE_GUIDE.md +178 -0
  64. package/package.json +1 -1
  65. package/src/ExpoGaodeMap.types.ts +1 -10
  66. package/src/ExpoGaodeMapModule.ts +1 -10
  67. package/src/ExpoGaodeMapView.tsx +139 -37
  68. package/src/components/overlays/Circle.tsx +24 -25
  69. package/src/components/overlays/Cluster.tsx +4 -26
  70. package/src/components/overlays/HeatMap.tsx +4 -25
  71. package/src/components/overlays/Marker.tsx +12 -22
  72. package/src/components/overlays/MultiPoint.tsx +4 -25
  73. package/src/components/overlays/Polygon.tsx +14 -28
  74. package/src/components/overlays/Polyline.tsx +13 -25
  75. package/src/components/overlays/index.ts +0 -11
  76. package/src/index.ts +0 -11
  77. package/src/modules/AMapLocation.ts +56 -20
  78. package/src/modules/AMapPermissions.ts +4 -11
  79. package/src/modules/AMapSDK.ts +7 -14
  80. package/src/modules/AMapView.ts +0 -8
  81. package/src/types/index.ts +1 -10
@@ -1 +1 @@
1
- {"version":3,"file":"Cluster.js","sourceRoot":"","sources":["../../../src/components/overlays/Cluster.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,aAAa,GAAG,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACtC,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:02:50\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 18:19:20\n * @FilePath : /expo-gaode-map/src/components/overlays/Cluster.tsx\n * @Description : 地图点聚合组件\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nimport { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { ClusterProps } from '../../types';\n\nconst NativeCluster = requireNativeViewManager('ExpoGaodeMap_ClusterView');\n\n/**\n * 地图点聚合组件\n * 将相近的标记点聚合显示,提高大量标记的展示性能\n * \n * @example\n * ```tsx\n * <MapView>\n * <Cluster\n * points={[\n * { latitude: 39.9, longitude: 116.4, id: '1' },\n * { latitude: 39.91, longitude: 116.41, id: '2' },\n * ]}\n * radius={60}\n * minClusterSize={2}\n * />\n * </MapView>\n * ```\n */\nexport default function Cluster(props: ClusterProps) {\n return <NativeCluster {...props} />;\n}\n"]}
1
+ {"version":3,"file":"Cluster.js","sourceRoot":"","sources":["../../../src/components/overlays/Cluster.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,aAAa,GAAG,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACtC,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { ClusterProps } from '../../types';\n\nconst NativeCluster = requireNativeViewManager('ExpoGaodeMap_ClusterView');\n\n\n/**\n * 高德地图点聚合组件\n * \n * @param props 点聚合组件的属性配置\n * @returns 渲染原生点聚合组件\n */\nexport default function Cluster(props: ClusterProps) {\n return <NativeCluster {...props} />;\n}\n"]}
@@ -1,21 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import type { HeatMapProps } from '../../types';
3
3
  /**
4
- * 地图热力图组件
4
+ * 高德地图热力图组件
5
5
  *
6
- * @example
7
- * ```tsx
8
- * <MapView>
9
- * <HeatMap
10
- * data={[
11
- * { latitude: 39.9, longitude: 116.4, intensity: 100 },
12
- * { latitude: 39.91, longitude: 116.41, intensity: 80 },
13
- * ]}
14
- * radius={50}
15
- * opacity={0.6}
16
- * />
17
- * </MapView>
18
- * ```
6
+ * @param props - 热力图配置属性,继承自NativeHeatMap组件的属性
7
+ * @returns 渲染高德地图原生热力图组件
19
8
  */
20
9
  export default function HeatMap(props: HeatMapProps): React.JSX.Element;
21
10
  //# sourceMappingURL=HeatMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeatMap.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/HeatMap.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,qBAElD"}
1
+ {"version":3,"file":"HeatMap.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/HeatMap.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,qBAElD"}
@@ -1,32 +1,11 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:02:15
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-13 18:12:07
6
- * @FilePath : /expo-gaode-map/src/components/overlays/HeatMap.tsx
7
- * @Description : 地图热力图组件
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  import { requireNativeViewManager } from 'expo-modules-core';
12
2
  import * as React from 'react';
13
3
  const NativeHeatMap = requireNativeViewManager('ExpoGaodeMap_HeatMapView');
14
4
  /**
15
- * 地图热力图组件
5
+ * 高德地图热力图组件
16
6
  *
17
- * @example
18
- * ```tsx
19
- * <MapView>
20
- * <HeatMap
21
- * data={[
22
- * { latitude: 39.9, longitude: 116.4, intensity: 100 },
23
- * { latitude: 39.91, longitude: 116.41, intensity: 80 },
24
- * ]}
25
- * radius={50}
26
- * opacity={0.6}
27
- * />
28
- * </MapView>
29
- * ```
7
+ * @param props - 热力图配置属性,继承自NativeHeatMap组件的属性
8
+ * @returns 渲染高德地图原生热力图组件
30
9
  */
31
10
  export default function HeatMap(props) {
32
11
  return <NativeHeatMap {...props}/>;
@@ -1 +1 @@
1
- {"version":3,"file":"HeatMap.js","sourceRoot":"","sources":["../../../src/components/overlays/HeatMap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,aAAa,GAAG,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACtC,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:02:15\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 18:12:07\n * @FilePath : /expo-gaode-map/src/components/overlays/HeatMap.tsx\n * @Description : 地图热力图组件\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nimport { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { HeatMapProps } from '../../types';\n\nconst NativeHeatMap = requireNativeViewManager('ExpoGaodeMap_HeatMapView');\n\n/**\n * 地图热力图组件\n * \n * @example\n * ```tsx\n * <MapView>\n * <HeatMap\n * data={[\n * { latitude: 39.9, longitude: 116.4, intensity: 100 },\n * { latitude: 39.91, longitude: 116.41, intensity: 80 },\n * ]}\n * radius={50}\n * opacity={0.6}\n * />\n * </MapView>\n * ```\n */\nexport default function HeatMap(props: HeatMapProps) {\n return <NativeHeatMap {...props} />;\n}\n"]}
1
+ {"version":3,"file":"HeatMap.js","sourceRoot":"","sources":["../../../src/components/overlays/HeatMap.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,aAAa,GAAG,wBAAwB,CAAC,0BAA0B,CAAC,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACtC,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { HeatMapProps } from '../../types';\n\nconst NativeHeatMap = requireNativeViewManager('ExpoGaodeMap_HeatMapView');\n\n\n/**\n * 高德地图热力图组件\n * \n * @param props - 热力图配置属性,继承自NativeHeatMap组件的属性\n * @returns 渲染高德地图原生热力图组件\n */\nexport default function HeatMap(props: HeatMapProps) {\n return <NativeHeatMap {...props} />;\n}\n"]}
@@ -1,17 +1,18 @@
1
1
  import type { MarkerProps } from '../../types';
2
2
  /**
3
- * 地图标记组件
3
+ * Marker 组件 - 用于在地图上显示标记点
4
4
  *
5
- * @example
6
- * ```tsx
7
- * <MapView>
8
- * <Marker
9
- * position={{ latitude: 39.9, longitude: 116.4 }}
10
- * title="标记点"
11
- * onPress={() => console.log('Marker pressed')}
12
- * />
13
- * </MapView>
14
- * ```
5
+ * @param props - 标记点属性配置
6
+ * @param props.position - 标记点坐标 [经度, 纬度]
7
+ * @param props.title - 标记点标题
8
+ * @param props.draggable - 标记点是否可拖动
9
+ *
10
+ * @remarks
11
+ * 组件内部会自动处理标记点的添加、更新和移除
12
+ * 当组件卸载时会自动移除对应的地图标记
13
+ *
14
+ * @note
15
+ * 组件本身不渲染任何DOM元素,仅作为地图标记的逻辑容器
15
16
  */
16
17
  export default function Marker(props: MarkerProps): null;
17
18
  //# sourceMappingURL=Marker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Marker.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,QAoChD"}
1
+ {"version":3,"file":"Marker.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Marker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,QAoChD"}
@@ -1,28 +1,19 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:01:10
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-13 18:55:00
6
- * @FilePath : /expo-gaode-map/src/components/overlays/Marker.tsx
7
- * @Description : 地图标记组件 - 使用命令式 API
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  import * as React from 'react';
12
2
  import { MapContext } from '../../ExpoGaodeMapView';
13
3
  /**
14
- * 地图标记组件
4
+ * Marker 组件 - 用于在地图上显示标记点
5
+ *
6
+ * @param props - 标记点属性配置
7
+ * @param props.position - 标记点坐标 [经度, 纬度]
8
+ * @param props.title - 标记点标题
9
+ * @param props.draggable - 标记点是否可拖动
10
+ *
11
+ * @remarks
12
+ * 组件内部会自动处理标记点的添加、更新和移除
13
+ * 当组件卸载时会自动移除对应的地图标记
15
14
  *
16
- * @example
17
- * ```tsx
18
- * <MapView>
19
- * <Marker
20
- * position={{ latitude: 39.9, longitude: 116.4 }}
21
- * title="标记点"
22
- * onPress={() => console.log('Marker pressed')}
23
- * />
24
- * </MapView>
25
- * ```
15
+ * @note
16
+ * 组件本身不渲染任何DOM元素,仅作为地图标记的逻辑容器
26
17
  */
27
18
  export default function Marker(props) {
28
19
  const mapRef = React.useContext(MapContext);
@@ -1 +1 @@
1
- {"version":3,"file":"Marker.js","sourceRoot":"","sources":["../../../src/components/overlays/Marker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAS,UAAU,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAElF,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAEzC,OAAO;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QAC1C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACtD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;YAC/C,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;gBAC7D,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,mBAAmB;IACnB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;YACpE,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAEnD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:01:10\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 18:55:00\n * @FilePath : /expo-gaode-map/src/components/overlays/Marker.tsx\n * @Description : 地图标记组件 - 使用命令式 API\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nimport * as React from 'react';\nimport { MapContext } from '../../ExpoGaodeMapView';\nimport type { MarkerProps } from '../../types';\n\n/**\n * 地图标记组件\n * \n * @example\n * ```tsx\n * <MapView>\n * <Marker\n * position={{ latitude: 39.9, longitude: 116.4 }}\n * title=\"标记点\"\n * onPress={() => console.log('Marker pressed')}\n * />\n * </MapView>\n * ```\n */\nexport default function Marker(props: MarkerProps) {\n const mapRef = React.useContext(MapContext);\n const markerIdRef = React.useRef<string>(`marker_${Date.now()}_${Math.random()}`);\n\n console.log('Marker 组件渲染,props:', props);\n\n // 添加标记\n React.useEffect(() => {\n const markerId = markerIdRef.current;\n \n console.log('Marker useEffect - 添加标记到地图');\n mapRef?.current?.addMarker?.(markerId, props).then(() => {\n console.log('✅ 标记已添加:', markerId);\n }).catch((error: any) => {\n console.error('❌ 添加标记失败:', error);\n });\n\n return () => {\n console.log('Marker useEffect cleanup - 移除标记');\n mapRef?.current?.removeMarker?.(markerId).catch((error: any) => {\n console.error('❌ 移除标记失败:', error);\n });\n };\n }, []);\n\n // 监听 Props 变化,更新标记\n React.useEffect(() => {\n const markerId = markerIdRef.current;\n \n console.log('Marker props 变化,更新标记:', props);\n mapRef?.current?.updateMarker?.(markerId, props).catch((error: any) => {\n console.error('❌ 更新标记失败:', error);\n });\n }, [props.position, props.title, props.draggable]);\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"Marker.js","sourceRoot":"","sources":["../../../src/components/overlays/Marker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAS,UAAU,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAElF,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAEzC,OAAO;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QAC1C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACtD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;YAC/C,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;gBAC7D,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,mBAAmB;IACnB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;YACpE,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAEnD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import * as React from 'react';\nimport { MapContext } from '../../ExpoGaodeMapView';\nimport type { MarkerProps } from '../../types';\n\n/**\n * Marker 组件 - 用于在地图上显示标记点\n * \n * @param props - 标记点属性配置\n * @param props.position - 标记点坐标 [经度, 纬度]\n * @param props.title - 标记点标题\n * @param props.draggable - 标记点是否可拖动\n * \n * @remarks\n * 组件内部会自动处理标记点的添加、更新和移除\n * 当组件卸载时会自动移除对应的地图标记\n * \n * @note\n * 组件本身不渲染任何DOM元素,仅作为地图标记的逻辑容器\n */\nexport default function Marker(props: MarkerProps) {\n const mapRef = React.useContext(MapContext);\n const markerIdRef = React.useRef<string>(`marker_${Date.now()}_${Math.random()}`);\n\n console.log('Marker 组件渲染,props:', props);\n\n // 添加标记\n React.useEffect(() => {\n const markerId = markerIdRef.current;\n \n console.log('Marker useEffect - 添加标记到地图');\n mapRef?.current?.addMarker?.(markerId, props).then(() => {\n console.log('✅ 标记已添加:', markerId);\n }).catch((error: any) => {\n console.error('❌ 添加标记失败:', error);\n });\n\n return () => {\n console.log('Marker useEffect cleanup - 移除标记');\n mapRef?.current?.removeMarker?.(markerId).catch((error: any) => {\n console.error('❌ 移除标记失败:', error);\n });\n };\n }, []);\n\n // 监听 Props 变化,更新标记\n React.useEffect(() => {\n const markerId = markerIdRef.current;\n \n console.log('Marker props 变化,更新标记:', props);\n mapRef?.current?.updateMarker?.(markerId, props).catch((error: any) => {\n console.error('❌ 更新标记失败:', error);\n });\n }, [props.position, props.title, props.draggable]);\n\n return null;\n}\n"]}
@@ -1,21 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import type { MultiPointProps } from '../../types';
3
3
  /**
4
- * 地图海量点组件
5
- * 用于展示大量标记点,性能优于普通 Marker
4
+ * 高德地图多点标记组件
6
5
  *
7
- * @example
8
- * ```tsx
9
- * <MapView>
10
- * <MultiPoint
11
- * points={[
12
- * { latitude: 39.9, longitude: 116.4, id: '1' },
13
- * { latitude: 39.91, longitude: 116.41, id: '2' },
14
- * ]}
15
- * icon={require('./marker.png')}
16
- * />
17
- * </MapView>
18
- * ```
6
+ * @param props 多点标记的配置属性,继承自MultiPointProps接口
7
+ * @returns 渲染原生高德地图多点标记组件
19
8
  */
20
9
  export default function MultiPoint(props: MultiPointProps): React.JSX.Element;
21
10
  //# sourceMappingURL=MultiPoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiPoint.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/MultiPoint.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,qBAExD"}
1
+ {"version":3,"file":"MultiPoint.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/MultiPoint.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKnD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,qBAExD"}
@@ -1,32 +1,11 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:02:35
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-13 18:19:09
6
- * @FilePath : /expo-gaode-map/src/components/overlays/MultiPoint.tsx
7
- * @Description : 地图海量点组件
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  import { requireNativeViewManager } from 'expo-modules-core';
12
2
  import * as React from 'react';
13
3
  const NativeMultiPoint = requireNativeViewManager('ExpoGaodeMap_MultiPointView');
14
4
  /**
15
- * 地图海量点组件
16
- * 用于展示大量标记点,性能优于普通 Marker
5
+ * 高德地图多点标记组件
17
6
  *
18
- * @example
19
- * ```tsx
20
- * <MapView>
21
- * <MultiPoint
22
- * points={[
23
- * { latitude: 39.9, longitude: 116.4, id: '1' },
24
- * { latitude: 39.91, longitude: 116.41, id: '2' },
25
- * ]}
26
- * icon={require('./marker.png')}
27
- * />
28
- * </MapView>
29
- * ```
7
+ * @param props 多点标记的配置属性,继承自MultiPointProps接口
8
+ * @returns 渲染原生高德地图多点标记组件
30
9
  */
31
10
  export default function MultiPoint(props) {
32
11
  return <NativeMultiPoint {...props}/>;
@@ -1 +1 @@
1
- {"version":3,"file":"MultiPoint.js","sourceRoot":"","sources":["../../../src/components/overlays/MultiPoint.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,6BAA6B,CAAC,CAAC;AAEjF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACzC,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:02:35\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 18:19:09\n * @FilePath : /expo-gaode-map/src/components/overlays/MultiPoint.tsx\n * @Description : 地图海量点组件\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nimport { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { MultiPointProps } from '../../types';\n\nconst NativeMultiPoint = requireNativeViewManager('ExpoGaodeMap_MultiPointView');\n\n/**\n * 地图海量点组件\n * 用于展示大量标记点,性能优于普通 Marker\n * \n * @example\n * ```tsx\n * <MapView>\n * <MultiPoint\n * points={[\n * { latitude: 39.9, longitude: 116.4, id: '1' },\n * { latitude: 39.91, longitude: 116.41, id: '2' },\n * ]}\n * icon={require('./marker.png')}\n * />\n * </MapView>\n * ```\n */\nexport default function MultiPoint(props: MultiPointProps) {\n return <NativeMultiPoint {...props} />;\n}\n"]}
1
+ {"version":3,"file":"MultiPoint.js","sourceRoot":"","sources":["../../../src/components/overlays/MultiPoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,6BAA6B,CAAC,CAAC;AAGjF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACzC,CAAC","sourcesContent":["import { requireNativeViewManager } from 'expo-modules-core';\nimport * as React from 'react';\nimport type { MultiPointProps } from '../../types';\n\nconst NativeMultiPoint = requireNativeViewManager('ExpoGaodeMap_MultiPointView');\n\n\n/**\n * 高德地图多点标记组件\n * \n * @param props 多点标记的配置属性,继承自MultiPointProps接口\n * @returns 渲染原生高德地图多点标记组件\n */\nexport default function MultiPoint(props: MultiPointProps) {\n return <NativeMultiPoint {...props} />;\n}\n"]}
@@ -1,22 +1,19 @@
1
1
  import type { PolygonProps } from '../../types';
2
2
  /**
3
- * 地图多边形组件 - 命令式 API
3
+ * 高德地图多边形覆盖物组件
4
4
  *
5
- * @example
6
- * ```tsx
7
- * <MapView>
8
- * <Polygon
9
- * points={[
10
- * { latitude: 39.9, longitude: 116.4 },
11
- * { latitude: 39.91, longitude: 116.41 },
12
- * { latitude: 39.92, longitude: 116.40 },
13
- * ]}
14
- * fillColor={0x44FF0000}
15
- * strokeColor={-65536}
16
- * strokeWidth={5}
17
- * />
18
- * </MapView>
19
- * ```
5
+ * @param props - 多边形配置属性
6
+ * @param props.points - 多边形顶点坐标数组,至少需要3个点
7
+ * @param props.fillColor - 多边形填充颜色,十六进制格式,默认0x440000FF
8
+ * @param props.strokeColor - 多边形边框颜色,默认-16776961
9
+ * @param props.strokeWidth - 多边形边框宽度,默认10
10
+ * @param props.zIndex - 多边形层级,默认0
11
+ *
12
+ * @remarks
13
+ * 组件内部会自动生成唯一ID用于标识多边形,并在组件挂载时添加到地图,
14
+ * 更新时同步修改多边形属性,卸载时自动移除多边形。
15
+ *
16
+ * 注意:points数组长度必须大于等于3才能有效绘制多边形。
20
17
  */
21
18
  export default function Polygon(props: PolygonProps): null;
22
19
  //# sourceMappingURL=Polygon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Polygon.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,QAuElD"}
1
+ {"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Polygon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,QAuElD"}
@@ -1,33 +1,20 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:01:45
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-13 19:24:22
6
- * @FilePath : /expo-gaode-map/src/components/overlays/Polygon.tsx
7
- * @Description : 地图多边形组件 - 命令式 API
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  import { useContext, useEffect, useRef } from 'react';
12
2
  import { MapContext } from '../../ExpoGaodeMapView';
13
3
  /**
14
- * 地图多边形组件 - 命令式 API
4
+ * 高德地图多边形覆盖物组件
5
+ *
6
+ * @param props - 多边形配置属性
7
+ * @param props.points - 多边形顶点坐标数组,至少需要3个点
8
+ * @param props.fillColor - 多边形填充颜色,十六进制格式,默认0x440000FF
9
+ * @param props.strokeColor - 多边形边框颜色,默认-16776961
10
+ * @param props.strokeWidth - 多边形边框宽度,默认10
11
+ * @param props.zIndex - 多边形层级,默认0
12
+ *
13
+ * @remarks
14
+ * 组件内部会自动生成唯一ID用于标识多边形,并在组件挂载时添加到地图,
15
+ * 更新时同步修改多边形属性,卸载时自动移除多边形。
15
16
  *
16
- * @example
17
- * ```tsx
18
- * <MapView>
19
- * <Polygon
20
- * points={[
21
- * { latitude: 39.9, longitude: 116.4 },
22
- * { latitude: 39.91, longitude: 116.41 },
23
- * { latitude: 39.92, longitude: 116.40 },
24
- * ]}
25
- * fillColor={0x44FF0000}
26
- * strokeColor={-65536}
27
- * strokeWidth={5}
28
- * />
29
- * </MapView>
30
- * ```
17
+ * 注意:points数组长度必须大于等于3才能有效绘制多边形。
31
18
  */
32
19
  export default function Polygon(props) {
33
20
  const { points, fillColor, strokeColor, strokeWidth, zIndex } = props;
@@ -1 +1 @@
1
- {"version":3,"file":"Polygon.js","sourceRoot":"","sources":["../../../src/components/overlays/Polygon.tsx"],"names":[],"mappings":"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","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:01:45\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 19:24:22\n * @FilePath : /expo-gaode-map/src/components/overlays/Polygon.tsx\n * @Description : 地图多边形组件 - 命令式 API\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\n\nimport { useContext, useEffect, useRef } from 'react';\nimport type { PolygonProps } from '../../types';\nimport { MapContext } from '../../ExpoGaodeMapView';\n\n/**\n * 地图多边形组件 - 命令式 API\n * \n * @example\n * ```tsx\n * <MapView>\n * <Polygon\n * points={[\n * { latitude: 39.9, longitude: 116.4 },\n * { latitude: 39.91, longitude: 116.41 },\n * { latitude: 39.92, longitude: 116.40 },\n * ]}\n * fillColor={0x44FF0000}\n * strokeColor={-65536}\n * strokeWidth={5}\n * />\n * </MapView>\n * ```\n */\nexport default function Polygon(props: PolygonProps) {\n const { points, fillColor, strokeColor, strokeWidth, zIndex } = props;\n const nativeRef = useContext(MapContext);\n const polygonIdRef = useRef<string>(`polygon_${Date.now()}_${Math.random()}`);\n\n useEffect(() => {\n const polygonId = polygonIdRef.current;\n\n // 添加多边形\n if (nativeRef?.current && points && points.length >= 3) {\n try {\n console.log('🟦 Polygon 组件调用 addPolygon:', polygonId, {\n points,\n fillColor: fillColor ?? 0x440000FF,\n strokeColor: strokeColor ?? -16776961,\n strokeWidth: strokeWidth ?? 10,\n zIndex: zIndex ?? 0,\n });\n \n nativeRef.current.addPolygon(polygonId, {\n points,\n fillColor: fillColor ?? 0x440000FF,\n strokeColor: strokeColor ?? -16776961,\n strokeWidth: strokeWidth ?? 10,\n zIndex: zIndex ?? 0,\n });\n \n console.log('✅ Polygon addPolygon 调用完成');\n } catch (error) {\n console.error('❌ 添加多边形失败:', error);\n }\n } else {\n console.warn('⚠️ Polygon 组件条件不满足:', {\n hasNativeRef: !!nativeRef?.current,\n hasPoints: !!points,\n pointsLength: points?.length,\n });\n }\n\n // 清理函数\n return () => {\n if (nativeRef?.current) {\n try {\n nativeRef.current.removePolygon(polygonId);\n } catch (error) {\n console.error('移除多边形失败:', error);\n }\n }\n };\n }, []);\n\n // 更新多边形属性\n useEffect(() => {\n const polygonId = polygonIdRef.current;\n\n if (nativeRef?.current) {\n try {\n nativeRef.current.updatePolygon(polygonId, {\n points,\n fillColor,\n strokeColor,\n strokeWidth,\n zIndex,\n });\n } catch (error) {\n console.error('更新多边形失败:', error);\n }\n }\n }, [points, fillColor, strokeColor, strokeWidth, zIndex]);\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"Polygon.js","sourceRoot":"","sources":["../../../src/components/overlays/Polygon.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useContext, useEffect, useRef } from 'react';\nimport type { PolygonProps } from '../../types';\nimport { MapContext } from '../../ExpoGaodeMapView';\n\n\n/**\n * 高德地图多边形覆盖物组件\n * \n * @param props - 多边形配置属性\n * @param props.points - 多边形顶点坐标数组,至少需要3个点\n * @param props.fillColor - 多边形填充颜色,十六进制格式,默认0x440000FF\n * @param props.strokeColor - 多边形边框颜色,默认-16776961\n * @param props.strokeWidth - 多边形边框宽度,默认10\n * @param props.zIndex - 多边形层级,默认0\n * \n * @remarks\n * 组件内部会自动生成唯一ID用于标识多边形,并在组件挂载时添加到地图,\n * 更新时同步修改多边形属性,卸载时自动移除多边形。\n * \n * 注意:points数组长度必须大于等于3才能有效绘制多边形。\n */\nexport default function Polygon(props: PolygonProps) {\n const { points, fillColor, strokeColor, strokeWidth, zIndex } = props;\n const nativeRef = useContext(MapContext);\n const polygonIdRef = useRef<string>(`polygon_${Date.now()}_${Math.random()}`);\n\n useEffect(() => {\n const polygonId = polygonIdRef.current;\n\n // 添加多边形\n if (nativeRef?.current && points && points.length >= 3) {\n try {\n console.log('🟦 Polygon 组件调用 addPolygon:', polygonId, {\n points,\n fillColor: fillColor ?? 0x440000FF,\n strokeColor: strokeColor ?? -16776961,\n strokeWidth: strokeWidth ?? 10,\n zIndex: zIndex ?? 0,\n });\n \n nativeRef.current.addPolygon(polygonId, {\n points,\n fillColor: fillColor ?? 0x440000FF,\n strokeColor: strokeColor ?? -16776961,\n strokeWidth: strokeWidth ?? 10,\n zIndex: zIndex ?? 0,\n });\n \n console.log('✅ Polygon addPolygon 调用完成');\n } catch (error) {\n console.error('❌ 添加多边形失败:', error);\n }\n } else {\n console.warn('⚠️ Polygon 组件条件不满足:', {\n hasNativeRef: !!nativeRef?.current,\n hasPoints: !!points,\n pointsLength: points?.length,\n });\n }\n\n // 清理函数\n return () => {\n if (nativeRef?.current) {\n try {\n nativeRef.current.removePolygon(polygonId);\n } catch (error) {\n console.error('移除多边形失败:', error);\n }\n }\n };\n }, []);\n\n // 更新多边形属性\n useEffect(() => {\n const polygonId = polygonIdRef.current;\n\n if (nativeRef?.current) {\n try {\n nativeRef.current.updatePolygon(polygonId, {\n points,\n fillColor,\n strokeColor,\n strokeWidth,\n zIndex,\n });\n } catch (error) {\n console.error('更新多边形失败:', error);\n }\n }\n }, [points, fillColor, strokeColor, strokeWidth, zIndex]);\n\n return null;\n}\n"]}
@@ -1,20 +1,18 @@
1
1
  import type { PolylineProps } from '../../types';
2
2
  /**
3
- * 地图折线组件
3
+ * Polyline 组件用于在高德地图上绘制折线
4
4
  *
5
- * @example
6
- * ```tsx
7
- * <MapView>
8
- * <Polyline
9
- * points={[
10
- * { latitude: 39.9, longitude: 116.4 },
11
- * { latitude: 39.91, longitude: 116.41 },
12
- * ]}
13
- * color="#FF0000"
14
- * width={5}
15
- * />
16
- * </MapView>
17
- * ```
5
+ * @param props - 折线的配置属性
6
+ * @param props.points - 折线的坐标点数组
7
+ * @param props.width - 折线的宽度(像素)
8
+ * @param props.color - 折线的颜色(十六进制或RGBA)
9
+ * @param [props.texture] - 可选,折线的纹理样式
10
+ *
11
+ * @remarks
12
+ * 组件内部使用 React 的 useEffect 钩子来管理折线的生命周期:
13
+ * 1. 组件挂载时创建折线并添加到地图
14
+ * 2. 组件卸载时自动从地图移除折线
15
+ * 3. 使用 ref 保存折线ID以便清理
18
16
  */
19
17
  export default function Polyline(props: PolylineProps): null;
20
18
  //# sourceMappingURL=Polyline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Polyline.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Polyline.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,QAyBpD"}
1
+ {"version":3,"file":"Polyline.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/Polyline.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,QAyBpD"}
@@ -1,31 +1,19 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:01:30
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-15 01:08:27
6
- * @FilePath : /expo-gaode-map/src/components/overlays/Polyline.tsx
7
- * @Description : 地图折线组件 - 使用命令式 API
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  import * as React from 'react';
12
2
  import { MapContext } from '../../ExpoGaodeMapView';
13
3
  /**
14
- * 地图折线组件
4
+ * Polyline 组件用于在高德地图上绘制折线
5
+ *
6
+ * @param props - 折线的配置属性
7
+ * @param props.points - 折线的坐标点数组
8
+ * @param props.width - 折线的宽度(像素)
9
+ * @param props.color - 折线的颜色(十六进制或RGBA)
10
+ * @param [props.texture] - 可选,折线的纹理样式
15
11
  *
16
- * @example
17
- * ```tsx
18
- * <MapView>
19
- * <Polyline
20
- * points={[
21
- * { latitude: 39.9, longitude: 116.4 },
22
- * { latitude: 39.91, longitude: 116.41 },
23
- * ]}
24
- * color="#FF0000"
25
- * width={5}
26
- * />
27
- * </MapView>
28
- * ```
12
+ * @remarks
13
+ * 组件内部使用 React 的 useEffect 钩子来管理折线的生命周期:
14
+ * 1. 组件挂载时创建折线并添加到地图
15
+ * 2. 组件卸载时自动从地图移除折线
16
+ * 3. 使用 ref 保存折线ID以便清理
29
17
  */
30
18
  export default function Polyline(props) {
31
19
  const mapRef = React.useContext(MapContext);
@@ -1 +1 @@
1
- {"version":3,"file":"Polyline.js","sourceRoot":"","sources":["../../../src/components/overlays/Polyline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAgB,IAAI,CAAC,CAAC;IAExD,OAAO;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,UAAU,GAAG,YAAY,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAC7D,aAAa,CAAC,OAAO,GAAG,UAAU,CAAC;QAEnC,WAAW;QACX,MAAM,aAAa,GAAG;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;SACjD,CAAC;QAEF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAE1D,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:01:30\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-15 01:08:27\n * @FilePath : /expo-gaode-map/src/components/overlays/Polyline.tsx\n * @Description : 地图折线组件 - 使用命令式 API\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nimport * as React from 'react';\nimport { MapContext } from '../../ExpoGaodeMapView';\nimport type { PolylineProps } from '../../types';\n\n/**\n * 地图折线组件\n * \n * @example\n * ```tsx\n * <MapView>\n * <Polyline\n * points={[\n * { latitude: 39.9, longitude: 116.4 },\n * { latitude: 39.91, longitude: 116.41 },\n * ]}\n * color=\"#FF0000\"\n * width={5}\n * />\n * </MapView>\n * ```\n */\nexport default function Polyline(props: PolylineProps) {\n const mapRef = React.useContext(MapContext);\n const polylineIdRef = React.useRef<string | null>(null);\n\n // 添加折线\n React.useEffect(() => {\n const polylineId = `polyline_${Date.now()}_${Math.random()}`;\n polylineIdRef.current = polylineId;\n \n // 只传递必要的属性\n const polylineProps = {\n points: props.points,\n width: props.width,\n color: props.color,\n ...(props.texture && { texture: props.texture }),\n };\n \n mapRef?.current?.addPolyline?.(polylineId, polylineProps);\n\n return () => {\n mapRef?.current?.removePolyline?.(polylineId);\n };\n }, []);\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"Polyline.js","sourceRoot":"","sources":["../../../src/components/overlays/Polyline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAgB,IAAI,CAAC,CAAC;IAExD,OAAO;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,UAAU,GAAG,YAAY,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QAC7D,aAAa,CAAC,OAAO,GAAG,UAAU,CAAC;QAEnC,WAAW;QACX,MAAM,aAAa,GAAG;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;SACjD,CAAC;QAEF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAE1D,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC;QAChD,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import * as React from 'react';\nimport { MapContext } from '../../ExpoGaodeMapView';\nimport type { PolylineProps } from '../../types';\n\n\n/**\n * Polyline 组件用于在高德地图上绘制折线\n * \n * @param props - 折线的配置属性\n * @param props.points - 折线的坐标点数组\n * @param props.width - 折线的宽度(像素)\n * @param props.color - 折线的颜色(十六进制或RGBA)\n * @param [props.texture] - 可选,折线的纹理样式\n * \n * @remarks\n * 组件内部使用 React 的 useEffect 钩子来管理折线的生命周期:\n * 1. 组件挂载时创建折线并添加到地图\n * 2. 组件卸载时自动从地图移除折线\n * 3. 使用 ref 保存折线ID以便清理\n */\nexport default function Polyline(props: PolylineProps) {\n const mapRef = React.useContext(MapContext);\n const polylineIdRef = React.useRef<string | null>(null);\n\n // 添加折线\n React.useEffect(() => {\n const polylineId = `polyline_${Date.now()}_${Math.random()}`;\n polylineIdRef.current = polylineId;\n \n // 只传递必要的属性\n const polylineProps = {\n points: props.points,\n width: props.width,\n color: props.color,\n ...(props.texture && { texture: props.texture }),\n };\n \n mapRef?.current?.addPolyline?.(polylineId, polylineProps);\n\n return () => {\n mapRef?.current?.removePolyline?.(polylineId);\n };\n }, []);\n\n return null;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,13 +1,3 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 15:03:10
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-13 15:03:22
6
- * @FilePath : /expo-gaode-map/src/components/overlays/index.ts
7
- * @Description : 覆盖物组件统一导出
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  export { default as Marker } from './Marker';
12
2
  export { default as Polyline } from './Polyline';
13
3
  export { default as Polygon } from './Polygon';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/overlays/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 15:03:10\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-13 15:03:22\n * @FilePath : /expo-gaode-map/src/components/overlays/index.ts\n * @Description : 覆盖物组件统一导出\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\nexport { default as Marker } from './Marker';\nexport { default as Polyline } from './Polyline';\nexport { default as Polygon } from './Polygon';\nexport { default as Circle } from './Circle';\nexport { default as HeatMap } from './HeatMap';\nexport { default as MultiPoint } from './MultiPoint';\nexport { default as Cluster } from './Cluster';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/overlays/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { default as Marker } from './Marker';\nexport { default as Polyline } from './Polyline';\nexport { default as Polygon } from './Polygon';\nexport { default as Circle } from './Circle';\nexport { default as HeatMap } from './HeatMap';\nexport { default as MultiPoint } from './MultiPoint';\nexport { default as Cluster } from './Cluster';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG5E,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAMlE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG5E,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAMlE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
package/build/index.js CHANGED
@@ -1,13 +1,3 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2025-11-13 14:45:15
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-11-15 02:21:17
6
- * @FilePath : /expo-gaode-map/src/index.ts
7
- * @Description : 高德地图 Expo Module 主导出文件
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
1
  // 导出类型定义
12
2
  export * from './ExpoGaodeMap.types';
13
3
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,SAAS;AACT,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AAExB,SAAS;AACT,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5E,SAAS;AACT,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,WAAW;AACX,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAGnC,6BAA6B;AAC7B,+EAA+E;AAE/E,WAAW;AACX,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGxD,UAAU;AACV,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,uBAAuB,CAAC;AAE/B,kBAAkB;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/*\n * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @Date : 2025-11-13 14:45:15\n * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com\n * @LastEditTime : 2025-11-15 02:21:17\n * @FilePath : /expo-gaode-map/src/index.ts\n * @Description : 高德地图 Expo Module 主导出文件\n * \n * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved. \n */\n\n// 导出类型定义\nexport * from './ExpoGaodeMap.types';\nexport * from './types';\n\n// 导出原生模块\nexport { default as ExpoGaodeMapModule } from './ExpoGaodeMapModule';\n\n// 导出 SDK 模块\nexport { default as AMapSDK, initSDK, getVersion } from './modules/AMapSDK';\n\n// 导出定位模块\nexport {\n default as AMapLocation,\n configure,\n start,\n stop,\n isStarted,\n getCurrentLocation,\n addLocationListener,\n coordinateConvert,\n startUpdatingHeading,\n stopUpdatingHeading,\n} from './modules/AMapLocation';\n\n// 导出权限管理模块\nexport {\n default as AMapPermissions,\n checkLocationPermission,\n requestLocationPermission,\n} from './modules/AMapPermissions';\nexport type { PermissionStatus } from './modules/AMapPermissions';\n\n// 地图视图控制已移至 MapView 的 ref 调用\n// 使用方式: const mapRef = useRef<MapViewRef>(null); mapRef.current.moveCamera() 等\n\n// 导出地图视图组件\nexport { default as MapView } from './ExpoGaodeMapView';\nexport type { MapViewRef } from './ExpoGaodeMapView';\n\n// 导出覆盖物组件\nexport {\n Marker,\n Polyline,\n Polygon,\n Circle,\n HeatMap,\n MultiPoint,\n Cluster,\n} from './components/overlays';\n\n// 默认导出:直接重新导出所有模块\nexport { default } from './ExpoGaodeMapModule';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AAExB,SAAS;AACT,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5E,SAAS;AACT,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,WAAW;AACX,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AAGnC,6BAA6B;AAC7B,+EAA+E;AAE/E,WAAW;AACX,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGxD,UAAU;AACV,OAAO,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,OAAO,GACR,MAAM,uBAAuB,CAAC;AAE/B,kBAAkB;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// 导出类型定义\nexport * from './ExpoGaodeMap.types';\nexport * from './types';\n\n// 导出原生模块\nexport { default as ExpoGaodeMapModule } from './ExpoGaodeMapModule';\n\n// 导出 SDK 模块\nexport { default as AMapSDK, initSDK, getVersion } from './modules/AMapSDK';\n\n// 导出定位模块\nexport {\n default as AMapLocation,\n configure,\n start,\n stop,\n isStarted,\n getCurrentLocation,\n addLocationListener,\n coordinateConvert,\n startUpdatingHeading,\n stopUpdatingHeading,\n} from './modules/AMapLocation';\n\n// 导出权限管理模块\nexport {\n default as AMapPermissions,\n checkLocationPermission,\n requestLocationPermission,\n} from './modules/AMapPermissions';\nexport type { PermissionStatus } from './modules/AMapPermissions';\n\n// 地图视图控制已移至 MapView 的 ref 调用\n// 使用方式: const mapRef = useRef<MapViewRef>(null); mapRef.current.moveCamera() 等\n\n// 导出地图视图组件\nexport { default as MapView } from './ExpoGaodeMapView';\nexport type { MapViewRef } from './ExpoGaodeMapView';\n\n// 导出覆盖物组件\nexport {\n Marker,\n Polyline,\n Polygon,\n Circle,\n HeatMap,\n MultiPoint,\n Cluster,\n} from './components/overlays';\n\n// 默认导出:直接重新导出所有模块\nexport { default } from './ExpoGaodeMapModule';\n"]}