expo-gaode-map 0.1.0 → 0.1.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 (347) hide show
  1. package/ExpoSmartrefreshlayoutModule.swift +119 -0
  2. package/README.md +35 -496
  3. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapModule.kt +7 -8
  4. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapView.kt +9 -1
  5. package/android/src/main/java/expo/modules/gaodemap/managers/CameraManager.kt +14 -0
  6. package/android/src/main/java/expo/modules/gaodemap/managers/OverlayManager.kt +11 -45
  7. package/android/src/main/java/expo/modules/gaodemap/managers/UIManager.kt +111 -9
  8. package/android/src/main/java/expo/modules/gaodemap/utils/ColorParser.kt +48 -0
  9. package/build/components/overlays/Polyline.d.ts.map +1 -1
  10. package/build/components/overlays/Polyline.js +10 -17
  11. package/build/components/overlays/Polyline.js.map +1 -1
  12. package/build/index.d.ts +1 -1
  13. package/build/index.d.ts.map +1 -1
  14. package/build/index.js +2 -2
  15. package/build/index.js.map +1 -1
  16. package/build/modules/AMapSDK.d.ts +0 -6
  17. package/build/modules/AMapSDK.d.ts.map +1 -1
  18. package/build/modules/AMapSDK.js +2 -11
  19. package/build/modules/AMapSDK.js.map +1 -1
  20. package/build/types/map-view.types.d.ts +27 -5
  21. package/build/types/map-view.types.d.ts.map +1 -1
  22. package/build/types/map-view.types.js.map +1 -1
  23. package/docs/API.md +248 -0
  24. package/docs/EXAMPLES.md +479 -0
  25. package/ios/ColorParser.swift +158 -0
  26. package/ios/ExpoGaodeMap.podspec +1 -0
  27. package/ios/ExpoGaodeMapModule.swift +445 -42
  28. package/ios/ExpoGaodeMapView.swift +278 -32
  29. package/ios/UIColorExtension.swift +11 -0
  30. package/ios/managers/CameraManager.swift +107 -0
  31. package/ios/managers/OverlayManager.swift +210 -0
  32. package/ios/managers/UIManager.swift +163 -0
  33. package/ios/modules/LocationManager.swift +144 -0
  34. package/ios/overlays/CircleView.swift +76 -0
  35. package/ios/overlays/ClusterView.swift +56 -0
  36. package/ios/overlays/HeatMapView.swift +98 -0
  37. package/ios/overlays/MarkerView.swift +81 -0
  38. package/ios/overlays/MultiPointView.swift +50 -0
  39. package/ios/overlays/PolygonView.swift +70 -0
  40. package/ios/overlays/PolylineView.swift +62 -0
  41. package/lib/android/.gradle/8.9/checksums/checksums.lock +0 -0
  42. package/lib/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  43. package/lib/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  44. package/lib/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  45. package/lib/android/.gradle/8.9/gc.properties +0 -0
  46. package/lib/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  47. package/lib/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  48. package/lib/android/.gradle/vcs-1/gc.properties +0 -0
  49. package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/results.bin +1 -0
  50. package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/transformed/classes/classes_dex/classes.dex +0 -0
  51. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/results.bin +1 -0
  52. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/AMap3DPackage.dex +0 -0
  53. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/BuildConfig.dex +0 -0
  54. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.dex +0 -0
  55. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt.dex +0 -0
  56. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Circle.dex +0 -0
  57. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/CircleManager.dex +0 -0
  58. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMap.dex +0 -0
  59. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMapManager.dex +0 -0
  60. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$7.dex +0 -0
  61. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$8.dex +0 -0
  62. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$animateCallback$1.dex +0 -0
  63. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView.dex +0 -0
  64. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$1.dex +0 -0
  65. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$2.dex +0 -0
  66. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager.dex +0 -0
  67. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker$setIcon$1.dex +0 -0
  68. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker.dex +0 -0
  69. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager$Companion.dex +0 -0
  70. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager.dex +0 -0
  71. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.dex +0 -0
  72. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint.dex +0 -0
  73. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPointManager.dex +0 -0
  74. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Overlay.dex +0 -0
  75. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polygon.dex +0 -0
  76. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolygonManager.dex +0 -0
  77. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polyline.dex +0 -0
  78. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolylineManager.dex +0 -0
  79. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/modules/SdkModule.dex +0 -0
  80. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/desugar_graph.bin +0 -0
  81. package/lib/android/build/generated/source/buildConfig/debug/qiuxiang/amap3d/BuildConfig.java +10 -0
  82. package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +14 -0
  83. package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  84. package/lib/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +6 -0
  85. package/lib/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
  86. package/lib/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  87. package/lib/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  88. package/lib/android/build/intermediates/compile_symbol_list/debug/R.txt +1 -0
  89. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-hdpi-v4_positio_icon.png.flat +0 -0
  90. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-mdpi-v4_positio_icon.png.flat +0 -0
  91. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xhdpi-v4_positio_icon.png.flat +0 -0
  92. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxhdpi-v4_positio_icon.png.flat +0 -0
  93. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxxhdpi-v4_positio_icon.png.flat +0 -0
  94. package/lib/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +6 -0
  95. package/lib/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  96. package/lib/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  97. package/lib/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  98. package/lib/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  99. package/lib/android/build/intermediates/java_res/debug/out/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  100. package/lib/android/build/intermediates/javac/debug/classes/qiuxiang/amap3d/BuildConfig.class +0 -0
  101. package/lib/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +3 -0
  102. package/lib/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +26 -0
  103. package/lib/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +14 -0
  104. package/lib/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
  105. package/lib/android/build/intermediates/packaged_res/debug/drawable-hdpi-v4/positio_icon.png +0 -0
  106. package/lib/android/build/intermediates/packaged_res/debug/drawable-mdpi-v4/positio_icon.png +0 -0
  107. package/lib/android/build/intermediates/packaged_res/debug/drawable-xhdpi-v4/positio_icon.png +0 -0
  108. package/lib/android/build/intermediates/packaged_res/debug/drawable-xxhdpi-v4/positio_icon.png +0 -0
  109. package/lib/android/build/intermediates/packaged_res/debug/drawable-xxxhdpi-v4/positio_icon.png +0 -0
  110. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  111. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
  112. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/BuildConfig.class +0 -0
  113. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
  114. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
  115. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
  116. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
  117. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
  118. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
  119. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
  120. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
  121. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
  122. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
  123. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
  124. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
  125. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
  126. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
  127. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
  128. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
  129. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
  130. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
  131. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
  132. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
  133. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
  134. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
  135. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
  136. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
  137. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
  138. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
  139. package/lib/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  140. package/lib/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +2 -0
  141. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  142. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  143. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  144. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  145. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  146. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  147. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  148. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  149. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  150. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  151. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  152. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  153. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  154. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  155. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  156. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  157. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  158. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  159. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  160. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  161. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  162. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  163. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  164. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  165. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  166. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  167. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  168. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  169. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  170. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  171. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  172. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  173. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  174. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  175. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  176. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  177. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  178. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  179. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  180. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  181. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  182. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  183. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  184. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  185. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  186. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  187. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  188. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  189. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  190. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  191. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  192. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  193. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  194. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  195. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  196. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  197. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  198. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  199. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  200. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  201. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  202. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  203. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  204. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  205. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  206. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  207. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  208. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  209. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  210. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  211. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  212. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  213. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  214. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  215. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  216. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  217. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  218. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  219. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  220. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  221. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  222. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  223. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  224. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  225. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  226. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  227. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  228. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  229. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  230. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  231. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  232. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -0
  233. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  234. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  235. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  236. package/lib/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  237. package/lib/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  238. package/lib/android/build/outputs/logs/manifest-merger-debug-report.txt +41 -0
  239. package/lib/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  240. package/lib/android/build/tmp/kotlin-classes/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  241. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
  242. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
  243. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
  244. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
  245. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
  246. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
  247. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
  248. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
  249. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
  250. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
  251. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
  252. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
  253. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
  254. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
  255. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
  256. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
  257. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
  258. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
  259. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
  260. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
  261. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
  262. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
  263. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
  264. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
  265. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
  266. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
  267. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
  268. package/lib/android/build.gradle +34 -0
  269. package/lib/android/drawable/rn_edit_text_material.xml +37 -0
  270. package/lib/android/drawable-hdpi/positio_icon.png +0 -0
  271. package/lib/android/drawable-hdpi/splashscreen_image.png +0 -0
  272. package/lib/android/drawable-mdpi/splashscreen_image.png +0 -0
  273. package/lib/android/drawable-xhdpi/splashscreen_image.png +0 -0
  274. package/lib/android/drawable-xxhdpi/splashscreen_image.png +0 -0
  275. package/lib/android/drawable-xxxhdpi/splashscreen_image.png +0 -0
  276. package/lib/android/src/main/AndroidManifest.xml +10 -0
  277. package/lib/android/src/main/java/qiuxiang/amap3d/AMap3DPackage.kt +30 -0
  278. package/lib/android/src/main/java/qiuxiang/amap3d/Utils.kt +114 -0
  279. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Circle.kt +65 -0
  280. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/CircleManager.kt +49 -0
  281. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMap.kt +32 -0
  282. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMapManager.kt +33 -0
  283. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapView.kt +190 -0
  284. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapViewManager.kt +181 -0
  285. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Marker.kt +102 -0
  286. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MarkerManager.kt +78 -0
  287. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPoint.kt +53 -0
  288. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPointManager.kt +33 -0
  289. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Overlay.kt +8 -0
  290. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polygon.kt +58 -0
  291. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolygonManager.kt +44 -0
  292. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polyline.kt +69 -0
  293. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolylineManager.kt +64 -0
  294. package/lib/android/src/main/java/qiuxiang/amap3d/modules/AMapGeolocationModule.kt +468 -0
  295. package/lib/android/src/main/java/qiuxiang/amap3d/modules/SdkModule.kt +31 -0
  296. package/lib/android/src/main/res/drawable-hdpi/positio_icon.png +0 -0
  297. package/lib/android/src/main/res/drawable-mdpi/positio_icon.png +0 -0
  298. package/lib/android/src/main/res/drawable-xhdpi/positio_icon.png +0 -0
  299. package/lib/android/src/main/res/drawable-xxhdpi/positio_icon.png +0 -0
  300. package/lib/android/src/main/res/drawable-xxxhdpi/positio_icon.png +0 -0
  301. package/lib/ios/.swiftformat +2 -0
  302. package/lib/ios/Bridging-Header.h +4 -0
  303. package/lib/ios/MapView/CircleManager.m +11 -0
  304. package/lib/ios/MapView/CircleManager.swift +30 -0
  305. package/lib/ios/MapView/HeatMapManager.m +9 -0
  306. package/lib/ios/MapView/HeatMapManager.swift +29 -0
  307. package/lib/ios/MapView/MapViewManager.m +35 -0
  308. package/lib/ios/MapView/MapViewManager.swift +188 -0
  309. package/lib/ios/MapView/MarkerManager.m +18 -0
  310. package/lib/ios/MapView/MarkerManager.swift +100 -0
  311. package/lib/ios/MapView/MultiPointManager.m +9 -0
  312. package/lib/ios/MapView/MultiPointManager.swift +47 -0
  313. package/lib/ios/MapView/Overlay.swift +4 -0
  314. package/lib/ios/MapView/PolygonManager.m +10 -0
  315. package/lib/ios/MapView/PolygonManager.swift +30 -0
  316. package/lib/ios/MapView/PolylineManager.m +12 -0
  317. package/lib/ios/MapView/PolylineManager.swift +41 -0
  318. package/lib/ios/Modules/SdkModule.m +8 -0
  319. package/lib/ios/Modules/SdkModule.swift +16 -0
  320. package/lib/ios/RNAMapGeolocation.h +8 -0
  321. package/lib/ios/RNAMapGeolocation.m +302 -0
  322. package/lib/ios/Utils.swift +104 -0
  323. package/lib/ios/react-native-amap3d.podspec +21 -0
  324. package/lib/src/circle.tsx +36 -0
  325. package/lib/src/cluster/cluster-view.tsx +58 -0
  326. package/lib/src/cluster/index.tsx +159 -0
  327. package/lib/src/component.ts +31 -0
  328. package/lib/src/geolocation/index.d.ts +287 -0
  329. package/lib/src/geolocation/index.js +344 -0
  330. package/lib/src/heat-map.tsx +21 -0
  331. package/lib/src/index.ts +13 -0
  332. package/lib/src/location/index.d.ts +287 -0
  333. package/lib/src/location/index.js +344 -0
  334. package/lib/src/map-view.tsx +230 -0
  335. package/lib/src/marker.tsx +128 -0
  336. package/lib/src/multi-point.tsx +28 -0
  337. package/lib/src/polygon.tsx +31 -0
  338. package/lib/src/polyline.tsx +65 -0
  339. package/lib/src/sdk.ts +11 -0
  340. package/lib/src/types.ts +137 -0
  341. package/package.json +2 -2
  342. package/src/components/overlays/Polyline.tsx +11 -19
  343. package/src/index.ts +2 -2
  344. package/src/modules/AMapSDK.ts +2 -12
  345. package/src/types/map-view.types.ts +27 -5
  346. package/docs/followUserLocation.md +0 -186
  347. package/src/types/README.md +0 -186
