expo-gaode-map 0.1.4 → 0.1.6

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 (325) hide show
  1. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapModule.kt +5 -1
  2. package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapView.kt +4 -4
  3. package/android/src/main/java/expo/modules/gaodemap/managers/OverlayManager.kt +34 -2
  4. package/android/src/main/java/expo/modules/gaodemap/overlays/PolylineView.kt +54 -3
  5. package/build/components/overlays/Polyline.d.ts.map +1 -1
  6. package/build/components/overlays/Polyline.js +12 -14
  7. package/build/components/overlays/Polyline.js.map +1 -1
  8. package/build/types/map-view.types.d.ts +2 -2
  9. package/build/types/map-view.types.d.ts.map +1 -1
  10. package/build/types/map-view.types.js.map +1 -1
  11. package/build/types/overlays.types.d.ts +5 -0
  12. package/build/types/overlays.types.d.ts.map +1 -1
  13. package/build/types/overlays.types.js.map +1 -1
  14. package/docs/API.md +2 -2
  15. package/docs/EXAMPLES.md +67 -6
  16. package/ios/ExpoGaodeMapModule.swift +13 -2
  17. package/ios/ExpoGaodeMapView.swift +2 -2
  18. package/ios/managers/OverlayManager.swift +89 -23
  19. package/ios/overlays/PolylineView.swift +63 -1
  20. package/ios/{ColorParser.swift → utils/ColorParser.swift} +13 -7
  21. package/package.json +1 -1
  22. package/src/components/overlays/Polyline.tsx +13 -16
  23. package/src/types/map-view.types.ts +2 -2
  24. package/src/types/overlays.types.ts +6 -0
  25. package/ios/UIColorExtension.swift +0 -11
  26. package/lib/android/.gradle/8.9/checksums/checksums.lock +0 -0
  27. package/lib/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  28. package/lib/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  29. package/lib/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  30. package/lib/android/.gradle/8.9/gc.properties +0 -0
  31. package/lib/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  32. package/lib/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  33. package/lib/android/.gradle/vcs-1/gc.properties +0 -0
  34. package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/results.bin +0 -1
  35. package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/transformed/classes/classes_dex/classes.dex +0 -0
  36. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/results.bin +0 -1
  37. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/AMap3DPackage.dex +0 -0
  38. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/BuildConfig.dex +0 -0
  39. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.dex +0 -0
  40. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt.dex +0 -0
  41. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Circle.dex +0 -0
  42. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/CircleManager.dex +0 -0
  43. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMap.dex +0 -0
  44. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMapManager.dex +0 -0
  45. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$7.dex +0 -0
  46. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$8.dex +0 -0
  47. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$animateCallback$1.dex +0 -0
  48. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView.dex +0 -0
  49. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$1.dex +0 -0
  50. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$2.dex +0 -0
  51. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager.dex +0 -0
  52. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker$setIcon$1.dex +0 -0
  53. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker.dex +0 -0
  54. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager$Companion.dex +0 -0
  55. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager.dex +0 -0
  56. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.dex +0 -0
  57. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint.dex +0 -0
  58. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPointManager.dex +0 -0
  59. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Overlay.dex +0 -0
  60. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polygon.dex +0 -0
  61. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolygonManager.dex +0 -0
  62. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polyline.dex +0 -0
  63. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolylineManager.dex +0 -0
  64. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/modules/SdkModule.dex +0 -0
  65. package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/desugar_graph.bin +0 -0
  66. package/lib/android/build/generated/source/buildConfig/debug/qiuxiang/amap3d/BuildConfig.java +0 -10
  67. package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -14
  68. package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
  69. package/lib/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -6
  70. package/lib/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  71. package/lib/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  72. package/lib/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  73. package/lib/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1
  74. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-hdpi-v4_positio_icon.png.flat +0 -0
  75. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-mdpi-v4_positio_icon.png.flat +0 -0
  76. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xhdpi-v4_positio_icon.png.flat +0 -0
  77. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxhdpi-v4_positio_icon.png.flat +0 -0
  78. package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxxhdpi-v4_positio_icon.png.flat +0 -0
  79. package/lib/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -6
  80. package/lib/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  81. package/lib/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  82. package/lib/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  83. package/lib/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  84. package/lib/android/build/intermediates/java_res/debug/out/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  85. package/lib/android/build/intermediates/javac/debug/classes/qiuxiang/amap3d/BuildConfig.class +0 -0
  86. package/lib/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -3
  87. package/lib/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -26
  88. package/lib/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -14
  89. package/lib/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  90. package/lib/android/build/intermediates/packaged_res/debug/drawable-hdpi-v4/positio_icon.png +0 -0
  91. package/lib/android/build/intermediates/packaged_res/debug/drawable-mdpi-v4/positio_icon.png +0 -0
  92. package/lib/android/build/intermediates/packaged_res/debug/drawable-xhdpi-v4/positio_icon.png +0 -0
  93. package/lib/android/build/intermediates/packaged_res/debug/drawable-xxhdpi-v4/positio_icon.png +0 -0
  94. package/lib/android/build/intermediates/packaged_res/debug/drawable-xxxhdpi-v4/positio_icon.png +0 -0
  95. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  96. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
  97. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/BuildConfig.class +0 -0
  98. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
  99. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
  100. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
  101. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
  102. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
  103. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
  104. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
  105. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
  106. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
  107. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
  108. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
  109. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
  110. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
  111. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
  112. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
  113. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
  114. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
  115. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
  116. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
  117. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
  118. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
  119. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
  120. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
  121. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
  122. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
  123. package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
  124. package/lib/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  125. package/lib/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -2
  126. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  127. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  128. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  129. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  130. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  131. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  132. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  133. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  134. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  135. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  136. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  137. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  138. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  139. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  140. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  141. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  142. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  143. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  144. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  145. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  146. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  147. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  148. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  149. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  150. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  151. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  152. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  153. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  154. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  155. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  156. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  157. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  158. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  159. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  160. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  161. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  162. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  163. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  164. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  165. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  166. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  167. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  168. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  169. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  170. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  171. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  172. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  173. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  174. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  175. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  176. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  177. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  178. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  179. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  180. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  181. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  182. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  183. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  184. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  185. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  186. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  187. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  188. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  189. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  190. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  191. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  192. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  193. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  194. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  195. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  196. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  197. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  198. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  199. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  200. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  201. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  202. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  203. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  204. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  205. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  206. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  207. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  208. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  209. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  210. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  211. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  212. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  213. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  214. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  215. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  216. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  217. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +0 -1
  218. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  219. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  220. package/lib/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  221. package/lib/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  222. package/lib/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  223. package/lib/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -41
  224. package/lib/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  225. package/lib/android/build/tmp/kotlin-classes/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
  226. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
  227. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
  228. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
  229. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
  230. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
  231. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
  232. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
  233. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
  234. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
  235. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
  236. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
  237. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
  238. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
  239. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
  240. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
  241. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
  242. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
  243. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
  244. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
  245. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
  246. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
  247. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
  248. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
  249. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
  250. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
  251. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
  252. package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
  253. package/lib/android/build.gradle +0 -34
  254. package/lib/android/drawable/rn_edit_text_material.xml +0 -37
  255. package/lib/android/drawable-hdpi/positio_icon.png +0 -0
  256. package/lib/android/drawable-hdpi/splashscreen_image.png +0 -0
  257. package/lib/android/drawable-mdpi/splashscreen_image.png +0 -0
  258. package/lib/android/drawable-xhdpi/splashscreen_image.png +0 -0
  259. package/lib/android/drawable-xxhdpi/splashscreen_image.png +0 -0
  260. package/lib/android/drawable-xxxhdpi/splashscreen_image.png +0 -0
  261. package/lib/android/src/main/AndroidManifest.xml +0 -10
  262. package/lib/android/src/main/java/qiuxiang/amap3d/AMap3DPackage.kt +0 -30
  263. package/lib/android/src/main/java/qiuxiang/amap3d/Utils.kt +0 -114
  264. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Circle.kt +0 -65
  265. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/CircleManager.kt +0 -49
  266. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMap.kt +0 -32
  267. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMapManager.kt +0 -33
  268. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapView.kt +0 -190
  269. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapViewManager.kt +0 -181
  270. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Marker.kt +0 -102
  271. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MarkerManager.kt +0 -78
  272. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPoint.kt +0 -53
  273. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPointManager.kt +0 -33
  274. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Overlay.kt +0 -8
  275. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polygon.kt +0 -58
  276. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolygonManager.kt +0 -44
  277. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polyline.kt +0 -69
  278. package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolylineManager.kt +0 -64
  279. package/lib/android/src/main/java/qiuxiang/amap3d/modules/AMapGeolocationModule.kt +0 -468
  280. package/lib/android/src/main/java/qiuxiang/amap3d/modules/SdkModule.kt +0 -31
  281. package/lib/android/src/main/res/drawable-hdpi/positio_icon.png +0 -0
  282. package/lib/android/src/main/res/drawable-mdpi/positio_icon.png +0 -0
  283. package/lib/android/src/main/res/drawable-xhdpi/positio_icon.png +0 -0
  284. package/lib/android/src/main/res/drawable-xxhdpi/positio_icon.png +0 -0
  285. package/lib/android/src/main/res/drawable-xxxhdpi/positio_icon.png +0 -0
  286. package/lib/ios/.swiftformat +0 -2
  287. package/lib/ios/Bridging-Header.h +0 -4
  288. package/lib/ios/MapView/CircleManager.m +0 -11
  289. package/lib/ios/MapView/CircleManager.swift +0 -30
  290. package/lib/ios/MapView/HeatMapManager.m +0 -9
  291. package/lib/ios/MapView/HeatMapManager.swift +0 -29
  292. package/lib/ios/MapView/MapViewManager.m +0 -35
  293. package/lib/ios/MapView/MapViewManager.swift +0 -188
  294. package/lib/ios/MapView/MarkerManager.m +0 -18
  295. package/lib/ios/MapView/MarkerManager.swift +0 -100
  296. package/lib/ios/MapView/MultiPointManager.m +0 -9
  297. package/lib/ios/MapView/MultiPointManager.swift +0 -47
  298. package/lib/ios/MapView/Overlay.swift +0 -4
  299. package/lib/ios/MapView/PolygonManager.m +0 -10
  300. package/lib/ios/MapView/PolygonManager.swift +0 -30
  301. package/lib/ios/MapView/PolylineManager.m +0 -12
  302. package/lib/ios/MapView/PolylineManager.swift +0 -41
  303. package/lib/ios/Modules/SdkModule.m +0 -8
  304. package/lib/ios/Modules/SdkModule.swift +0 -16
  305. package/lib/ios/RNAMapGeolocation.h +0 -8
  306. package/lib/ios/RNAMapGeolocation.m +0 -302
  307. package/lib/ios/Utils.swift +0 -104
  308. package/lib/ios/react-native-amap3d.podspec +0 -21
  309. package/lib/src/circle.tsx +0 -36
  310. package/lib/src/cluster/cluster-view.tsx +0 -58
  311. package/lib/src/cluster/index.tsx +0 -159
  312. package/lib/src/component.ts +0 -31
  313. package/lib/src/geolocation/index.d.ts +0 -287
  314. package/lib/src/geolocation/index.js +0 -344
  315. package/lib/src/heat-map.tsx +0 -21
  316. package/lib/src/index.ts +0 -13
  317. package/lib/src/location/index.d.ts +0 -287
  318. package/lib/src/location/index.js +0 -344
  319. package/lib/src/map-view.tsx +0 -230
  320. package/lib/src/marker.tsx +0 -128
  321. package/lib/src/multi-point.tsx +0 -28
  322. package/lib/src/polygon.tsx +0 -31
  323. package/lib/src/polyline.tsx +0 -65
  324. package/lib/src/sdk.ts +0 -11
  325. package/lib/src/types.ts +0 -137
