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.
- package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapModule.kt +5 -1
- package/android/src/main/java/expo/modules/gaodemap/ExpoGaodeMapView.kt +4 -4
- package/android/src/main/java/expo/modules/gaodemap/managers/OverlayManager.kt +34 -2
- package/android/src/main/java/expo/modules/gaodemap/overlays/PolylineView.kt +54 -3
- package/build/components/overlays/Polyline.d.ts.map +1 -1
- package/build/components/overlays/Polyline.js +12 -14
- package/build/components/overlays/Polyline.js.map +1 -1
- package/build/types/map-view.types.d.ts +2 -2
- package/build/types/map-view.types.d.ts.map +1 -1
- package/build/types/map-view.types.js.map +1 -1
- package/build/types/overlays.types.d.ts +5 -0
- package/build/types/overlays.types.d.ts.map +1 -1
- package/build/types/overlays.types.js.map +1 -1
- package/docs/API.md +2 -2
- package/docs/EXAMPLES.md +67 -6
- package/ios/ExpoGaodeMapModule.swift +13 -2
- package/ios/ExpoGaodeMapView.swift +2 -2
- package/ios/managers/OverlayManager.swift +89 -23
- package/ios/overlays/PolylineView.swift +63 -1
- package/ios/{ColorParser.swift → utils/ColorParser.swift} +13 -7
- package/package.json +1 -1
- package/src/components/overlays/Polyline.tsx +13 -16
- package/src/types/map-view.types.ts +2 -2
- package/src/types/overlays.types.ts +6 -0
- package/ios/UIColorExtension.swift +0 -11
- package/lib/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/lib/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/lib/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/lib/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/lib/android/.gradle/8.9/gc.properties +0 -0
- package/lib/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/lib/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/lib/android/.gradle/vcs-1/gc.properties +0 -0
- package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/results.bin +0 -1
- package/lib/android/build/.transforms/7df4812a1bb640a0eb92904b45f433ca/transformed/classes/classes_dex/classes.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/results.bin +0 -1
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/AMap3DPackage.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/BuildConfig.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/UtilsKt.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Circle.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/CircleManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMap.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/HeatMapManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$7.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$8.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView$animateCallback$1.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapView.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$1.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager$commands$2.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MapViewManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker$setIcon$1.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Marker.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager$Companion.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MarkerManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPoint.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/MultiPointManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Overlay.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polygon.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolygonManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/Polyline.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/map_view/PolylineManager.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/debug_dex/qiuxiang/amap3d/modules/SdkModule.dex +0 -0
- package/lib/android/build/.transforms/d6c91342f3c8bae4ed26783459def84b/transformed/debug/desugar_graph.bin +0 -0
- package/lib/android/build/generated/source/buildConfig/debug/qiuxiang/amap3d/BuildConfig.java +0 -10
- package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -14
- package/lib/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
- package/lib/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -6
- package/lib/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
- package/lib/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/lib/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/lib/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -1
- package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-hdpi-v4_positio_icon.png.flat +0 -0
- package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-mdpi-v4_positio_icon.png.flat +0 -0
- package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xhdpi-v4_positio_icon.png.flat +0 -0
- package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxhdpi-v4_positio_icon.png.flat +0 -0
- package/lib/android/build/intermediates/compiled_local_resources/debug/out/drawable-xxxhdpi-v4_positio_icon.png.flat +0 -0
- package/lib/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -6
- package/lib/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/lib/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/lib/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/lib/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
- package/lib/android/build/intermediates/java_res/debug/out/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
- package/lib/android/build/intermediates/javac/debug/classes/qiuxiang/amap3d/BuildConfig.class +0 -0
- package/lib/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -3
- package/lib/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -26
- package/lib/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -14
- package/lib/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
- package/lib/android/build/intermediates/packaged_res/debug/drawable-hdpi-v4/positio_icon.png +0 -0
- package/lib/android/build/intermediates/packaged_res/debug/drawable-mdpi-v4/positio_icon.png +0 -0
- package/lib/android/build/intermediates/packaged_res/debug/drawable-xhdpi-v4/positio_icon.png +0 -0
- package/lib/android/build/intermediates/packaged_res/debug/drawable-xxhdpi-v4/positio_icon.png +0 -0
- package/lib/android/build/intermediates/packaged_res/debug/drawable-xxxhdpi-v4/positio_icon.png +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/BuildConfig.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_dir/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
- package/lib/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/lib/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -2
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +0 -1
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/lib/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/lib/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -41
- package/lib/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/META-INF/react-native-amap3d_debug.kotlin_module +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/AMap3DPackage.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt$fetchImage$request$1$1.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/UtilsKt.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Circle.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/CircleManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMap.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/HeatMapManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$7.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$8.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView$animateCallback$1.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapView.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$1.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager$commands$2.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MapViewManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker$setIcon$1.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Marker.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager$Companion.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MarkerManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint$setIcon$1.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPoint.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/MultiPointManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Overlay.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polygon.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolygonManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/Polyline.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/map_view/PolylineManager.class +0 -0
- package/lib/android/build/tmp/kotlin-classes/debug/qiuxiang/amap3d/modules/SdkModule.class +0 -0
- package/lib/android/build.gradle +0 -34
- package/lib/android/drawable/rn_edit_text_material.xml +0 -37
- package/lib/android/drawable-hdpi/positio_icon.png +0 -0
- package/lib/android/drawable-hdpi/splashscreen_image.png +0 -0
- package/lib/android/drawable-mdpi/splashscreen_image.png +0 -0
- package/lib/android/drawable-xhdpi/splashscreen_image.png +0 -0
- package/lib/android/drawable-xxhdpi/splashscreen_image.png +0 -0
- package/lib/android/drawable-xxxhdpi/splashscreen_image.png +0 -0
- package/lib/android/src/main/AndroidManifest.xml +0 -10
- package/lib/android/src/main/java/qiuxiang/amap3d/AMap3DPackage.kt +0 -30
- package/lib/android/src/main/java/qiuxiang/amap3d/Utils.kt +0 -114
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Circle.kt +0 -65
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/CircleManager.kt +0 -49
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMap.kt +0 -32
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/HeatMapManager.kt +0 -33
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapView.kt +0 -190
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MapViewManager.kt +0 -181
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Marker.kt +0 -102
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MarkerManager.kt +0 -78
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPoint.kt +0 -53
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/MultiPointManager.kt +0 -33
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Overlay.kt +0 -8
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polygon.kt +0 -58
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolygonManager.kt +0 -44
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/Polyline.kt +0 -69
- package/lib/android/src/main/java/qiuxiang/amap3d/map_view/PolylineManager.kt +0 -64
- package/lib/android/src/main/java/qiuxiang/amap3d/modules/AMapGeolocationModule.kt +0 -468
- package/lib/android/src/main/java/qiuxiang/amap3d/modules/SdkModule.kt +0 -31
- package/lib/android/src/main/res/drawable-hdpi/positio_icon.png +0 -0
- package/lib/android/src/main/res/drawable-mdpi/positio_icon.png +0 -0
- package/lib/android/src/main/res/drawable-xhdpi/positio_icon.png +0 -0
- package/lib/android/src/main/res/drawable-xxhdpi/positio_icon.png +0 -0
- package/lib/android/src/main/res/drawable-xxxhdpi/positio_icon.png +0 -0
- package/lib/ios/.swiftformat +0 -2
- package/lib/ios/Bridging-Header.h +0 -4
- package/lib/ios/MapView/CircleManager.m +0 -11
- package/lib/ios/MapView/CircleManager.swift +0 -30
- package/lib/ios/MapView/HeatMapManager.m +0 -9
- package/lib/ios/MapView/HeatMapManager.swift +0 -29
- package/lib/ios/MapView/MapViewManager.m +0 -35
- package/lib/ios/MapView/MapViewManager.swift +0 -188
- package/lib/ios/MapView/MarkerManager.m +0 -18
- package/lib/ios/MapView/MarkerManager.swift +0 -100
- package/lib/ios/MapView/MultiPointManager.m +0 -9
- package/lib/ios/MapView/MultiPointManager.swift +0 -47
- package/lib/ios/MapView/Overlay.swift +0 -4
- package/lib/ios/MapView/PolygonManager.m +0 -10
- package/lib/ios/MapView/PolygonManager.swift +0 -30
- package/lib/ios/MapView/PolylineManager.m +0 -12
- package/lib/ios/MapView/PolylineManager.swift +0 -41
- package/lib/ios/Modules/SdkModule.m +0 -8
- package/lib/ios/Modules/SdkModule.swift +0 -16
- package/lib/ios/RNAMapGeolocation.h +0 -8
- package/lib/ios/RNAMapGeolocation.m +0 -302
- package/lib/ios/Utils.swift +0 -104
- package/lib/ios/react-native-amap3d.podspec +0 -21
- package/lib/src/circle.tsx +0 -36
- package/lib/src/cluster/cluster-view.tsx +0 -58
- package/lib/src/cluster/index.tsx +0 -159
- package/lib/src/component.ts +0 -31
- package/lib/src/geolocation/index.d.ts +0 -287
- package/lib/src/geolocation/index.js +0 -344
- package/lib/src/heat-map.tsx +0 -21
- package/lib/src/index.ts +0 -13
- package/lib/src/location/index.d.ts +0 -287
- package/lib/src/location/index.js +0 -344
- package/lib/src/map-view.tsx +0 -230
- package/lib/src/marker.tsx +0 -128
- package/lib/src/multi-point.tsx +0 -28
- package/lib/src/polygon.tsx +0 -31
- package/lib/src/polyline.tsx +0 -65
- package/lib/src/sdk.ts +0 -11
- package/lib/src/types.ts +0 -137
|
@@ -67,26 +67,33 @@ class OverlayManager {
|
|
|
67
67
|
// MARK: - Polyline
|
|
68
68
|
|
|
69
69
|
func addPolyline(id: String, props: [String: Any]) {
|
|
70
|
+
print("📏 OverlayManager.addPolyline - id: \(id), props: \(props)")
|
|
71
|
+
|
|
70
72
|
guard let mapView = mapView,
|
|
71
|
-
let points = props["points"] as? [[String: Double]] else {
|
|
73
|
+
let points = props["points"] as? [[String: Double]] else {
|
|
74
|
+
print("❌ OverlayManager.addPolyline - mapView 或 points 为空")
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
72
78
|
var coordinates: [CLLocationCoordinate2D] = []
|
|
73
79
|
for point in points {
|
|
74
80
|
guard let lat = point["latitude"], let lng = point["longitude"] else { continue }
|
|
75
81
|
coordinates.append(CLLocationCoordinate2D(latitude: lat, longitude: lng))
|
|
76
82
|
}
|
|
77
|
-
guard
|
|
83
|
+
guard coordinates.count >= 2 else {
|
|
84
|
+
print("❌ OverlayManager.addPolyline - 坐标点数量不足: \(coordinates.count)")
|
|
85
|
+
return
|
|
86
|
+
}
|
|
78
87
|
|
|
79
|
-
let polyline =
|
|
80
|
-
polyline.setPolylineWithCoordinates(&coordinates, count: coordinates.count)
|
|
88
|
+
let polyline = MAPolyline(coordinates: &coordinates, count: UInt(coordinates.count))!
|
|
81
89
|
|
|
90
|
+
// 先保存样式和 overlay,再添加到地图
|
|
82
91
|
overlayStyles[id] = props
|
|
83
92
|
overlays[id] = polyline
|
|
84
|
-
mapView.add(polyline)
|
|
85
93
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
94
|
+
print("✅ OverlayManager.addPolyline - 准备添加到地图,id: \(id)")
|
|
95
|
+
mapView.add(polyline)
|
|
96
|
+
print("✅ OverlayManager.addPolyline - 已添加到地图")
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
func removePolyline(id: String) {
|
|
@@ -154,26 +161,43 @@ class OverlayManager {
|
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
return renderer
|
|
157
|
-
} else if let polyline = overlay as?
|
|
158
|
-
let renderer =
|
|
164
|
+
} else if let polyline = overlay as? MAPolyline {
|
|
165
|
+
let renderer = MAPolylineRenderer(polyline: polyline)!
|
|
159
166
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
167
|
+
// 设置线宽
|
|
168
|
+
if let width = style?["width"] as? Double {
|
|
169
|
+
renderer.lineWidth = CGFloat(width)
|
|
170
|
+
} else if let strokeWidth = style?["strokeWidth"] as? Double {
|
|
171
|
+
renderer.lineWidth = CGFloat(strokeWidth)
|
|
164
172
|
} else {
|
|
165
|
-
renderer
|
|
173
|
+
renderer.lineWidth = 8
|
|
166
174
|
}
|
|
167
175
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
176
|
+
// 设置线条样式
|
|
177
|
+
renderer.lineJoinType = kMALineJoinRound
|
|
178
|
+
renderer.lineCapType = kMALineCapRound
|
|
179
|
+
|
|
180
|
+
// 设置纹理或颜色
|
|
181
|
+
if let textureUrl = style?["texture"] as? String, !textureUrl.isEmpty {
|
|
182
|
+
loadPolylineTexture(url: textureUrl, renderer: renderer)
|
|
172
183
|
} else {
|
|
173
|
-
|
|
184
|
+
if let color = style?["color"] {
|
|
185
|
+
print("🎨 color 原始值: \(color), 类型: \(type(of: color))")
|
|
186
|
+
let parsedColor = ColorParser.parseColor(color)
|
|
187
|
+
print("🎨 解析后的颜色: \(String(describing: parsedColor))")
|
|
188
|
+
renderer.strokeColor = parsedColor ?? .red
|
|
189
|
+
} else if let strokeColor = style?["strokeColor"] {
|
|
190
|
+
print("🎨 strokeColor 原始值: \(strokeColor), 类型: \(type(of: strokeColor))")
|
|
191
|
+
let parsedColor = ColorParser.parseColor(strokeColor)
|
|
192
|
+
print("🎨 解析后的颜色: \(String(describing: parsedColor))")
|
|
193
|
+
renderer.strokeColor = parsedColor ?? .red
|
|
194
|
+
} else {
|
|
195
|
+
print("⚠️ 没有找到 color 或 strokeColor,使用默认红色")
|
|
196
|
+
renderer.strokeColor = .red
|
|
197
|
+
}
|
|
174
198
|
}
|
|
175
199
|
|
|
176
|
-
return renderer
|
|
200
|
+
return renderer
|
|
177
201
|
} else if let polygon = overlay as? MAPolygon {
|
|
178
202
|
guard let renderer = MAPolygonRenderer(polygon: polygon) else {
|
|
179
203
|
return nil
|
|
@@ -195,6 +219,48 @@ class OverlayManager {
|
|
|
195
219
|
return nil
|
|
196
220
|
}
|
|
197
221
|
|
|
222
|
+
private func loadPolylineTexture(url: String, renderer: MAPolylineRenderer) {
|
|
223
|
+
if url.hasPrefix("http://") || url.hasPrefix("https://") {
|
|
224
|
+
guard let imageUrl = URL(string: url) else {
|
|
225
|
+
print("❌ OverlayManager: 无效的 URL: \(url)")
|
|
226
|
+
return
|
|
227
|
+
}
|
|
228
|
+
URLSession.shared.dataTask(with: imageUrl) { [weak self] data, _, error in
|
|
229
|
+
if let error = error {
|
|
230
|
+
print("❌ OverlayManager: 下载图片失败: \(error)")
|
|
231
|
+
return
|
|
232
|
+
}
|
|
233
|
+
guard let data = data, let image = UIImage(data: data) else {
|
|
234
|
+
print("❌ OverlayManager: 无法创建图片")
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
print("✅ OverlayManager: 图片下载成功,大小: \(image.size)")
|
|
238
|
+
DispatchQueue.main.async {
|
|
239
|
+
self?.applyPolylineTexture(image: image, to: renderer)
|
|
240
|
+
}
|
|
241
|
+
}.resume()
|
|
242
|
+
} else if url.hasPrefix("file://") {
|
|
243
|
+
let path = String(url.dropFirst(7))
|
|
244
|
+
if let image = UIImage(contentsOfFile: path) {
|
|
245
|
+
print("✅ OverlayManager: 本地图片加载成功")
|
|
246
|
+
applyPolylineTexture(image: image, to: renderer)
|
|
247
|
+
} else {
|
|
248
|
+
print("❌ OverlayManager: 本地图片加载失败: \(path)")
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
if let image = UIImage(named: url) {
|
|
252
|
+
print("✅ OverlayManager: 资源图片加载成功")
|
|
253
|
+
applyPolylineTexture(image: image, to: renderer)
|
|
254
|
+
} else {
|
|
255
|
+
print("❌ OverlayManager: 资源图片加载失败: \(url)")
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
private func applyPolylineTexture(image: UIImage, to renderer: MAPolylineRenderer) {
|
|
261
|
+
renderer.strokeImage = image
|
|
262
|
+
}
|
|
263
|
+
|
|
198
264
|
func clear() {
|
|
199
265
|
guard let mapView = mapView else { return }
|
|
200
266
|
for overlay in overlays.values {
|
|
@@ -207,4 +273,4 @@ class OverlayManager {
|
|
|
207
273
|
overlayStyles.removeAll()
|
|
208
274
|
annotations.removeAll()
|
|
209
275
|
}
|
|
210
|
-
}
|
|
276
|
+
}
|
|
@@ -5,6 +5,7 @@ class PolylineView: ExpoView {
|
|
|
5
5
|
var points: [[String: Double]] = []
|
|
6
6
|
var strokeWidth: Float = 0
|
|
7
7
|
var strokeColor: Any?
|
|
8
|
+
var textureUrl: String?
|
|
8
9
|
|
|
9
10
|
private var mapView: MAMapView?
|
|
10
11
|
var polyline: MAPolyline?
|
|
@@ -36,12 +37,67 @@ class PolylineView: ExpoView {
|
|
|
36
37
|
func getRenderer() -> MAOverlayRenderer {
|
|
37
38
|
if renderer == nil, let polyline = polyline {
|
|
38
39
|
renderer = MAPolylineRenderer(polyline: polyline)
|
|
39
|
-
renderer?.strokeColor = ColorParser.parseColor(strokeColor) ?? UIColor.clear
|
|
40
40
|
renderer?.lineWidth = CGFloat(strokeWidth)
|
|
41
|
+
|
|
42
|
+
if let url = textureUrl {
|
|
43
|
+
print("🎨 PolylineView: 加载纹理 URL: \(url)")
|
|
44
|
+
loadTexture(url: url, renderer: renderer!)
|
|
45
|
+
} else {
|
|
46
|
+
renderer?.strokeColor = ColorParser.parseColor(strokeColor) ?? UIColor.clear
|
|
47
|
+
}
|
|
41
48
|
}
|
|
42
49
|
return renderer!
|
|
43
50
|
}
|
|
44
51
|
|
|
52
|
+
private func loadTexture(url: String, renderer: MAPolylineRenderer) {
|
|
53
|
+
if url.hasPrefix("http://") || url.hasPrefix("https://") {
|
|
54
|
+
guard let imageUrl = URL(string: url) else {
|
|
55
|
+
print("❌ PolylineView: 无效的 URL: \(url)")
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
URLSession.shared.dataTask(with: imageUrl) { [weak self] data, _, error in
|
|
59
|
+
if let error = error {
|
|
60
|
+
print("❌ PolylineView: 下载图片失败: \(error)")
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
guard let data = data, let image = UIImage(data: data) else {
|
|
64
|
+
print("❌ PolylineView: 无法创建图片")
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
print("✅ PolylineView: 图片下载成功,大小: \(image.size)")
|
|
68
|
+
DispatchQueue.main.async {
|
|
69
|
+
self?.applyTexture(image: image, to: renderer)
|
|
70
|
+
}
|
|
71
|
+
}.resume()
|
|
72
|
+
} else if url.hasPrefix("file://") {
|
|
73
|
+
let path = String(url.dropFirst(7))
|
|
74
|
+
if let image = UIImage(contentsOfFile: path) {
|
|
75
|
+
print("✅ PolylineView: 本地图片加载成功")
|
|
76
|
+
applyTexture(image: image, to: renderer)
|
|
77
|
+
} else {
|
|
78
|
+
print("❌ PolylineView: 本地图片加载失败: \(path)")
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
if let image = UIImage(named: url) {
|
|
82
|
+
print("✅ PolylineView: 资源图片加载成功")
|
|
83
|
+
applyTexture(image: image, to: renderer)
|
|
84
|
+
} else {
|
|
85
|
+
print("❌ PolylineView: 资源图片加载失败: \(url)")
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
private func applyTexture(image: UIImage, to renderer: MAPolylineRenderer) {
|
|
91
|
+
let selector = NSSelectorFromString("loadStrokeTextureImage:")
|
|
92
|
+
if renderer.responds(to: selector) {
|
|
93
|
+
renderer.perform(selector, with: image)
|
|
94
|
+
print("✅ PolylineView: 纹理已应用")
|
|
95
|
+
mapView?.setNeedsDisplay()
|
|
96
|
+
} else {
|
|
97
|
+
print("❌ PolylineView: renderer 不支持 loadStrokeTextureImage 方法")
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
45
101
|
func setPoints(_ points: [[String: Double]]) {
|
|
46
102
|
self.points = points
|
|
47
103
|
renderer = nil
|
|
@@ -59,4 +115,10 @@ class PolylineView: ExpoView {
|
|
|
59
115
|
renderer = nil
|
|
60
116
|
updatePolyline()
|
|
61
117
|
}
|
|
118
|
+
|
|
119
|
+
func setTexture(_ url: String?) {
|
|
120
|
+
textureUrl = url
|
|
121
|
+
renderer = nil
|
|
122
|
+
updatePolyline()
|
|
123
|
+
}
|
|
62
124
|
}
|
|
@@ -73,18 +73,19 @@ class ColorParser {
|
|
|
73
73
|
hex = r + g + b + a
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
// 处理 #RRGGBBAA 格式
|
|
76
|
+
// 处理 #AARRGGBB 或 #RRGGBBAA 格式
|
|
77
77
|
if hex.count == 8 {
|
|
78
78
|
let scanner = Scanner(string: hex)
|
|
79
79
|
var hexNumber: UInt64 = 0
|
|
80
80
|
|
|
81
81
|
if scanner.scanHexInt64(&hexNumber) {
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
let
|
|
85
|
-
|
|
82
|
+
// 尝试 ARGB 格式(Android 风格)
|
|
83
|
+
let alphaARGB = CGFloat((hexNumber & 0xff000000) >> 24) / 255
|
|
84
|
+
let redARGB = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255
|
|
85
|
+
let greenARGB = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255
|
|
86
|
+
let blueARGB = CGFloat(hexNumber & 0x000000ff) / 255
|
|
86
87
|
|
|
87
|
-
return UIColor(red:
|
|
88
|
+
return UIColor(red: redARGB, green: greenARGB, blue: blueARGB, alpha: alphaARGB)
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -146,7 +147,7 @@ class ColorParser {
|
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
|
|
149
|
-
// UIColor
|
|
150
|
+
// UIColor 扩展,支持从数字创建(ARGB 格式)
|
|
150
151
|
extension UIColor {
|
|
151
152
|
convenience init(hex: Int) {
|
|
152
153
|
let alpha = CGFloat((hex >> 24) & 0xFF) / 255.0
|
|
@@ -155,4 +156,9 @@ extension UIColor {
|
|
|
155
156
|
let blue = CGFloat(hex & 0xFF) / 255.0
|
|
156
157
|
self.init(red: red, green: green, blue: blue, alpha: alpha)
|
|
157
158
|
}
|
|
159
|
+
|
|
160
|
+
// 别名方法,与 hex 功能相同
|
|
161
|
+
convenience init(argb: Int) {
|
|
162
|
+
self.init(hex: argb)
|
|
163
|
+
}
|
|
158
164
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author : 尚博信_王强 wangqiang03@sunboxsoft.com
|
|
3
3
|
* @Date : 2025-11-13 15:01:30
|
|
4
4
|
* @LastEditors : 尚博信_王强 wangqiang03@sunboxsoft.com
|
|
5
|
-
* @LastEditTime : 2025-11-
|
|
5
|
+
* @LastEditTime : 2025-11-15 01:08:27
|
|
6
6
|
* @FilePath : /expo-gaode-map/src/components/overlays/Polyline.tsx
|
|
7
7
|
* @Description : 地图折线组件 - 使用命令式 API
|
|
8
8
|
*
|
|
@@ -32,30 +32,27 @@ import type { PolylineProps } from '../../types';
|
|
|
32
32
|
*/
|
|
33
33
|
export default function Polyline(props: PolylineProps) {
|
|
34
34
|
const mapRef = React.useContext(MapContext);
|
|
35
|
-
const polylineIdRef = React.useRef<string>(
|
|
36
|
-
const isInitialMount = React.useRef(true);
|
|
35
|
+
const polylineIdRef = React.useRef<string | null>(null);
|
|
37
36
|
|
|
38
37
|
// 添加折线
|
|
39
38
|
React.useEffect(() => {
|
|
40
|
-
const polylineId =
|
|
39
|
+
const polylineId = `polyline_${Date.now()}_${Math.random()}`;
|
|
40
|
+
polylineIdRef.current = polylineId;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
// 只传递必要的属性
|
|
43
|
+
const polylineProps = {
|
|
44
|
+
points: props.points,
|
|
45
|
+
width: props.width,
|
|
46
|
+
color: props.color,
|
|
47
|
+
...(props.texture && { texture: props.texture }),
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
mapRef?.current?.addPolyline?.(polylineId, polylineProps);
|
|
43
51
|
|
|
44
52
|
return () => {
|
|
45
53
|
mapRef?.current?.removePolyline?.(polylineId);
|
|
46
54
|
};
|
|
47
55
|
}, []);
|
|
48
56
|
|
|
49
|
-
// 监听 Props 变化,更新折线(跳过初始渲染)
|
|
50
|
-
React.useEffect(() => {
|
|
51
|
-
if (isInitialMount.current) {
|
|
52
|
-
isInitialMount.current = false;
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const polylineId = polylineIdRef.current;
|
|
57
|
-
mapRef?.current?.updatePolyline?.(polylineId, props);
|
|
58
|
-
}, [props.points, props.width, props.color]);
|
|
59
|
-
|
|
60
57
|
return null;
|
|
61
58
|
}
|
|
@@ -167,7 +167,7 @@ export interface MapViewProps {
|
|
|
167
167
|
/**
|
|
168
168
|
* 点击地图事件
|
|
169
169
|
*/
|
|
170
|
-
|
|
170
|
+
onMapPress?: (event: LatLng) => void;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* 点击标注点事件
|
|
@@ -177,7 +177,7 @@ export interface MapViewProps {
|
|
|
177
177
|
/**
|
|
178
178
|
* 长按地图事件
|
|
179
179
|
*/
|
|
180
|
-
|
|
180
|
+
onMapLongPress?: (event: LatLng) => void;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* 地图状态改变事件(实时触发)
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import UIKit
|
|
2
|
-
|
|
3
|
-
extension UIColor {
|
|
4
|
-
convenience init(argb: Int) {
|
|
5
|
-
let alpha = CGFloat((argb >> 24) & 0xFF) / 255.0
|
|
6
|
-
let red = CGFloat((argb >> 16) & 0xFF) / 255.0
|
|
7
|
-
let green = CGFloat((argb >> 8) & 0xFF) / 255.0
|
|
8
|
-
let blue = CGFloat(argb & 0xFF) / 255.0
|
|
9
|
-
self.init(red: red, green: green, blue: blue, alpha: alpha)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/classes
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
o/debug
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/android/build/generated/source/buildConfig/debug/qiuxiang/amap3d/BuildConfig.java
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Automatically generated file. DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
package qiuxiang.amap3d;
|
|
5
|
-
|
|
6
|
-
public final class BuildConfig {
|
|
7
|
-
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
|
8
|
-
public static final String LIBRARY_PACKAGE_NAME = "qiuxiang.amap3d";
|
|
9
|
-
public static final String BUILD_TYPE = "debug";
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
package="qiuxiang.amap3d" >
|
|
4
|
-
|
|
5
|
-
<uses-sdk android:minSdkVersion="23" />
|
|
6
|
-
|
|
7
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
8
|
-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
9
|
-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
10
|
-
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
11
|
-
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
12
|
-
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
|
13
|
-
|
|
14
|
-
</manifest>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"artifactType": {
|
|
4
|
-
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
|
5
|
-
"kind": "Directory"
|
|
6
|
-
},
|
|
7
|
-
"applicationId": "qiuxiang.amap3d",
|
|
8
|
-
"variantName": "debug",
|
|
9
|
-
"elements": [
|
|
10
|
-
{
|
|
11
|
-
"type": "SINGLE",
|
|
12
|
-
"filters": [],
|
|
13
|
-
"attributes": [],
|
|
14
|
-
"outputFile": "AndroidManifest.xml"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"elementType": "File"
|
|
18
|
-
}
|
package/lib/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
int drawable positio_icon 0x0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#Wed Jul 10 14:31:59 CST 2024
|
|
2
|
-
qiuxiang.amap3d.react-native-amap3d-main-6\:/drawable-hdpi/positio_icon.png=/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/packaged_res/debug/drawable-hdpi-v4/positio_icon.png
|
|
3
|
-
qiuxiang.amap3d.react-native-amap3d-main-6\:/drawable-mdpi/positio_icon.png=/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/packaged_res/debug/drawable-mdpi-v4/positio_icon.png
|
|
4
|
-
qiuxiang.amap3d.react-native-amap3d-main-6\:/drawable-xhdpi/positio_icon.png=/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/packaged_res/debug/drawable-xhdpi-v4/positio_icon.png
|
|
5
|
-
qiuxiang.amap3d.react-native-amap3d-main-6\:/drawable-xxhdpi/positio_icon.png=/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/packaged_res/debug/drawable-xxhdpi-v4/positio_icon.png
|
|
6
|
-
qiuxiang.amap3d.react-native-amap3d-main-6\:/drawable-xxxhdpi/positio_icon.png=/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/packaged_res/debug/drawable-xxxhdpi-v4/positio_icon.png
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res"><file name="positio_icon" path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res/drawable-hdpi/positio_icon.png" qualifiers="hdpi-v4" type="drawable"/><file name="positio_icon" path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res/drawable-mdpi/positio_icon.png" qualifiers="mdpi-v4" type="drawable"/><file name="positio_icon" path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res/drawable-xhdpi/positio_icon.png" qualifiers="xhdpi-v4" type="drawable"/><file name="positio_icon" path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res/drawable-xxhdpi/positio_icon.png" qualifiers="xxhdpi-v4" type="drawable"/><file name="positio_icon" path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/res/drawable-xxxhdpi/positio_icon.png" qualifiers="xxxhdpi-v4" type="drawable"/></source></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/debug/jniLibs"/></dataSet></merger>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/debug/shaders"/></dataSet></merger>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/wangqiang/jintan-app/node_modules/react-native-amap3d/lib/android/build/intermediates/shader_assets/debug/out"/></dataSet></merger>
|
|
Binary file
|