@maydon_tech/react-native-nitro-maps 0.1.0
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/LICENSE +20 -0
- package/NitroMap.podspec +42 -0
- package/README.md +172 -0
- package/android/CMakeLists.txt +27 -0
- package/android/build.gradle +141 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +108 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +63 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +408 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +68 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +176 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/NitroMapPackage.kt +33 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +195 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +912 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +70 -0
- package/cpp/ClusterEngine.hpp +411 -0
- package/cpp/KDBush.hpp +238 -0
- package/cpp/QuadTree.hpp +246 -0
- package/ios/Clustering/ClusterEngineWrapper.h +58 -0
- package/ios/Clustering/ClusterEngineWrapper.mm +142 -0
- package/ios/Clustering/ClusterIconRenderer.swift +80 -0
- package/ios/Clustering/NitroClusterEngine.swift +117 -0
- package/ios/Clustering/NitroClusterIconGenerator.swift +35 -0
- package/ios/MarkerRenderer/MarkerIconFactory.swift +322 -0
- package/ios/MarkerRenderer/PriceMarkerRenderer.swift +140 -0
- package/ios/NitroMap.swift +332 -0
- package/ios/NitroMapConfig/HybridNitroMapConfig.swift +33 -0
- package/ios/Providers/GoogleMapDelegate.swift +310 -0
- package/ios/Providers/GoogleMapProvider+Camera.swift +164 -0
- package/ios/Providers/GoogleMapProvider.swift +924 -0
- package/ios/Providers/MapProviderProtocol.swift +78 -0
- package/ios/Shared/ClusterConfig+Factory.swift +58 -0
- package/ios/Shared/ClusteringManager.swift +211 -0
- package/ios/Shared/MapStyleProvider.swift +135 -0
- package/ios/Shared/MarkerSelectionHandler.swift +116 -0
- package/ios/Utils/ColorValueExtension.swift +54 -0
- package/lib/module/components/ImageMarker.js +146 -0
- package/lib/module/components/ImageMarker.js.map +1 -0
- package/lib/module/components/NitroMap.js +320 -0
- package/lib/module/components/NitroMap.js.map +1 -0
- package/lib/module/components/PriceMarker.js +165 -0
- package/lib/module/components/PriceMarker.js.map +1 -0
- package/lib/module/context/NitroMapContext.js +15 -0
- package/lib/module/context/NitroMapContext.js.map +1 -0
- package/lib/module/hooks/useNitroMarker.js +104 -0
- package/lib/module/hooks/useNitroMarker.js.map +1 -0
- package/lib/module/index.js +21 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/index.js +4 -0
- package/lib/module/modules/index.js.map +1 -0
- package/lib/module/modules/module.js +30 -0
- package/lib/module/modules/module.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/NitroMap.nitro.js +4 -0
- package/lib/module/specs/NitroMap.nitro.js.map +1 -0
- package/lib/module/specs/NitroMapConfig.nitro.js +4 -0
- package/lib/module/specs/NitroMapConfig.nitro.js.map +1 -0
- package/lib/module/types/map.js +2 -0
- package/lib/module/types/map.js.map +1 -0
- package/lib/module/types/marker.js +4 -0
- package/lib/module/types/marker.js.map +1 -0
- package/lib/module/utils/colors.js +147 -0
- package/lib/module/utils/colors.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/ImageMarker.d.ts +70 -0
- package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroMap.d.ts +14 -0
- package/lib/typescript/src/components/NitroMap.d.ts.map +1 -0
- package/lib/typescript/src/components/PriceMarker.d.ts +88 -0
- package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts +16 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts +78 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/index.d.ts +2 -0
- package/lib/typescript/src/modules/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/module.d.ts +22 -0
- package/lib/typescript/src/modules/module.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts +227 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts +10 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts.map +1 -0
- package/lib/typescript/src/types/map.d.ts +154 -0
- package/lib/typescript/src/types/map.d.ts.map +1 -0
- package/lib/typescript/src/types/marker.d.ts +248 -0
- package/lib/typescript/src/types/marker.d.ts.map +1 -0
- package/lib/typescript/src/utils/colors.d.ts +82 -0
- package/lib/typescript/src/utils/colors.d.ts.map +1 -0
- package/nitro.json +21 -0
- package/nitrogen/generated/android/c++/JCamera.hpp +74 -0
- package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +68 -0
- package/nitrogen/generated/android/c++/JClusterConfig.hpp +121 -0
- package/nitrogen/generated/android/c++/JClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/android/c++/JClusterStrategy.hpp +59 -0
- package/nitrogen/generated/android/c++/JColorValue.cpp +26 -0
- package/nitrogen/generated/android/c++/JColorValue.hpp +70 -0
- package/nitrogen/generated/android/c++/JCoordinate.hpp +61 -0
- package/nitrogen/generated/android/c++/JEdgePadding.hpp +69 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_ClusterPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapError.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerDragEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerPressEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_RegionChangeEvent.hpp +79 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.cpp +59 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +593 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +125 -0
- package/nitrogen/generated/android/c++/JImageMarkerConfig.hpp +86 -0
- package/nitrogen/generated/android/c++/JMapBoundaries.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapError.hpp +61 -0
- package/nitrogen/generated/android/c++/JMapPressEvent.hpp +64 -0
- package/nitrogen/generated/android/c++/JMapProvider.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapStyleElement.hpp +87 -0
- package/nitrogen/generated/android/c++/JMapStyler.hpp +78 -0
- package/nitrogen/generated/android/c++/JMapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerColor.hpp +69 -0
- package/nitrogen/generated/android/c++/JMarkerConfig.hpp +77 -0
- package/nitrogen/generated/android/c++/JMarkerData.hpp +121 -0
- package/nitrogen/generated/android/c++/JMarkerDragEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerPressEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/JPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/JPriceMarkerStyle.hpp +102 -0
- package/nitrogen/generated/android/c++/JRegion.hpp +69 -0
- package/nitrogen/generated/android/c++/JRegionChangeEvent.hpp +62 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.hpp +70 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +144 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Camera.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterAnimationStyle.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterPressEvent.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterStrategy.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ColorValue.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Coordinate.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/EdgePadding.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_ClusterPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapError.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerDragEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_RegionChangeEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapConfigSpec.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +342 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ImageMarkerConfig.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapBoundaries.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapError.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapProvider.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyleElement.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyler.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerColor.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerConfig.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerDragEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Point.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PriceMarkerStyle.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Region.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/RegionChangeEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Variant_String_MarkerColor.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/nitromapOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapStateUpdater.kt +23 -0
- package/nitrogen/generated/android/nitromap+autolinking.cmake +87 -0
- package/nitrogen/generated/android/nitromap+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitromapOnLoad.cpp +70 -0
- package/nitrogen/generated/android/nitromapOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/NitroMap+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +130 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +793 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +132 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.mm +41 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.hpp +84 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +410 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +206 -0
- package/nitrogen/generated/ios/swift/Camera.swift +80 -0
- package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +52 -0
- package/nitrogen/generated/ios/swift/ClusterConfig.swift +268 -0
- package/nitrogen/generated/ios/swift/ClusterPressEvent.swift +70 -0
- package/nitrogen/generated/ios/swift/ClusterStrategy.swift +40 -0
- package/nitrogen/generated/ios/swift/ColorValue.swift +18 -0
- package/nitrogen/generated/ios/swift/Coordinate.swift +47 -0
- package/nitrogen/generated/ios/swift/EdgePadding.swift +69 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_Camera.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_ClusterPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec_cxx.swift +142 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +93 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +953 -0
- package/nitrogen/generated/ios/swift/ImageMarkerConfig.swift +166 -0
- package/nitrogen/generated/ios/swift/MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MapProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/MapStyleElement.swift +108 -0
- package/nitrogen/generated/ios/swift/MapStyler.swift +177 -0
- package/nitrogen/generated/ios/swift/MapType.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerAnimation.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerColor.swift +69 -0
- package/nitrogen/generated/ios/swift/MarkerConfig.swift +82 -0
- package/nitrogen/generated/ios/swift/MarkerData.swift +195 -0
- package/nitrogen/generated/ios/swift/MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerStyle.swift +44 -0
- package/nitrogen/generated/ios/swift/Point.swift +47 -0
- package/nitrogen/generated/ios/swift/PriceMarkerStyle.swift +374 -0
- package/nitrogen/generated/ios/swift/Region.swift +69 -0
- package/nitrogen/generated/ios/swift/RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Variant_String_MarkerColor.swift +18 -0
- package/nitrogen/generated/shared/c++/Camera.hpp +92 -0
- package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +88 -0
- package/nitrogen/generated/shared/c++/ClusterConfig.hpp +140 -0
- package/nitrogen/generated/shared/c++/ClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/shared/c++/ClusterStrategy.hpp +76 -0
- package/nitrogen/generated/shared/c++/Coordinate.hpp +79 -0
- package/nitrogen/generated/shared/c++/EdgePadding.hpp +87 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +173 -0
- package/nitrogen/generated/shared/c++/ImageMarkerConfig.hpp +103 -0
- package/nitrogen/generated/shared/c++/MapBoundaries.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapError.hpp +79 -0
- package/nitrogen/generated/shared/c++/MapPressEvent.hpp +83 -0
- package/nitrogen/generated/shared/c++/MapProvider.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapStyleElement.hpp +87 -0
- package/nitrogen/generated/shared/c++/MapStyler.hpp +96 -0
- package/nitrogen/generated/shared/c++/MapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerColor.hpp +87 -0
- package/nitrogen/generated/shared/c++/MarkerConfig.hpp +91 -0
- package/nitrogen/generated/shared/c++/MarkerData.hpp +131 -0
- package/nitrogen/generated/shared/c++/MarkerDragEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerPressEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/Point.hpp +79 -0
- package/nitrogen/generated/shared/c++/PriceMarkerStyle.hpp +119 -0
- package/nitrogen/generated/shared/c++/Region.hpp +87 -0
- package/nitrogen/generated/shared/c++/RegionChangeEvent.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +351 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +141 -0
- package/nitrogen/generated/shared/json/NitroMapConfig.json +32 -0
- package/package.json +176 -0
- package/react-native.config.js +16 -0
- package/src/components/ImageMarker.tsx +254 -0
- package/src/components/NitroMap.tsx +433 -0
- package/src/components/PriceMarker.tsx +311 -0
- package/src/context/NitroMapContext.tsx +33 -0
- package/src/hooks/useNitroMarker.ts +198 -0
- package/src/index.tsx +62 -0
- package/src/modules/index.ts +6 -0
- package/src/modules/module.ts +45 -0
- package/src/specs/NitroMap.nitro.ts +292 -0
- package/src/specs/NitroMapConfig.nitro.ts +8 -0
- package/src/types/map.ts +166 -0
- package/src/types/marker.ts +267 -0
- package/src/utils/colors.ts +159 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type MarkerHandlers } from '../context/NitroMapContext';
|
|
2
|
+
import type { MarkerConfig, MarkerAnimation } from '../types/marker';
|
|
3
|
+
import type { Coordinate, Point } from '../types/map';
|
|
4
|
+
/**
|
|
5
|
+
* Base marker data structure for internal use
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseMarkerData {
|
|
8
|
+
id: string;
|
|
9
|
+
coordinate: Coordinate;
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
draggable: boolean;
|
|
13
|
+
opacity: number;
|
|
14
|
+
rotation: number;
|
|
15
|
+
zIndex: number;
|
|
16
|
+
anchor: Point;
|
|
17
|
+
clusteringEnabled: boolean;
|
|
18
|
+
config: MarkerConfig;
|
|
19
|
+
animation: MarkerAnimation;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props shared by all marker components
|
|
23
|
+
*/
|
|
24
|
+
export interface CommonMarkerProps {
|
|
25
|
+
/** Unique identifier for the marker */
|
|
26
|
+
id?: string;
|
|
27
|
+
/** Geographic coordinates where the marker should be placed */
|
|
28
|
+
coordinate: Coordinate;
|
|
29
|
+
/** Title shown in info window when marker is tapped */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Description shown in info window below the title */
|
|
32
|
+
description?: string;
|
|
33
|
+
/** Whether the marker can be dragged by the user */
|
|
34
|
+
draggable?: boolean;
|
|
35
|
+
/** Marker opacity (0 = transparent, 1 = opaque) */
|
|
36
|
+
opacity?: number;
|
|
37
|
+
/** Rotation angle in degrees (clockwise from north) */
|
|
38
|
+
rotation?: number;
|
|
39
|
+
/** Z-index for controlling overlap order */
|
|
40
|
+
zIndex?: number;
|
|
41
|
+
/** Anchor point for positioning (0-1 range) */
|
|
42
|
+
anchor?: Point;
|
|
43
|
+
/** Whether this marker should be included in clustering */
|
|
44
|
+
clusteringEnabled?: boolean;
|
|
45
|
+
/** Animation when marker appears on the map */
|
|
46
|
+
animation?: MarkerAnimation;
|
|
47
|
+
/** Called when the marker is tapped */
|
|
48
|
+
onPress?: () => void;
|
|
49
|
+
/** Called when the marker starts being dragged */
|
|
50
|
+
onDragStart?: (coordinate: Coordinate) => void;
|
|
51
|
+
/** Called continuously while the marker is being dragged */
|
|
52
|
+
onDrag?: (coordinate: Coordinate) => void;
|
|
53
|
+
/** Called when the marker is dropped (drag ends) */
|
|
54
|
+
onDragEnd?: (coordinate: Coordinate) => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Hook options for useNitroMarker
|
|
58
|
+
*/
|
|
59
|
+
export interface UseNitroMarkerOptions {
|
|
60
|
+
/** ID prefix for auto-generated IDs */
|
|
61
|
+
idPrefix: string;
|
|
62
|
+
/** User-provided ID (optional) */
|
|
63
|
+
providedId?: string;
|
|
64
|
+
/** Event handlers */
|
|
65
|
+
handlers: MarkerHandlers;
|
|
66
|
+
/** Function to build marker data - receives the generated/provided markerId */
|
|
67
|
+
buildMarkerData: (markerId: string) => BaseMarkerData;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Shared hook for all marker components
|
|
71
|
+
* Handles ID generation, context registration, and marker lifecycle
|
|
72
|
+
*/
|
|
73
|
+
export declare function useNitroMarker({ idPrefix, providedId, handlers, buildMarkerData, }: UseNitroMarkerOptions): string;
|
|
74
|
+
/**
|
|
75
|
+
* Create stable handlers object that won't cause unnecessary re-renders
|
|
76
|
+
*/
|
|
77
|
+
export declare function useMarkerHandlers(onPress?: () => void, onDragStart?: (coordinate: Coordinate) => void, onDrag?: (coordinate: Coordinate) => void, onDragEnd?: (coordinate: Coordinate) => void): MarkerHandlers;
|
|
78
|
+
//# sourceMappingURL=useNitroMarker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNitroMarker.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useNitroMarker.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM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AAQ,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,qBAAqB;IACrB,QAAQ,EAAE,cAAc,CAAC;IAEzB,+EAA+E;IAC/E,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC;CACvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,eAAe,GAChB,EAAE,qBAAqB,GAAG,MAAM,CAqEhC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,EACpB,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,EAC9C,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,EACzC,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,GAC3C,cAAc,CAUhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { NitroMap, default } from './components/NitroMap';
|
|
2
|
+
export { PriceMarker } from './components/PriceMarker';
|
|
3
|
+
export { ImageMarker } from './components/ImageMarker';
|
|
4
|
+
export type { NitroMapProps, NitroMapRef } from './components/NitroMap';
|
|
5
|
+
export type { Region, Coordinate, MapType, MapPressEvent, RegionChangeEvent, EdgePadding, Camera, MapBoundaries, MapStyleElement, MapStyler, MapProvider, MapStyle, MapError, Point, } from './types/map';
|
|
6
|
+
export type { MarkerStyle, PriceMarkerStyle, MarkerColor, PriceMarkerConfig, ImageMarkerConfig, ClusterPressEvent, ClusterConfig, ClusterStrategy, ClusterAnimationStyle, MarkerAnimation, MarkerConfig, MarkerData, MarkerDragEvent, MarkerPressEvent, } from './types/marker';
|
|
7
|
+
export { NitroMapInitialize, IsNitroMapInitialized, getDefaultProvider, type NitroMapInitConfig, } from './modules';
|
|
8
|
+
export type { PriceMarkerProps } from './components/PriceMarker';
|
|
9
|
+
export type { ImageMarkerProps } from './components/ImageMarker';
|
|
10
|
+
export { rgb, hex, Colors } from './utils/colors';
|
|
11
|
+
export type { ColorValue } from './utils/colors';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAExE,YAAY,EACV,MAAM,EACN,UAAU,EACV,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,eAAe,EACf,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AAInB,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAIjE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MapProvider } from '../types/map';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for NitroMap initialization.
|
|
4
|
+
*/
|
|
5
|
+
export interface NitroMapInitConfig {
|
|
6
|
+
/** Map provider to use ('google' | 'apple' | 'yandex') */
|
|
7
|
+
provider: MapProvider;
|
|
8
|
+
/** Google Maps API key (required for Google provider) */
|
|
9
|
+
googleApiKey?: string;
|
|
10
|
+
/** Yandex Maps API key (required for Yandex provider) */
|
|
11
|
+
yandexApiKey?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Initialize the NitroMap SDK. Must be called before rendering <NitroMap>.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* NitroMapInitialize({ provider: 'google', googleApiKey: 'YOUR_KEY' });
|
|
18
|
+
*/
|
|
19
|
+
export declare function NitroMapInitialize(config: NitroMapInitConfig): void;
|
|
20
|
+
export declare function IsNitroMapInitialized(): boolean;
|
|
21
|
+
export declare function getDefaultProvider(): MapProvider;
|
|
22
|
+
//# sourceMappingURL=module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/modules/module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQhD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,EAAE,WAAW,CAAC;IACtB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAQnE;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AAED,wBAAgB,kBAAkB,IAAI,WAAW,CAEhD"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { HybridView, HybridViewMethods, HybridViewProps } from 'react-native-nitro-modules';
|
|
2
|
+
import type { Camera, Coordinate, EdgePadding, MapBoundaries, MapError, MapPressEvent, MapProvider, MapStyle, MapType, Region, RegionChangeEvent } from '../types/map';
|
|
3
|
+
import type { ClusterConfig, ClusterPressEvent, MarkerData, MarkerDragEvent, MarkerPressEvent } from '../types/marker';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the NitroMap component
|
|
6
|
+
*/
|
|
7
|
+
export interface NitroMapProps extends HybridViewProps {
|
|
8
|
+
/**
|
|
9
|
+
* Map provider to use for rendering.
|
|
10
|
+
* Currently only `'google'` is supported.
|
|
11
|
+
* @default 'google'
|
|
12
|
+
*/
|
|
13
|
+
provider?: MapProvider;
|
|
14
|
+
/**
|
|
15
|
+
* Initial region to display when the map loads
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* initialRegion={{
|
|
19
|
+
* latitude: 41.299496,
|
|
20
|
+
* longitude: 69.240073,
|
|
21
|
+
* latitudeDelta: 0.0922,
|
|
22
|
+
* longitudeDelta: 0.0421,
|
|
23
|
+
* }}
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
initialRegion?: Region;
|
|
27
|
+
/**
|
|
28
|
+
* Show the user's current location on the map
|
|
29
|
+
* Requires location permissions
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
showsUserLocation?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Enable pinch-to-zoom gesture
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
zoomEnabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enable pan/scroll gesture
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
scrollEnabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Enable rotation gesture (two-finger rotate)
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
rotateEnabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Enable 3D tilt gesture (two-finger vertical pan)
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
pitchEnabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Map display type
|
|
55
|
+
* - `'standard'` - Normal map with roads and labels
|
|
56
|
+
* - `'satellite'` - Satellite imagery
|
|
57
|
+
* - `'hybrid'` - Satellite with roads/labels overlay
|
|
58
|
+
* @default 'standard'
|
|
59
|
+
*/
|
|
60
|
+
mapType?: MapType;
|
|
61
|
+
/**
|
|
62
|
+
* Custom JSON styling for the map
|
|
63
|
+
* @see https://mapstyle.withgoogle.com/
|
|
64
|
+
*/
|
|
65
|
+
customMapStyle?: MapStyle;
|
|
66
|
+
/**
|
|
67
|
+
* Show the "my location" button on the map
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
showsMyLocationButton?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Configuration for marker clustering behavior
|
|
73
|
+
*/
|
|
74
|
+
clusterConfig?: ClusterConfig;
|
|
75
|
+
/**
|
|
76
|
+
* Enable dark mode styling for the map
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
darkMode?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Called when the user taps on the map (not on a marker)
|
|
82
|
+
* @param event - Contains the coordinate and screen position of the tap
|
|
83
|
+
*/
|
|
84
|
+
onPress?: (event: MapPressEvent) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Called when the user long-presses on the map
|
|
87
|
+
* @param event - Contains the coordinate and screen position of the press
|
|
88
|
+
*/
|
|
89
|
+
onLongPress?: (event: MapPressEvent) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Called when the map has finished loading and is ready to use
|
|
92
|
+
*/
|
|
93
|
+
onMapReady?: () => void;
|
|
94
|
+
/**
|
|
95
|
+
* Called continuously during region/camera changes
|
|
96
|
+
* Use for live updates while user is panning/zooming
|
|
97
|
+
* @param region - Current region information
|
|
98
|
+
*/
|
|
99
|
+
onRegionChange?: (region: RegionChangeEvent) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Called after region/camera change has completed
|
|
102
|
+
* Use for final updates after user finishes panning/zooming
|
|
103
|
+
* @param region - Final region information
|
|
104
|
+
*/
|
|
105
|
+
onRegionChangeComplete?: (region: RegionChangeEvent) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Called when any marker on the map is pressed
|
|
108
|
+
* @param event - Contains the marker ID and coordinate
|
|
109
|
+
*/
|
|
110
|
+
onMarkerPress?: (event: MarkerPressEvent) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Called when a draggable marker starts being dragged
|
|
113
|
+
* @param event - Contains the marker ID and starting coordinate
|
|
114
|
+
*/
|
|
115
|
+
onMarkerDragStart?: (event: MarkerDragEvent) => void;
|
|
116
|
+
/**
|
|
117
|
+
* Called continuously while a marker is being dragged
|
|
118
|
+
* @param event - Contains the marker ID and current coordinate
|
|
119
|
+
*/
|
|
120
|
+
onMarkerDrag?: (event: MarkerDragEvent) => void;
|
|
121
|
+
/**
|
|
122
|
+
* Called when a draggable marker is dropped (drag ends)
|
|
123
|
+
* @param event - Contains the marker ID and final coordinate
|
|
124
|
+
*/
|
|
125
|
+
onMarkerDragEnd?: (event: MarkerDragEvent) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Called when a cluster of markers is tapped
|
|
128
|
+
* @param event - Contains the cluster coordinate, marker IDs, and count
|
|
129
|
+
*/
|
|
130
|
+
onClusterPress?: (event: ClusterPressEvent) => void;
|
|
131
|
+
/**
|
|
132
|
+
* Called when an error occurs in the map or marker operations
|
|
133
|
+
* @param error - Error information with code and message
|
|
134
|
+
*/
|
|
135
|
+
onError?: (error: MapError) => void;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Methods available on the NitroMap ref
|
|
139
|
+
* Access via `mapRef.current?.methodName()`
|
|
140
|
+
*/
|
|
141
|
+
export interface NitroMapMethods extends HybridViewMethods {
|
|
142
|
+
/**
|
|
143
|
+
* Animate the map to a new region
|
|
144
|
+
* @param region - Target region to animate to
|
|
145
|
+
* @param duration - Animation duration in milliseconds (default: 500)
|
|
146
|
+
*/
|
|
147
|
+
animateToRegion(region: Region, duration?: number): void;
|
|
148
|
+
/**
|
|
149
|
+
* Fit the map to show all provided coordinates
|
|
150
|
+
* @param coordinates - Array of coordinates to fit
|
|
151
|
+
* @param edgePadding - Optional padding from edges
|
|
152
|
+
* @param animated - Whether to animate the transition (default: true)
|
|
153
|
+
*/
|
|
154
|
+
fitToCoordinates(coordinates: Coordinate[], edgePadding?: EdgePadding, animated?: boolean): void;
|
|
155
|
+
/**
|
|
156
|
+
* Animate the camera to a specific position
|
|
157
|
+
* @param camera - Target camera configuration
|
|
158
|
+
* @param duration - Animation duration in milliseconds (default: 500)
|
|
159
|
+
*/
|
|
160
|
+
animateCamera(camera: Camera, duration?: number): void;
|
|
161
|
+
/**
|
|
162
|
+
* Get the current camera position and configuration
|
|
163
|
+
* @returns Promise resolving to current Camera state
|
|
164
|
+
*/
|
|
165
|
+
getCamera(): Promise<Camera>;
|
|
166
|
+
/**
|
|
167
|
+
* Set the camera position instantly (no animation)
|
|
168
|
+
* @param camera - Camera configuration to apply
|
|
169
|
+
*/
|
|
170
|
+
setCamera(camera: Camera): void;
|
|
171
|
+
/**
|
|
172
|
+
* Apply a custom style to the map
|
|
173
|
+
* @param style - Map style array (pass undefined to reset to default)
|
|
174
|
+
*/
|
|
175
|
+
setMapStyle(style?: MapStyle): void;
|
|
176
|
+
/**
|
|
177
|
+
* Get the current visible map boundaries
|
|
178
|
+
* @returns Promise resolving to northeast/southwest corners
|
|
179
|
+
*/
|
|
180
|
+
getMapBoundaries(): Promise<MapBoundaries>;
|
|
181
|
+
/**
|
|
182
|
+
* Enable or disable dark mode styling
|
|
183
|
+
* @param enabled - Whether dark mode should be enabled
|
|
184
|
+
*/
|
|
185
|
+
setIsDarkMode(enabled: boolean): void;
|
|
186
|
+
/**
|
|
187
|
+
* Add a single marker to the map
|
|
188
|
+
* @param marker - Full marker data configuration
|
|
189
|
+
*/
|
|
190
|
+
addMarker(marker: MarkerData): void;
|
|
191
|
+
/**
|
|
192
|
+
* Add multiple markers at once (more efficient than multiple addMarker calls)
|
|
193
|
+
* @param markers - Array of marker data configurations
|
|
194
|
+
*/
|
|
195
|
+
addMarkers(markers: MarkerData[]): void;
|
|
196
|
+
/**
|
|
197
|
+
* Update an existing marker's properties
|
|
198
|
+
* @param marker - Updated marker data (must include existing ID)
|
|
199
|
+
*/
|
|
200
|
+
updateMarker(marker: MarkerData): void;
|
|
201
|
+
/**
|
|
202
|
+
* Remove a marker from the map
|
|
203
|
+
* @param id - ID of the marker to remove
|
|
204
|
+
*/
|
|
205
|
+
removeMarker(id: string): void;
|
|
206
|
+
/**
|
|
207
|
+
* Select/highlight a marker (shows info window if available)
|
|
208
|
+
* @param id - ID of the marker to select
|
|
209
|
+
*/
|
|
210
|
+
selectMarker(id: string): void;
|
|
211
|
+
/**
|
|
212
|
+
* Remove all markers from the map
|
|
213
|
+
*/
|
|
214
|
+
clearMarkers(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Enable or disable marker clustering
|
|
217
|
+
* @param enabled - Whether clustering should be enabled
|
|
218
|
+
*/
|
|
219
|
+
setClusteringEnabled(enabled: boolean): void;
|
|
220
|
+
/**
|
|
221
|
+
* Force recalculation of clusters
|
|
222
|
+
* Call after dynamically adding/removing markers
|
|
223
|
+
*/
|
|
224
|
+
refreshClusters(): void;
|
|
225
|
+
}
|
|
226
|
+
export type NitroMap = HybridView<NitroMapProps, NitroMapMethods>;
|
|
227
|
+
//# sourceMappingURL=NitroMap.nitro.d.ts.map
|
|
@@ -0,0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CAAC;IAE7B;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACH,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAE3C;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAEtC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,YAAY,IAAI,IAAI,CAAC;IAErB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,eAAe,IAAI,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type HybridObject } from 'react-native-nitro-modules';
|
|
2
|
+
import type { MapProvider } from '../types/map';
|
|
3
|
+
export interface NitroMapConfig extends HybridObject<{
|
|
4
|
+
ios: 'swift';
|
|
5
|
+
android: 'kotlin';
|
|
6
|
+
}> {
|
|
7
|
+
NitroMapInitialize(apiKey: string, provider: MapProvider): void;
|
|
8
|
+
IsNitroMapInitialized(): boolean;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=NitroMapConfig.nitro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NitroMapConfig.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/NitroMapConfig.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,cACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IACzD,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAChE,qBAAqB,IAAI,OAAO,CAAC;CAClC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geographic region definition
|
|
3
|
+
* Defines a rectangular region on the map using center point and deltas
|
|
4
|
+
*/
|
|
5
|
+
export type Region = {
|
|
6
|
+
/** Center latitude of the region */
|
|
7
|
+
latitude: number;
|
|
8
|
+
/** Center longitude of the region */
|
|
9
|
+
longitude: number;
|
|
10
|
+
/** Latitude span (height of visible region) */
|
|
11
|
+
latitudeDelta: number;
|
|
12
|
+
/** Longitude span (width of visible region) */
|
|
13
|
+
longitudeDelta: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Geographic coordinate (latitude/longitude pair)
|
|
17
|
+
*/
|
|
18
|
+
export type Coordinate = {
|
|
19
|
+
/** Latitude in degrees (-90 to 90) */
|
|
20
|
+
latitude: number;
|
|
21
|
+
/** Longitude in degrees (-180 to 180) */
|
|
22
|
+
longitude: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Map display type
|
|
26
|
+
* - `'standard'` - Normal map with roads and labels
|
|
27
|
+
* - `'satellite'` - Satellite imagery
|
|
28
|
+
* - `'hybrid'` - Satellite with roads/labels overlay
|
|
29
|
+
*/
|
|
30
|
+
export type MapType = 'standard' | 'satellite' | 'hybrid';
|
|
31
|
+
/**
|
|
32
|
+
* Map provider to use for rendering.
|
|
33
|
+
* Currently only `'google'` is implemented. Apple and Yandex will be
|
|
34
|
+
* added once Google Maps is solid on both platforms.
|
|
35
|
+
* - `'google'` - Google Maps (iOS & Android) ✅
|
|
36
|
+
* - `'apple'` - Apple Maps (not yet implemented)
|
|
37
|
+
* - `'yandex'` - Yandex Maps (not yet implemented)
|
|
38
|
+
*/
|
|
39
|
+
export type MapProvider = 'google' | 'apple' | 'yandex';
|
|
40
|
+
/**
|
|
41
|
+
* Screen point (x/y coordinates in pixels)
|
|
42
|
+
*/
|
|
43
|
+
export type Point = {
|
|
44
|
+
/** X coordinate in pixels */
|
|
45
|
+
x: number;
|
|
46
|
+
/** Y coordinate in pixels */
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Event data when map is pressed
|
|
51
|
+
*/
|
|
52
|
+
export type MapPressEvent = {
|
|
53
|
+
/** Geographic coordinates of the press location */
|
|
54
|
+
coordinate: Coordinate;
|
|
55
|
+
/** Screen position of the press in pixels */
|
|
56
|
+
position: Point;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Event data during map region changes
|
|
60
|
+
*/
|
|
61
|
+
export type RegionChangeEvent = {
|
|
62
|
+
/** The new/current region */
|
|
63
|
+
region: Region;
|
|
64
|
+
/** Whether the change was caused by user gesture */
|
|
65
|
+
isGesture: boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Padding values for map edges (in pixels)
|
|
69
|
+
*/
|
|
70
|
+
export type EdgePadding = {
|
|
71
|
+
/** Top padding in pixels */
|
|
72
|
+
top: number;
|
|
73
|
+
/** Right padding in pixels */
|
|
74
|
+
right: number;
|
|
75
|
+
/** Bottom padding in pixels */
|
|
76
|
+
bottom: number;
|
|
77
|
+
/** Left padding in pixels */
|
|
78
|
+
left: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Camera position and orientation
|
|
82
|
+
*/
|
|
83
|
+
export type Camera = {
|
|
84
|
+
/** Center point the camera is looking at */
|
|
85
|
+
center: Coordinate;
|
|
86
|
+
/** Tilt angle in degrees (0 = looking straight down, 90 = looking at horizon) */
|
|
87
|
+
pitch: number;
|
|
88
|
+
/** Rotation/bearing in degrees (0 = north up) */
|
|
89
|
+
heading: number;
|
|
90
|
+
/** Altitude/elevation in meters */
|
|
91
|
+
altitude: number;
|
|
92
|
+
/** Zoom level (higher = closer) */
|
|
93
|
+
zoom: number;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Visible map boundaries (bounding box)
|
|
97
|
+
*/
|
|
98
|
+
export type MapBoundaries = {
|
|
99
|
+
/** Northeast corner of visible area */
|
|
100
|
+
northEast: Coordinate;
|
|
101
|
+
/** Southwest corner of visible area */
|
|
102
|
+
southWest: Coordinate;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Individual style element for Google Maps styling
|
|
106
|
+
*/
|
|
107
|
+
export type MapStyler = {
|
|
108
|
+
/** Color in hex format (e.g., "#FF0000") */
|
|
109
|
+
color?: string;
|
|
110
|
+
/** Visibility: "on", "off", or "simplified" */
|
|
111
|
+
visibility?: string;
|
|
112
|
+
/** Stroke/line weight in pixels */
|
|
113
|
+
weight?: number;
|
|
114
|
+
/** Color saturation adjustment (-100 to 100) */
|
|
115
|
+
saturation?: number;
|
|
116
|
+
/** Lightness adjustment (-100 to 100) */
|
|
117
|
+
lightness?: number;
|
|
118
|
+
/** Gamma adjustment (0.01 to 10.0) */
|
|
119
|
+
gamma?: number;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Map style element targeting specific features
|
|
123
|
+
* @see https://developers.google.com/maps/documentation/javascript/style-reference
|
|
124
|
+
*/
|
|
125
|
+
export type MapStyleElement = {
|
|
126
|
+
/** Feature type to style (e.g., "road", "water", "poi") */
|
|
127
|
+
featureType?: string;
|
|
128
|
+
/** Element type to style (e.g., "geometry", "labels") */
|
|
129
|
+
elementType?: string;
|
|
130
|
+
/** Style modifications to apply */
|
|
131
|
+
stylers: MapStyler[];
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Complete map style definition
|
|
135
|
+
* Array of style elements to customize map appearance
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const darkStyle: MapStyle = [
|
|
139
|
+
* { featureType: "all", stylers: [{ saturation: -100 }] },
|
|
140
|
+
* { featureType: "water", stylers: [{ color: "#0e171d" }] }
|
|
141
|
+
* ];
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
export type MapStyle = MapStyleElement[];
|
|
145
|
+
/**
|
|
146
|
+
* Error reported from native map operations
|
|
147
|
+
*/
|
|
148
|
+
export type MapError = {
|
|
149
|
+
/** Error code identifying the type of error */
|
|
150
|
+
code: string;
|
|
151
|
+
/** Human-readable error description */
|
|
152
|
+
message: string;
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../src/types/map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,MAA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