@@ -1,302 +0,0 @@
1
- #import "RNAMapGeolocation.h"
2
-
3
- @implementation RNAMapGeolocation {
4
- AMapLocationManager *_manager;
5
- CLLocationManager *_clManager;
6
- BOOL _isStarted;
7
- BOOL _locatingWithReGeocode;
8
- }
9
-
10
- RCT_EXPORT_MODULE()
11
-
12
- - (dispatch_queue_t)methodQueue {
13
- return dispatch_get_main_queue();
14
- }
15
-
16
- + (BOOL)requiresMainQueueSetup {
17
- return YES;
18
- }
19
-
20
- RCT_EXPORT_METHOD(setApiKey:(NSString *)apiKey) {
21
- [AMapServices sharedServices].apiKey = apiKey;
22
- _manager = [[AMapLocationManager alloc] init];
23
- _manager.delegate = self;
24
- [AMapLocationManager updatePrivacyAgree:AMapPrivacyAgreeStatusDidAgree];
25
- [AMapLocationManager updatePrivacyShow:AMapPrivacyShowStatusDidShow privacyInfo:AMapPrivacyInfoStatusDidContain];
26
- [_manager setDesiredAccuracy: kCLLocationAccuracyHundredMeters];
27
- [_manager setPausesLocationUpdatesAutomatically: NO];
28
- [[AMapServices sharedServices] setEnableHTTPS:YES];
29
- _clManager = [CLLocationManager new];
30
- _locatingWithReGeocode = NO;
31
- _isStarted = NO;
32
- }
33
-
34
- // 定位超时时间,最低2s,默认设置为2s
35
- RCT_EXPORT_METHOD(setLocationTimeout: (int)value) {
36
- _manager.locationTimeout = value;
37
- }
38
- // 逆地理请求超时时间,最低2s,默认设置为2s
39
- RCT_EXPORT_METHOD(setReGeocodeTimeout: (int)value) {
40
- _manager.reGeocodeTimeout = value;
41
- }
42
-
43
- // 设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新位置信息。
44
- RCT_EXPORT_METHOD(setDistanceFilter : (int)value) {
45
- _manager.distanceFilter = value;
46
- }
47
- // 用于指定所需的精度级别。 定位服务将尽最大努力达到您想要的精度。 但是,不能保证。
48
- // 为了优化电源性能,请确保为您的使用情况指定适当的精度(例如,当仅需要粗略位置时,使用较大的精度值)。
49
- // 0 => kCLLocationAccuracyBestForNavigation
50
- // 1 => kCLLocationAccuracyBest
51
- // 2 => kCLLocationAccuracyNearestTenMeters
52
- // 3 => kCLLocationAccuracyHundredMeters
53
- // 4 => kCLLocationAccuracyKilometer
54
- // 5 => kCLLocationAccuracyThreeKilometers
55
- RCT_EXPORT_METHOD(setDesiredAccuracy: (NSInteger)accuracy) {
56
- switch (accuracy) {
57
- case 0:
58
- [_manager setDesiredAccuracy: kCLLocationAccuracyBestForNavigation];
59
- break;
60
- case 1:
61
- [_manager setDesiredAccuracy: kCLLocationAccuracyBest];
62
- break;
63
- case 2:
64
- [_manager setDesiredAccuracy: kCLLocationAccuracyNearestTenMeters];
65
- break;
66
- case 3:
67
- [_manager setDesiredAccuracy: kCLLocationAccuracyHundredMeters];
68
- break;
69
- case 4:
70
- [_manager setDesiredAccuracy: kCLLocationAccuracyKilometer];
71
- break;
72
- case 5:
73
- [_manager setDesiredAccuracy: kCLLocationAccuracyThreeKilometers];
74
- break;
75
- default:
76
- break;
77
- }
78
- }
79
-
80
- // 是否已经开始定位了
81
- RCT_REMAP_METHOD(isStarted, resolver: (RCTPromiseResolveBlock)resolve
82
- rejecter:(RCTPromiseRejectBlock)reject) {
83
- resolve(@(_isStarted));
84
- }
85
-
86
- // 开始定位
87
- RCT_EXPORT_METHOD(start) {
88
- _isStarted = YES;
89
- [_manager startUpdatingLocation];
90
- }
91
-
92
- // 停止更新位置信息
93
- RCT_EXPORT_METHOD(stop) {
94
- _isStarted = NO;
95
- [_manager stopUpdatingLocation];
96
- }
97
-
98
- // 开始获取设备朝向,如果设备支持方向识别,则会通过代理回调方法-wx
99
- RCT_EXPORT_METHOD(startUpdatingHeading) {
100
- [_manager startUpdatingHeading];
101
- }
102
- // 停止获取设备朝向-wx
103
- RCT_EXPORT_METHOD(stopUpdatingHeading) {
104
- [_manager stopUpdatingHeading];
105
- }
106
-
107
- // 定位是否返回逆地理信息,默认NO。
108
- RCT_EXPORT_METHOD(setLocatingWithReGeocode: (BOOL)value) {
109
- _locatingWithReGeocode = value;
110
- [_manager setLocatingWithReGeocode: value];
111
- }
112
-
113
- // 逆地址语言类型,默认是AMapLocationRegionLanguageDefault
114
- // AMapLocationReGeocodeLanguageDefault = 0, ///<默认,根据地区选择语言
115
- // AMapLocationReGeocodeLanguageChinse = 1, ///<中文
116
- // AMapLocationReGeocodeLanguageEnglish = 2, ///<英文
117
- RCT_EXPORT_METHOD(setGeoLanguage : (int)value) {
118
- _manager.reGeocodeLanguage = (AMapLocationReGeocodeLanguage)value;
119
- }
120
-
121
- // 指定定位是否会被系统自动暂停。默认为NO。
122
- RCT_EXPORT_METHOD(setPausesLocationUpdatesAutomatically: (BOOL)value) {
123
- _manager.pausesLocationUpdatesAutomatically = value;
124
- }
125
- // 是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。
126
- // 设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。
127
- RCT_EXPORT_METHOD(setAllowsBackgroundLocationUpdates: (BOOL)value) {
128
- _manager.allowsBackgroundLocationUpdates = value;
129
- }
130
-
131
- /**
132
- * @brief 转换目标经纬度为高德坐标系,不在枚举范围内的经纬度将直接返回。
133
- * @param coordinate 待转换的经纬度
134
- * @param typeNum 坐标系类型,对应的序号
135
- * @return 高德坐标系经纬度
136
- * https://lbs.amap.com/api/ios-sdk/guide/computing-equipment/amap-calculate-tool
137
- */
138
- RCT_EXPORT_METHOD(coordinateConvert:
139
- (CLLocationCoordinate2D) coordinate
140
- typer:(NSInteger)typeNum
141
- resolver: (RCTPromiseResolveBlock)resolve
142
- rejecter:(RCTPromiseRejectBlock)reject)
143
- {
144
- AMapCoordinateType typeObj;
145
- switch (typeNum) {
146
- case -1:
147
- typeObj = AMapCoordinateTypeAMap;
148
- break;
149
- case 0:
150
- typeObj = AMapCoordinateTypeBaidu;
151
- break;
152
- case 1:
153
- typeObj = AMapCoordinateTypeMapBar;
154
- break;
155
- case 2:
156
- typeObj = AMapCoordinateTypeMapABC;
157
- break;
158
- case 3:
159
- typeObj = AMapCoordinateTypeSoSoMap;
160
- break;
161
- case 4:
162
- typeObj = AMapCoordinateTypeAliYun;
163
- break;
164
- case 5:
165
- typeObj = AMapCoordinateTypeGoogle;
166
- break;
167
- case 6:
168
- typeObj = AMapCoordinateTypeGPS;
169
- break;
170
- default:
171
- typeObj = AMapCoordinateTypeGPS;
172
- break;
173
- }
174
-
175
- CLLocationCoordinate2D amapcoord = AMapCoordinateConvert(CLLocationCoordinate2DMake(coordinate.latitude, coordinate.longitude), typeObj);
176
- resolve(@{
177
- @"latitude": [NSNumber numberWithDouble:amapcoord.latitude],
178
- @"longitude": [NSNumber numberWithDouble:amapcoord.longitude]
179
- });
180
- }
181
-
182
- // 获取当前定位
183
- // 默认只获取经纬度,通过 setLocatingWithReGeocode 设置,是否返回逆地理信息
184
- RCT_EXPORT_METHOD(getCurrentLocation: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
185
- CLAuthorizationStatus status = [CLLocationManager authorizationStatus];
186
- [_clManager requestWhenInUseAuthorization];
187
- NSLog(@"reGeocode:逆地理信息");
188
- // - kCLAuthorizationStatusAuthorizedWhenInUse 用户已授权仅在使用您的应用程序时使用其位置。
189
- // - kCLAuthorizationStatusAuthorizedAlways 用户已授权在任何时间使用其位置。
190
- // - kCLAuthorizationStatusNotDetermined 用户尚未对此应用做出选择
191
- if (status == kCLAuthorizationStatusAuthorizedAlways || status == kCLAuthorizationStatusAuthorizedWhenInUse || status == kCLAuthorizationStatusNotDetermined) {
192
- [_manager requestLocationWithReGeocode: _locatingWithReGeocode completionBlock:^(CLLocation *location, AMapLocationReGeocode *regeocode, NSError *error) {
193
- if (error) {
194
- reject([NSString stringWithFormat:@"%ld",(long)error.code], error.localizedDescription, error);
195
- } else {
196
- NSLog(@"location:定位信息:%@", location);
197
- NSLog(@"regeocode:逆地理信息:%@", regeocode);
198
- if (regeocode) {
199
- NSLog(@"reGeocode:逆地理信息:%@", regeocode);
200
- }
201
- id json = [self json:location reGeocode:regeocode];
202
- [NSUserDefaults.standardUserDefaults setObject: json forKey: RNAMapGeolocation.storeKey];
203
- resolve(json);
204
- }
205
- }];
206
- } else {
207
- reject(@"-10086", @"location unauthorized", nil);
208
- }
209
- }
210
-
211
- + (NSString *)storeKey {
212
- return @"RNAMapGeolocation";
213
- }
214
-
215
- - (id)json:(CLLocation *)location reGeocode:(AMapLocationReGeocode *)reGeocode {
216
-
217
- BOOL flag = AMapLocationDataAvailableForCoordinate(location.coordinate);
218
- // 逆地理信息
219
- if (reGeocode) {
220
- return @{
221
- @"accuracy" : @(location.horizontalAccuracy),
222
- @"latitude" : @(location.coordinate.latitude),
223
- @"longitude" : @(location.coordinate.longitude),
224
- @"altitude" : @(location.altitude),
225
- @"speed" : @(location.speed),
226
- @"heading" : @(location.course),
227
- @"timestamp" : @(location.timestamp.timeIntervalSince1970 * 1000),
228
- @"isAvailableCoordinate": @(flag),
229
-
230
- @"address" : reGeocode.formattedAddress ? reGeocode.formattedAddress : @"",
231
- @"country" : reGeocode.country ? reGeocode.country : @"",
232
- @"province" : reGeocode.province ? reGeocode.province : @"",
233
- @"city" : reGeocode.city ? reGeocode.city : @"",
234
- @"district" : reGeocode.district ? reGeocode.district : @"",
235
- @"cityCode" : reGeocode.citycode ? reGeocode.citycode : @"",
236
- @"adCode" : reGeocode.adcode ? reGeocode.adcode : @"",
237
- @"street" : reGeocode.street ? reGeocode.street : @"",
238
- @"streetNumber" : reGeocode.number ? reGeocode.number : @"",
239
- @"poiName" : reGeocode.POIName ? reGeocode.POIName : @"",
240
- @"aoiName" : reGeocode.AOIName ? reGeocode.AOIName : @"",
241
- };
242
-
243
- } else {
244
- // 定位信息
245
- return @{
246
- @"accuracy": @(location.horizontalAccuracy),
247
- @"latitude": @(location.coordinate.latitude),
248
- @"longitude": @(location.coordinate.longitude),
249
- @"isAvailableCoordinate": @(flag),
250
- @"altitude": @(location.altitude),
251
- @"speed": @(location.speed),
252
- @"heading": @(location.course),
253
- @"timestamp": @(location.timestamp.timeIntervalSince1970 * 1000),
254
- };
255
- }
256
- }
257
-
258
- /**
259
- * @brief 当plist配置NSLocationAlwaysUsageDescription或者NSLocationAlwaysAndWhenInUseUsageDescription,
260
- * 并且[CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined,会调用代理的此方法。
261
- * 此方法实现申请后台权限API即可:[locationManager requestAlwaysAuthorization](必须调用,不然无法正常获取定位权限)
262
- * @param manager 地理围栏管理类。
263
- * @param locationManager 需要申请后台定位权限的locationManager。
264
- * @since 2.6.2
265
- */
266
- - (void)amapLocationManager:(AMapLocationManager *)manager
267
- doRequireLocationAuth:(CLLocationManager *)locationManager {
268
- [locationManager requestAlwaysAuthorization];
269
- }
270
-
271
- - (NSArray<NSString *> *)supportedEvents {
272
- return @[ @"AMapGeolocation" ];
273
- }
274
-
275
- /**
276
- * @brief 连续定位回调函数.注意:如果实现了本方法,则定位信息不会通过amapLocationManager:didUpdateLocation:方法回调。
277
- * @param manager 定位 AMapLocationManager 类。
278
- * @param location 定位结果。
279
- * @param reGeocode 逆地理信息。
280
- */
281
- - (void)amapLocationManager:(AMapLocationManager *)manager
282
- didUpdateLocation:(CLLocation *)location
283
- reGeocode:(AMapLocationReGeocode *)reGeocode
284
- {
285
- id json = [self json:location reGeocode:reGeocode];
286
- [self sendEventWithName: @"AMapGeolocation" body:json];
287
- }
288
-
289
- /**
290
- * @brief 当定位发生错误时,会调用代理的此方法。
291
- * @param manager 定位 AMapLocationManager 类。
292
- * @param error 返回的错误,参考 CLError 。
293
- */
294
- - (void)amapLocationManager:(AMapLocationManager *)manager didFailWithError:(NSError *)error {
295
- [self sendEventWithName: @"AMapGeolocation"
296
- body: @{
297
- @"errorCode": @(error.code),
298
- @"errorInfo": error.localizedDescription,
299
- }];
300
- }
301
-
302
- @end
@@ -1,104 +0,0 @@
1
- extension NSDictionary {
2
- var coordinate: CLLocationCoordinate2D {
3
- CLLocationCoordinate2DMake(self["latitude"] as! Double, self["longitude"] as! Double)
4
- }
5
-
6
- var point: CGPoint {
7
- CGPoint(x: self["x"] as! Double, y: self["y"] as! Double)
8
- }
9
- }
10
-
11
- extension CLLocationCoordinate2D {
12
- var json: [String: Double] {
13
- ["latitude": latitude, "longitude": longitude]
14
- }
15
- }
16
-
17
- extension MAUserLocation {
18
- var json: [String: Any] {
19
- [
20
- "coords": [
21
- "latitude": coordinate.latitude,
22
- "longitude": coordinate.longitude,
23
- "altitude": location?.altitude ?? 0,
24
- "heading": heading?.trueHeading,
25
- "accuracy": location?.horizontalAccuracy ?? 0,
26
- "speed": location?.speed ?? 0,
27
- ],
28
- "timestamp": NSDate().timeIntervalSince1970 * 1000,
29
- ]
30
- }
31
- }
32
-
33
- extension MACoordinateRegion {
34
- var json: [String: Any] {
35
- [
36
- "southwest": [
37
- "latitude": center.latitude - span.latitudeDelta / 2,
38
- "longitude": center.longitude - span.longitudeDelta / 2,
39
- ],
40
- "northeast": [
41
- "latitude": center.latitude + span.latitudeDelta / 2,
42
- "longitude": center.longitude + span.longitudeDelta / 2,
43
- ],
44
- ]
45
- }
46
- }
47
-
48
- extension MAMapStatus {
49
- var json: [String: Any] {
50
- [
51
- "target": centerCoordinate.json,
52
- "zoom": zoomLevel,
53
- "bearing": rotationDegree,
54
- "tilt": cameraDegree,
55
- ]
56
- }
57
- }
58
-
59
- extension MAMapView {
60
- var cameraEvent: [String: Any] {
61
- [
62
- "cameraPosition": getMapStatus().json,
63
- "latLngBounds": region.json,
64
- ]
65
- }
66
- }
67
-
68
- extension Double {
69
- var cgFloat: CGFloat {
70
- CGFloat(self)
71
- }
72
- }
73
-
74
- extension RCTConvert {
75
- @objc static func MAMapType(_ json: Any) -> MAMapType {
76
- MAMapKit.MAMapType(rawValue: json as! NSInteger)!
77
- }
78
- }
79
-
80
- extension RCTImageLoader {
81
- func loadImage(_ icon: NSDictionary?, callback: @escaping (UIImage) -> Void) {
82
- if icon == nil {
83
- return
84
- }
85
- let width = icon?["width"] as? Double ?? 0
86
- let height = icon?["height"] as? Double ?? 0
87
- loadImage(
88
- with: RCTConvert.nsurlRequest(icon),
89
- size: CGSize(width: width, height: height),
90
- scale: RCTScreenScale(),
91
- clipped: false,
92
- resizeMode: RCTResizeMode.cover,
93
- progressBlock: { _, _ in },
94
- partialLoad: { _ in },
95
- completionBlock: { _, image in
96
- if image != nil {
97
- DispatchQueue.main.async {
98
- callback(image!)
99
- }
100
- }
101
- }
102
- )
103
- }
104
- }
@@ -1,21 +0,0 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "../../package.json")))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = "react-native-amap3d"
7
- s.version = package["version"]
8
- s.summary = package["description"]
9
- s.homepage = package["homepage"]
10
- s.license = package["license"]
11
- s.authors = package["author"]
12
-
13
- s.platforms = { :ios => "10.0" }
14
- s.source = { :git => "https://github.com/qiuxiang/react-native-amap3d.git", :tag => "#{s.version}" }
15
-
16
- s.source_files = "**/*.{h,m,mm,swift}"
17
-
18
- s.dependency "React-Core"
19
- s.dependency 'AMap3DMap', '10.0.600'
20
- s.dependency "AMapLocation"
21
- end
@@ -1,36 +0,0 @@
1
- import { requireNativeComponent } from "react-native";
2
- import { LatLng } from "./types";
3
-
4
- export interface CircleProps {
5
- /**
6
- * 圆点坐标
7
- */
8
- center: LatLng;
9
-
10
- /**
11
- * 半径(米)
12
- */
13
- radius: number;
14
-
15
- /**
16
- * 边线宽度
17
- */
18
- strokeWidth?: number;
19
-
20
- /**
21
- * 边线颜色
22
- */
23
- strokeColor?: string;
24
-
25
- /**
26
- * 填充颜色
27
- */
28
- fillColor?: string;
29
-
30
- /**
31
- * 层级
32
- */
33
- zIndex?: number;
34
- }
35
-
36
- export default requireNativeComponent<CircleProps>("AMapCircle");
@@ -1,58 +0,0 @@
1
- /*
2
- * @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
3
- * @Date : 2024-12-17 21:28:15
4
- * @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
5
- * @LastEditTime : 2025-03-25 09:25:54
6
- * @FilePath : /jintan-app/lib/amap3d/lib/src/cluster/cluster-view.tsx
7
- * @Description :
8
- *
9
- * Copyright (c) 2025 by 尚博信_王强, All Rights Reserved.
10
- */
11
- import * as React from "react";
12
- import { StyleSheet, Text, ViewStyle } from "react-native";
13
- import { ClusterParams } from ".";
14
- import Marker from "../marker";
15
- import { View } from "@/components/Themed";
16
-
17
- interface Props {
18
- cluster: ClusterParams;
19
- style?: ViewStyle;
20
- textStyle?: ViewStyle;
21
- onPress?: (params: ClusterParams) => void;
22
- }
23
-
24
- export default class ClusterView extends React.PureComponent<Props> {
25
- onPress = () => {
26
- this.props.onPress?.call(this, this.props.cluster);
27
- };
28
-
29
- renderClusterView = () => {
30
- const { count } = this.props.cluster;
31
- const size = 36 + Math.log2(count);
32
- const clusterStyle = { width: size, height: size, borderRadius: size / 2 };
33
- return (
34
- <View style={[style.cluster, clusterStyle, this.props.style]}>
35
- <Text style={[style.text, this.props.textStyle]}>{count}</Text>
36
- </View>
37
- );
38
- };
39
-
40
- render() {
41
- return (
42
- <Marker onPress={this.onPress} position={this.props.cluster.position}>
43
- {this.renderClusterView()}
44
- </Marker>
45
- );
46
- }
47
- }
48
-
49
- const style = StyleSheet.create({
50
- cluster: {
51
- borderWidth: 4,
52
- borderColor: "#fff",
53
- backgroundColor: "rgba(245,83,61,0.9)",
54
- alignItems: "center",
55
- justifyContent: "center",
56
- },
57
- text: { color: "#fff", fontWeight: "600" },
58
- });
@@ -1,159 +0,0 @@
1
- import * as React from "react";
2
- import { ViewStyle } from "react-native";
3
- import Supercluster, { ClusterFeature, ClusterProperties } from "supercluster";
4
- import { CameraEvent } from "../map-view";
5
- import { LatLng } from "../types";
6
- import ClusterView from "./cluster-view";
7
-
8
- export interface ClusterParams {
9
- /**
10
- * 唯一标识
11
- */
12
- id: number;
13
-
14
- /**
15
- * 包含的 Marker 数量
16
- */
17
- count: number;
18
-
19
- /**
20
- * 坐标
21
- */
22
- position: LatLng;
23
- }
24
-
25
- interface ClusterPoint {
26
- /**
27
- * 坐标
28
- */
29
- position: LatLng;
30
-
31
- /**
32
- * 携带的数据,可以是任意类型
33
- */
34
- properties?: any;
35
- }
36
-
37
- interface Props {
38
- /**
39
- * 聚合半径
40
- */
41
- radius?: number;
42
-
43
- /**
44
- * 聚合点样式
45
- */
46
- clusterStyle?: ViewStyle;
47
-
48
- /**
49
- * 聚合点文本样式
50
- */
51
- clusterTextStyle?: ViewStyle;
52
-
53
- /**
54
- * 坐标点列表
55
- */
56
- points: ClusterPoint[];
57
-
58
- /**
59
- * 渲染 Marker
60
- */
61
- renderMarker: (item: ClusterPoint) => React.ReactNode;
62
-
63
- /**
64
- * 渲染聚合点
65
- */
66
- renderCluster?: (params: ClusterParams) => React.ComponentType<any>;
67
-
68
- /**
69
- * 聚合点点击事件
70
- */
71
- onPress?: (params: ClusterParams) => void;
72
- }
73
-
74
- interface State {
75
- clusters: ClusterFeature<ClusterProperties>[];
76
- }
77
-
78
- export default class Cluster extends React.PureComponent<Props, State> {
79
- static defaultProps = { radius: 200 };
80
- state: State = { clusters: [] };
81
- status?: CameraEvent;
82
- cluster?: Supercluster<any, ClusterProperties>;
83
-
84
- componentDidMount() {
85
- this.init();
86
- }
87
-
88
- componentDidUpdate(props: Props) {
89
- if (props.points != this.props.points) {
90
- this.init();
91
- }
92
- }
93
-
94
- async init() {
95
- const { radius, points } = this.props;
96
- // 如果主线程占用太多计算资源,会导致 ios onLoad 事件无法触发,非常蛋疼
97
- // 暂时想到的解决办法是等一个事件循环
98
- await new Promise((resolve) => setTimeout(resolve, 0));
99
- const options = { radius, minZoom: 3, maxZoom: 21 };
100
- this.cluster = new Supercluster<any, ClusterProperties>(options).load(
101
- points.map((marker) => ({
102
- type: "Feature",
103
- geometry: {
104
- type: "Point",
105
- coordinates: [marker.position.longitude, marker.position.latitude],
106
- },
107
- properties: marker.properties,
108
- }))
109
- );
110
- if (this.status) {
111
- this.update(this.status);
112
- }
113
- }
114
-
115
- /**
116
- * 需要在 MapView.onCameraIdle({ nativeEvent }) 回调里调用,参数为 nativeEvent
117
- */
118
- async update(status: CameraEvent) {
119
- this.status = status;
120
- await new Promise((resolve) => setTimeout(resolve, 0));
121
- const { cameraPosition, latLngBounds } = status;
122
- const { southwest, northeast } = latLngBounds;
123
- const clusters = this.cluster!.getClusters(
124
- [southwest.longitude, southwest.latitude, northeast.longitude, northeast.latitude],
125
- Math.round(cameraPosition.zoom!)
126
- );
127
- this.setState({ clusters });
128
- }
129
-
130
- renderCluster = (cluster: ClusterParams) => {
131
- return (
132
- <ClusterView
133
- key={cluster.id}
134
- cluster={cluster}
135
- onPress={this.props.onPress}
136
- style={this.props.clusterStyle}
137
- textStyle={this.props.clusterTextStyle}
138
- />
139
- );
140
- };
141
-
142
- render() {
143
- const { renderCluster, renderMarker } = this.props;
144
- const render = renderCluster || this.renderCluster;
145
- return this.state.clusters.map(({ geometry, properties }) => {
146
- const position = {
147
- latitude: geometry.coordinates[1],
148
- longitude: geometry.coordinates[0],
149
- };
150
-
151
- if (properties.point_count > 0) {
152
- const { cluster_id, point_count } = properties;
153
- return render({ position, id: cluster_id, count: point_count });
154
- }
155
-
156
- return renderMarker({ position, properties });
157
- });
158
- }
159
- }