@@ -0,0 +1,163 @@
1
+ import MAMapKit
2
+
3
+ class UIManager {
4
+ private weak var mapView: MAMapView?
5
+
6
+ init(mapView: MAMapView) {
7
+ self.mapView = mapView
8
+ }
9
+
10
+ func setMapType(_ type: Int) {
11
+ guard let mapView = mapView else { return }
12
+ switch type {
13
+ case 1: mapView.mapType = .satellite
14
+ case 2: mapView.mapType = .standardNight
15
+ default: mapView.mapType = .standard
16
+ }
17
+ }
18
+
19
+ func setShowsZoomControls(_ show: Bool) {
20
+ // iOS 高德地图不支持缩放控件
21
+ }
22
+
23
+ func setShowsCompass(_ show: Bool) {
24
+ mapView?.showsCompass = show
25
+ }
26
+
27
+ func setShowsScale(_ show: Bool) {
28
+ mapView?.showsScale = show
29
+ }
30
+
31
+ func setZoomEnabled(_ enabled: Bool) {
32
+ mapView?.isZoomEnabled = enabled
33
+ }
34
+
35
+ func setScrollEnabled(_ enabled: Bool) {
36
+ mapView?.isScrollEnabled = enabled
37
+ }
38
+
39
+ func setRotateEnabled(_ enabled: Bool) {
40
+ mapView?.isRotateEnabled = enabled
41
+ }
42
+
43
+ func setTiltEnabled(_ enabled: Bool) {
44
+ mapView?.isRotateCameraEnabled = enabled
45
+ }
46
+
47
+ func setShowsUserLocation(_ show: Bool, followUser: Bool) {
48
+ guard let mapView = mapView else { return }
49
+ mapView.showsUserLocation = show
50
+ if show && followUser {
51
+ mapView.userTrackingMode = .follow
52
+ } else {
53
+ mapView.userTrackingMode = .none
54
+ }
55
+ }
56
+
57
+ func setUserLocationRepresentation(_ config: [String: Any]) {
58
+ guard let mapView = mapView else { return }
59
+ let representation = MAUserLocationRepresentation()
60
+
61
+ // 精度圈是否显示
62
+ if let showsAccuracyRing = config["showsAccuracyRing"] as? Bool {
63
+ representation.showsAccuracyRing = showsAccuracyRing
64
+ }
65
+
66
+ // 是否显示方向指示
67
+ if let showsHeadingIndicator = config["showsHeadingIndicator"] as? Bool {
68
+ representation.showsHeadingIndicator = showsHeadingIndicator
69
+ }
70
+
71
+ // 精度圈填充颜色
72
+ if let fillColor = config["fillColor"] {
73
+ representation.fillColor = ColorParser.parseColor(fillColor)
74
+ }
75
+
76
+ // 精度圈边线颜色
77
+ if let strokeColor = config["strokeColor"] {
78
+ representation.strokeColor = ColorParser.parseColor(strokeColor)
79
+ }
80
+
81
+ // 精度圈边线宽度
82
+ if let lineWidth = config["lineWidth"] as? Double {
83
+ representation.lineWidth = CGFloat(lineWidth)
84
+ }
85
+
86
+ // 内部蓝色圆点是否使用律动效果
87
+ if let enablePulseAnimation = config["enablePulseAnimation"] as? Bool {
88
+ representation.enablePulseAnnimation = enablePulseAnimation
89
+ }
90
+
91
+ // 定位点背景色
92
+ if let locationDotBgColor = config["locationDotBgColor"] {
93
+ representation.locationDotBgColor = ColorParser.parseColor(locationDotBgColor)
94
+ }
95
+
96
+ // 定位点蓝色圆点颜色
97
+ if let locationDotFillColor = config["locationDotFillColor"] {
98
+ representation.locationDotFillColor = ColorParser.parseColor(locationDotFillColor)
99
+ }
100
+
101
+ // 定位图标
102
+ if let imagePath = config["image"] as? String {
103
+ let imageWidth = config["imageWidth"] as? Double
104
+ let imageHeight = config["imageHeight"] as? Double
105
+
106
+ if imagePath.hasPrefix("http://") || imagePath.hasPrefix("https://") {
107
+ // 网络图片 - 异步加载
108
+ DispatchQueue.global().async {
109
+ if let url = URL(string: imagePath),
110
+ let data = try? Data(contentsOf: url),
111
+ var image = UIImage(data: data) {
112
+ if let width = imageWidth, let height = imageHeight {
113
+ image = self.resizeImage(image, targetSize: CGSize(width: width, height: height))
114
+ }
115
+ DispatchQueue.main.async {
116
+ representation.image = image
117
+ mapView.update(representation)
118
+ }
119
+ }
120
+ }
121
+ return
122
+ } else if imagePath.hasPrefix("file://") {
123
+ // 本地文件
124
+ let path = String(imagePath.dropFirst(7))
125
+ if var image = UIImage(contentsOfFile: path) {
126
+ if let width = imageWidth, let height = imageHeight {
127
+ image = resizeImage(image, targetSize: CGSize(width: width, height: height))
128
+ }
129
+ representation.image = image
130
+ }
131
+ } else {
132
+ // 资源文件
133
+ if var image = UIImage(named: imagePath) {
134
+ if let width = imageWidth, let height = imageHeight {
135
+ image = resizeImage(image, targetSize: CGSize(width: width, height: height))
136
+ }
137
+ representation.image = image
138
+ }
139
+ }
140
+ }
141
+
142
+ mapView.update(representation)
143
+ }
144
+
145
+ private func resizeImage(_ image: UIImage, targetSize: CGSize) -> UIImage {
146
+ let renderer = UIGraphicsImageRenderer(size: targetSize)
147
+ return renderer.image { _ in
148
+ image.draw(in: CGRect(origin: .zero, size: targetSize))
149
+ }
150
+ }
151
+
152
+ func setShowsTraffic(_ show: Bool) {
153
+ mapView?.isShowTraffic = show
154
+ }
155
+
156
+ func setShowsBuildings(_ show: Bool) {
157
+ mapView?.isShowsBuildings = show
158
+ }
159
+
160
+ func setShowsIndoorMap(_ show: Bool) {
161
+ mapView?.isShowsIndoorMap = show
162
+ }
163
+ }
@@ -0,0 +1,144 @@
1
+ import Foundation
2
+ import AMapLocationKit
3
+ import CoreLocation
4
+
5
+ class LocationManager: NSObject, AMapLocationManagerDelegate {
6
+ var locationManager: AMapLocationManager?
7
+ private var isLocationStarted = false
8
+ var onLocationUpdate: (([String: Any]) -> Void)?
9
+ var onHeadingUpdate: (([String: Any]) -> Void)?
10
+
11
+ override init() {
12
+ super.init()
13
+ initLocationManager()
14
+ }
15
+
16
+ func start() {
17
+ locationManager?.startUpdatingLocation()
18
+ isLocationStarted = true
19
+ }
20
+
21
+ func stop() {
22
+ locationManager?.stopUpdatingLocation()
23
+ isLocationStarted = false
24
+ }
25
+
26
+ func isStarted() -> Bool {
27
+ return isLocationStarted
28
+ }
29
+
30
+ func setLocatingWithReGeocode(_ isReGeocode: Bool) {
31
+ locationManager?.locatingWithReGeocode = isReGeocode
32
+ }
33
+
34
+ func setDistanceFilter(_ distance: Double) {
35
+ locationManager?.distanceFilter = distance
36
+ }
37
+
38
+ func setLocationTimeout(_ timeout: Int) {
39
+ locationManager?.locationTimeout = timeout
40
+ }
41
+
42
+ func setReGeocodeTimeout(_ timeout: Int) {
43
+ locationManager?.reGeocodeTimeout = timeout
44
+ }
45
+
46
+ func setDesiredAccuracy(_ accuracy: Int) {
47
+ let accuracyValue: CLLocationAccuracy
48
+ switch accuracy {
49
+ case 0: accuracyValue = kCLLocationAccuracyBestForNavigation
50
+ case 1: accuracyValue = kCLLocationAccuracyBest
51
+ case 2: accuracyValue = kCLLocationAccuracyNearestTenMeters
52
+ case 3: accuracyValue = kCLLocationAccuracyHundredMeters
53
+ case 4: accuracyValue = kCLLocationAccuracyKilometer
54
+ case 5: accuracyValue = kCLLocationAccuracyThreeKilometers
55
+ default: accuracyValue = kCLLocationAccuracyBest
56
+ }
57
+ locationManager?.desiredAccuracy = accuracyValue
58
+ }
59
+
60
+ func setPausesLocationUpdatesAutomatically(_ pauses: Bool) {
61
+ locationManager?.pausesLocationUpdatesAutomatically = pauses
62
+ }
63
+
64
+ func setAllowsBackgroundLocationUpdates(_ allows: Bool) {
65
+ locationManager?.allowsBackgroundLocationUpdates = allows
66
+ }
67
+ func setGeoLanguage(_ language: Int) {
68
+ switch language {
69
+ case 0: locationManager?.reGeocodeLanguage = .default
70
+ case 1: locationManager?.reGeocodeLanguage = .chinse
71
+ case 2: locationManager?.reGeocodeLanguage = .english
72
+ default: break
73
+ }
74
+ }
75
+
76
+
77
+ func startUpdatingHeading() {
78
+ locationManager?.startUpdatingHeading()
79
+ }
80
+
81
+ func stopUpdatingHeading() {
82
+ locationManager?.stopUpdatingHeading()
83
+ }
84
+
85
+ func destroy() {
86
+ locationManager?.stopUpdatingLocation()
87
+ locationManager = nil
88
+ }
89
+
90
+ private func initLocationManager() {
91
+ locationManager = AMapLocationManager()
92
+ locationManager?.delegate = self
93
+ locationManager?.desiredAccuracy = kCLLocationAccuracyBest
94
+ locationManager?.distanceFilter = 10
95
+ locationManager?.locationTimeout = 2
96
+ locationManager?.reGeocodeTimeout = 2
97
+ locationManager?.locatingWithReGeocode = true
98
+ }
99
+
100
+ // MARK: - AMapLocationManagerDelegate
101
+
102
+ func amapLocationManager(_ manager: AMapLocationManager!, didUpdate location: CLLocation!, reGeocode: AMapLocationReGeocode!) {
103
+ var locationData: [String: Any] = [
104
+ "latitude": location.coordinate.latitude,
105
+ "longitude": location.coordinate.longitude,
106
+ "accuracy": location.horizontalAccuracy,
107
+ "altitude": location.altitude,
108
+ "bearing": location.course,
109
+ "speed": location.speed,
110
+ "timestamp": location.timestamp.timeIntervalSince1970 * 1000
111
+ ]
112
+
113
+ if let reGeocode = reGeocode {
114
+ locationData["address"] = reGeocode.formattedAddress
115
+ locationData["province"] = reGeocode.province
116
+ locationData["city"] = reGeocode.city
117
+ locationData["district"] = reGeocode.district
118
+ locationData["street"] = reGeocode.street
119
+ locationData["streetNumber"] = reGeocode.number
120
+ locationData["country"] = reGeocode.country
121
+ locationData["cityCode"] = reGeocode.citycode
122
+ locationData["adCode"] = reGeocode.adcode
123
+ }
124
+
125
+ onLocationUpdate?(locationData)
126
+ }
127
+
128
+ func amapLocationManager(_ manager: AMapLocationManager!, didUpdate heading: CLHeading!) {
129
+ let headingData: [String: Any] = [
130
+ "heading": heading.trueHeading,
131
+ "accuracy": heading.headingAccuracy,
132
+ "timestamp": heading.timestamp.timeIntervalSince1970 * 1000
133
+ ]
134
+ onHeadingUpdate?(headingData)
135
+ }
136
+
137
+ func amapLocationManager(_ manager: AMapLocationManager!, doRequireLocationAuth locationManager: CLLocationManager!) {
138
+ locationManager.requestAlwaysAuthorization()
139
+ }
140
+
141
+ func amapLocationManager(_ manager: AMapLocationManager!, didFailWithError error: Error!) {
142
+ print("定位失败: \(error.localizedDescription)")
143
+ }
144
+ }
@@ -0,0 +1,76 @@
1
+ import ExpoModulesCore
2
+ import MAMapKit
3
+
4
+ class CircleView: ExpoView {
5
+ var circleCenter: [String: Double] = [:]
6
+ var radius: Double = 0
7
+ var fillColor: Any?
8
+ var strokeColor: Any?
9
+ var strokeWidth: Float = 0
10
+
11
+ private var mapView: MAMapView?
12
+ var circle: MACircle?
13
+ private var renderer: MACircleRenderer?
14
+
15
+ required init(appContext: AppContext? = nil) {
16
+ super.init(appContext: appContext)
17
+ circle = MACircle()
18
+ }
19
+
20
+ func setMap(_ map: MAMapView) {
21
+ self.mapView = map
22
+ if let circle = circle {
23
+ map.add(circle)
24
+ }
25
+ }
26
+
27
+ private func updateCircle() {
28
+ guard let latitude = circleCenter["latitude"],
29
+ let longitude = circleCenter["longitude"] else { return }
30
+ circle?.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
31
+ circle?.radius = radius
32
+ }
33
+
34
+ func getRenderer() -> MAOverlayRenderer {
35
+ if renderer == nil, let circle = circle {
36
+ renderer = MACircleRenderer(circle: circle)
37
+ renderer?.fillColor = ColorParser.parseColor(fillColor) ?? UIColor.clear
38
+ renderer?.strokeColor = ColorParser.parseColor(strokeColor) ?? UIColor.clear
39
+ renderer?.lineWidth = CGFloat(strokeWidth)
40
+ }
41
+ return renderer!
42
+ }
43
+
44
+ /**
45
+ * 设置中心点
46
+ */
47
+ func setCenter(_ center: [String: Double]) {
48
+ circleCenter = center
49
+ renderer = nil
50
+ updateCircle()
51
+ }
52
+
53
+ func setRadius(_ radius: Double) {
54
+ self.radius = radius
55
+ renderer = nil
56
+ updateCircle()
57
+ }
58
+
59
+ func setFillColor(_ color: Any?) {
60
+ fillColor = color
61
+ renderer = nil
62
+ updateCircle()
63
+ }
64
+
65
+ func setStrokeColor(_ color: Any?) {
66
+ strokeColor = color
67
+ renderer = nil
68
+ updateCircle()
69
+ }
70
+
71
+ func setStrokeWidth(_ width: Float) {
72
+ strokeWidth = width
73
+ renderer = nil
74
+ updateCircle()
75
+ }
76
+ }
@@ -0,0 +1,56 @@
1
+ import ExpoModulesCore
2
+ import MAMapKit
3
+
4
+ class ClusterView: ExpoView {
5
+ var points: [[String: Any]] = []
6
+ var radius: Int = 100
7
+ var minClusterSize: Int = 2
8
+
9
+ private var mapView: MAMapView?
10
+ private var annotations: [MAPointAnnotation] = []
11
+
12
+ required init(appContext: AppContext? = nil) {
13
+ super.init(appContext: appContext)
14
+ }
15
+
16
+ func setMap(_ map: MAMapView) {
17
+ self.mapView = map
18
+ updateCluster()
19
+ }
20
+
21
+ func setPoints(_ points: [[String: Any]]) {
22
+ self.points = points
23
+ updateCluster()
24
+ }
25
+
26
+ func setRadius(_ radius: Int) {
27
+ self.radius = radius
28
+ updateCluster()
29
+ }
30
+
31
+ func setMinClusterSize(_ size: Int) {
32
+ self.minClusterSize = size
33
+ updateCluster()
34
+ }
35
+
36
+ private func updateCluster() {
37
+ guard let mapView = mapView else { return }
38
+
39
+ for annotation in annotations {
40
+ mapView.removeAnnotation(annotation)
41
+ }
42
+ annotations.removeAll()
43
+
44
+ for point in points {
45
+ guard let latitude = point["latitude"] as? Double,
46
+ let longitude = point["longitude"] as? Double else {
47
+ continue
48
+ }
49
+
50
+ let annotation = MAPointAnnotation()
51
+ annotation.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
52
+ mapView.addAnnotation(annotation)
53
+ annotations.append(annotation)
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,98 @@
1
+ import ExpoModulesCore
2
+ import MAMapKit
3
+
4
+ class HeatMapView: ExpoView {
5
+ var data: [[String: Any]] = []
6
+ var radius: Int = 50
7
+ var opacity: Double = 0.6
8
+
9
+ private var mapView: MAMapView?
10
+ private var heatmapOverlay: MAHeatMapTileOverlay?
11
+
12
+ required init(appContext: AppContext? = nil) {
13
+ super.init(appContext: appContext)
14
+ }
15
+
16
+ /**
17
+ * 设置地图实例
18
+ */
19
+ func setMap(_ map: MAMapView) {
20
+ self.mapView = map
21
+ createOrUpdateHeatMap()
22
+ }
23
+
24
+ /**
25
+ * 设置热力图数据
26
+ */
27
+ func setData(_ data: [[String: Any]]) {
28
+ self.data = data
29
+ createOrUpdateHeatMap()
30
+ }
31
+
32
+ /**
33
+ * 设置热力图半径
34
+ */
35
+ func setRadius(_ radius: Int) {
36
+ self.radius = radius
37
+ createOrUpdateHeatMap()
38
+ }
39
+
40
+ /**
41
+ * 设置透明度
42
+ */
43
+ func setOpacity(_ opacity: Double) {
44
+ self.opacity = opacity
45
+ createOrUpdateHeatMap()
46
+ }
47
+
48
+ /**
49
+ * 创建或更新热力图
50
+ */
51
+ private func createOrUpdateHeatMap() {
52
+ guard let mapView = mapView else { return }
53
+
54
+ // 移除旧的热力图
55
+ if let oldHeatmap = heatmapOverlay {
56
+ mapView.remove(oldHeatmap)
57
+ }
58
+
59
+ // 创建热力图数据
60
+ var heatmapData: [MAHeatMapNode] = []
61
+ for point in data {
62
+ guard let latitude = point["latitude"] as? Double,
63
+ let longitude = point["longitude"] as? Double else {
64
+ continue
65
+ }
66
+
67
+ let node = MAHeatMapNode()
68
+ node.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
69
+ node.intensity = 1.0 // 默认强度
70
+ heatmapData.append(node)
71
+ }
72
+
73
+ guard !heatmapData.isEmpty else { return }
74
+
75
+ // 创建热力图图层
76
+ let heatmap = MAHeatMapTileOverlay()
77
+ heatmap.data = heatmapData
78
+ heatmap.radius = radius
79
+ heatmap.opacity = CGFloat(opacity)
80
+
81
+ mapView.add(heatmap)
82
+ heatmapOverlay = heatmap
83
+ }
84
+
85
+ /**
86
+ * 移除热力图
87
+ */
88
+ func removeHeatMap() {
89
+ guard let mapView = mapView, let heatmap = heatmapOverlay else { return }
90
+ mapView.remove(heatmap)
91
+ heatmapOverlay = nil
92
+ }
93
+
94
+ override func removeFromSuperview() {
95
+ super.removeFromSuperview()
96
+ removeHeatMap()
97
+ }
98
+ }
@@ -0,0 +1,81 @@
1
+ import ExpoModulesCore
2
+ import MAMapKit
3
+
4
+ class MarkerView: ExpoView {
5
+ var position: [String: Double] = [:]
6
+ var title: String = ""
7
+ var markerDescription: String = ""
8
+ var draggable: Bool = false
9
+
10
+ private var mapView: MAMapView?
11
+ private var annotation: MAPointAnnotation?
12
+
13
+ required init(appContext: AppContext? = nil) {
14
+ super.init(appContext: appContext)
15
+ }
16
+
17
+ /**
18
+ * 设置地图实例
19
+ */
20
+ func setMap(_ map: MAMapView) {
21
+ self.mapView = map
22
+ updateAnnotation()
23
+ }
24
+
25
+ /**
26
+ * 更新标记
27
+ */
28
+ private func updateAnnotation() {
29
+ guard let mapView = mapView,
30
+ let latitude = position["latitude"],
31
+ let longitude = position["longitude"] else {
32
+ return
33
+ }
34
+
35
+ // 移除旧的标记
36
+ if let oldAnnotation = annotation {
37
+ mapView.removeAnnotation(oldAnnotation)
38
+ }
39
+
40
+ // 创建新的标记
41
+ let annotation = MAPointAnnotation()
42
+ annotation.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
43
+ annotation.title = title
44
+ annotation.subtitle = markerDescription
45
+
46
+ mapView.addAnnotation(annotation)
47
+ self.annotation = annotation
48
+ }
49
+
50
+ /**
51
+ * 设置位置
52
+ */
53
+ func setPosition(_ position: [String: Double]) {
54
+ self.position = position
55
+ updateAnnotation()
56
+ }
57
+
58
+ /**
59
+ * 设置标题
60
+ */
61
+ func setTitle(_ title: String) {
62
+ self.title = title
63
+ updateAnnotation()
64
+ }
65
+
66
+ /**
67
+ * 设置描述
68
+ */
69
+ func setDescription(_ description: String) {
70
+ self.markerDescription = description
71
+ updateAnnotation()
72
+ }
73
+
74
+ /**
75
+ * 设置是否可拖拽
76
+ */
77
+ func setDraggable(_ draggable: Bool) {
78
+ self.draggable = draggable
79
+ // iOS 高德地图标记默认不可拖拽,需要自定义实现
80
+ }
81
+ }
@@ -0,0 +1,50 @@
1
+ import ExpoModulesCore
2
+ import MAMapKit
3
+
4
+ class MultiPointView: ExpoView {
5
+ var points: [[String: Any]] = []
6
+
7
+ private var mapView: MAMapView?
8
+ private var multiPointOverlay: MAMultiPointOverlay?
9
+
10
+ required init(appContext: AppContext? = nil) {
11
+ super.init(appContext: appContext)
12
+ }
13
+
14
+ func setMap(_ map: MAMapView) {
15
+ self.mapView = map
16
+ updateMultiPoint()
17
+ }
18
+
19
+ func setPoints(_ points: [[String: Any]]) {
20
+ self.points = points
21
+ updateMultiPoint()
22
+ }
23
+
24
+ private func updateMultiPoint() {
25
+ guard let mapView = mapView else { return }
26
+
27
+ if let oldOverlay = multiPointOverlay {
28
+ mapView.remove(oldOverlay)
29
+ }
30
+
31
+ var items: [MAMultiPointItem] = []
32
+ for point in points {
33
+ guard let latitude = point["latitude"] as? Double,
34
+ let longitude = point["longitude"] as? Double else {
35
+ continue
36
+ }
37
+
38
+ let item = MAMultiPointItem()
39
+ item.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
40
+ items.append(item)
41
+ }
42
+
43
+ guard !items.isEmpty else { return }
44
+
45
+ let overlay = MAMultiPointOverlay(multiPointItems: items)
46
+
47
+ mapView.add(overlay)
48
+ multiPointOverlay = overlay
49
+ }
50
+ }