@maydon_tech/react-native-nitro-maps 0.1.4 → 0.2.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 +1 -1
- package/NitroMap.podspec +1 -1
- package/README.md +82 -9
- package/android/CMakeLists.txt +4 -1
- package/android/gradle.properties +4 -4
- package/android/src/main/cpp/ClusterEngineJNI.cpp +198 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMap.kt +397 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMapConfig.kt +53 -0
- package/android/src/main/{java → kotlin}/com/margelo/nitro/nitromap/NitroMapPackage.kt +4 -4
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMapView.kt +73 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/UserLocationManager.kt +295 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/ClusterIconRenderer.kt +111 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/ClusteringManager.kt +104 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +166 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/MarkerIconFactory.kt +303 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/MarkerSelectionHandler.kt +72 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/PriceMarkerRenderer.kt +159 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/MapProviderFactory.kt +24 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +128 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapDelegate.kt +317 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Clustering.kt +524 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Markers.kt +358 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Overlays.kt +272 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+UserLocation.kt +296 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider.kt +815 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/MarkerTagData.kt +19 -0
- package/ios/Location/NitroLocationManager.swift +116 -0
- package/ios/MarkerRenderer/MarkerIconFactory.swift +1 -3
- package/ios/MarkerRenderer/PriceMarkerRenderer.swift +10 -6
- package/ios/NitroMap.swift +279 -13
- package/ios/NitroMapConfig/NitroMapConfig.swift +45 -0
- package/ios/Providers/{GoogleMapDelegate.swift → Google/GoogleMapDelegate.swift} +48 -23
- package/ios/Providers/Google/GoogleMapProvider+Camera.swift +180 -0
- package/ios/Providers/Google/GoogleMapProvider+Clustering.swift +541 -0
- package/ios/Providers/Google/GoogleMapProvider+Markers.swift +270 -0
- package/ios/Providers/Google/GoogleMapProvider+Overlays.swift +245 -0
- package/ios/Providers/Google/GoogleMapProvider+UserLocation.swift +180 -0
- package/ios/Providers/Google/GoogleMapProvider.swift +342 -0
- package/ios/Providers/MapProviderFactory.swift +17 -0
- package/ios/Providers/MapProviderProtocol.swift +48 -1
- package/ios/Shared/ClusterConfig+Factory.swift +2 -2
- package/ios/Shared/MapStyleProvider.swift +6 -4
- package/ios/Shared/MarkerSelectionHandler.swift +4 -1
- package/ios/Utils/ColorValueExtension.swift +46 -67
- package/lib/module/components/ImageMarker.js +39 -29
- package/lib/module/components/ImageMarker.js.map +1 -1
- package/lib/module/components/Marker.js +118 -0
- package/lib/module/components/Marker.js.map +1 -0
- package/lib/module/components/NitroCircle.js +92 -0
- package/lib/module/components/NitroCircle.js.map +1 -0
- package/lib/module/components/NitroMap.js +216 -76
- package/lib/module/components/NitroMap.js.map +1 -1
- package/lib/module/components/NitroPolygon.js +135 -0
- package/lib/module/components/NitroPolygon.js.map +1 -0
- package/lib/module/components/NitroPolyline.js +115 -0
- package/lib/module/components/NitroPolyline.js.map +1 -0
- package/lib/module/components/PriceMarker.js +16 -29
- package/lib/module/components/PriceMarker.js.map +1 -1
- package/lib/module/context/NitroMapContext.js.map +1 -1
- package/lib/module/hooks/useNitroCircle.js +18 -0
- package/lib/module/hooks/useNitroCircle.js.map +1 -0
- package/lib/module/hooks/useNitroMarker.js +26 -9
- package/lib/module/hooks/useNitroMarker.js.map +1 -1
- package/lib/module/hooks/useNitroOverlay.js +59 -0
- package/lib/module/hooks/useNitroOverlay.js.map +1 -0
- package/lib/module/hooks/useNitroPolygon.js +18 -0
- package/lib/module/hooks/useNitroPolygon.js.map +1 -0
- package/lib/module/hooks/useNitroPolyline.js +18 -0
- package/lib/module/hooks/useNitroPolyline.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/overlay.js +4 -0
- package/lib/module/types/overlay.js.map +1 -0
- package/lib/module/types/theme.js +4 -0
- package/lib/module/types/theme.js.map +1 -0
- package/lib/module/utils/colors.js +41 -13
- package/lib/module/utils/colors.js.map +1 -1
- package/lib/module/utils/validation.js +45 -0
- package/lib/module/utils/validation.js.map +1 -0
- package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -1
- package/lib/typescript/src/components/Marker.d.ts +34 -0
- package/lib/typescript/src/components/Marker.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroCircle.d.ts +70 -0
- package/lib/typescript/src/components/NitroCircle.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroMap.d.ts +60 -3
- package/lib/typescript/src/components/NitroMap.d.ts.map +1 -1
- package/lib/typescript/src/components/NitroPolygon.d.ts +86 -0
- package/lib/typescript/src/components/NitroPolygon.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroPolyline.d.ts +84 -0
- package/lib/typescript/src/components/NitroPolyline.d.ts.map +1 -0
- package/lib/typescript/src/components/PriceMarker.d.ts +0 -5
- package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -1
- package/lib/typescript/src/context/NitroMapContext.d.ts +2 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNitroCircle.d.ts +7 -0
- package/lib/typescript/src/hooks/useNitroCircle.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts +20 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNitroOverlay.d.ts +26 -0
- package/lib/typescript/src/hooks/useNitroOverlay.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroPolygon.d.ts +7 -0
- package/lib/typescript/src/hooks/useNitroPolygon.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroPolyline.d.ts +7 -0
- package/lib/typescript/src/hooks/useNitroPolyline.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +15 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts +248 -6
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types/map.d.ts +34 -4
- package/lib/typescript/src/types/map.d.ts.map +1 -1
- package/lib/typescript/src/types/marker.d.ts +24 -36
- package/lib/typescript/src/types/marker.d.ts.map +1 -1
- package/lib/typescript/src/types/overlay.d.ts +75 -0
- package/lib/typescript/src/types/overlay.d.ts.map +1 -0
- package/lib/typescript/src/types/theme.d.ts +93 -0
- package/lib/typescript/src/types/theme.d.ts.map +1 -0
- package/lib/typescript/src/utils/colors.d.ts +6 -8
- package/lib/typescript/src/utils/colors.d.ts.map +1 -1
- package/lib/typescript/src/utils/validation.d.ts +12 -0
- package/lib/typescript/src/utils/validation.d.ts.map +1 -0
- package/nitrogen/generated/android/c++/JCircleData.hpp +94 -0
- package/nitrogen/generated/android/c++/JClusterConfig.hpp +5 -7
- package/nitrogen/generated/android/c++/JFunc_void_UserLocationChangeEvent.hpp +79 -0
- package/nitrogen/generated/android/c++/JFunc_void_UserTrackingMode.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +328 -21
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +53 -2
- package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +3 -6
- package/nitrogen/generated/android/c++/JMarkerData.hpp +15 -3
- package/nitrogen/generated/android/c++/JPolygonData.hpp +149 -0
- package/nitrogen/generated/android/c++/JPolylineData.hpp +113 -0
- package/nitrogen/generated/android/c++/JUserLocationChangeEvent.hpp +70 -0
- package/nitrogen/generated/android/c++/JUserTrackingMode.hpp +62 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +72 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/CircleData.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_UserLocationChangeEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_UserTrackingMode.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_std__string.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +228 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +12 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PolygonData.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PolylineData.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/UserLocationChangeEvent.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/{ClusterAnimationStyle.kt → UserTrackingMode.kt} +6 -8
- package/nitrogen/generated/android/nitromapOnLoad.cpp +6 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +24 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +175 -17
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +15 -3
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +249 -16
- package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +90 -5
- package/nitrogen/generated/ios/swift/CircleData.swift +143 -0
- package/nitrogen/generated/ios/swift/ClusterConfig.swift +22 -15
- package/nitrogen/generated/ios/swift/Func_void_UserLocationChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_UserTrackingMode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +35 -1
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +582 -8
- package/nitrogen/generated/ios/swift/MarkerAnimation.swift +4 -8
- package/nitrogen/generated/ios/swift/MarkerData.swift +54 -2
- package/nitrogen/generated/ios/swift/PolygonData.swift +179 -0
- package/nitrogen/generated/ios/swift/PolylineData.swift +155 -0
- package/nitrogen/generated/ios/swift/UserLocationChangeEvent.swift +69 -0
- package/nitrogen/generated/ios/swift/UserTrackingMode.swift +44 -0
- package/nitrogen/generated/shared/c++/CircleData.hpp +113 -0
- package/nitrogen/generated/shared/c++/ClusterConfig.hpp +5 -8
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +53 -2
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +75 -6
- package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +4 -8
- package/nitrogen/generated/shared/c++/MarkerData.hpp +14 -2
- package/nitrogen/generated/shared/c++/PolygonData.hpp +114 -0
- package/nitrogen/generated/shared/c++/PolylineData.hpp +114 -0
- package/nitrogen/generated/shared/c++/UserLocationChangeEvent.hpp +88 -0
- package/nitrogen/generated/shared/c++/UserTrackingMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +216 -12
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +23 -1
- package/nitrogen/generated/shared/json/NitroMapConfig.json +18 -1
- package/package.json +36 -5
- package/src/components/ImageMarker.tsx +58 -42
- package/src/components/Marker.tsx +161 -0
- package/src/components/NitroCircle.tsx +183 -0
- package/src/components/NitroMap.tsx +328 -78
- package/src/components/NitroPolygon.tsx +229 -0
- package/src/components/NitroPolyline.tsx +208 -0
- package/src/components/PriceMarker.tsx +23 -48
- package/src/context/NitroMapContext.tsx +4 -0
- package/src/hooks/useNitroCircle.ts +25 -0
- package/src/hooks/useNitroMarker.ts +49 -10
- package/src/hooks/useNitroOverlay.ts +68 -0
- package/src/hooks/useNitroPolygon.ts +25 -0
- package/src/hooks/useNitroPolyline.ts +25 -0
- package/src/index.tsx +23 -2
- package/src/specs/NitroMap.nitro.ts +294 -5
- package/src/types/map.ts +36 -4
- package/src/types/marker.ts +24 -44
- package/src/types/overlay.ts +77 -0
- package/src/types/theme.ts +101 -0
- package/src/utils/colors.ts +48 -16
- package/src/utils/validation.ts +69 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +0 -108
- package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +0 -63
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +0 -408
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +0 -68
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +0 -176
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +0 -252
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +0 -252
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +0 -195
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +0 -912
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +0 -70
- package/cpp/QuadTree.hpp +0 -246
- package/ios/NitroMapConfig/HybridNitroMapConfig.swift +0 -33
- package/ios/Providers/GoogleMapProvider+Camera.swift +0 -164
- package/ios/Providers/GoogleMapProvider.swift +0 -924
- package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +0 -68
- package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +0 -52
- package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +0 -88
|
@@ -13,8 +13,11 @@ import type {
|
|
|
13
13
|
MapProvider,
|
|
14
14
|
MapStyle,
|
|
15
15
|
MapType,
|
|
16
|
+
Point,
|
|
16
17
|
Region,
|
|
17
18
|
RegionChangeEvent,
|
|
19
|
+
UserLocationChangeEvent,
|
|
20
|
+
UserTrackingMode,
|
|
18
21
|
} from '../types/map';
|
|
19
22
|
import type {
|
|
20
23
|
ClusterConfig,
|
|
@@ -23,6 +26,7 @@ import type {
|
|
|
23
26
|
MarkerDragEvent,
|
|
24
27
|
MarkerPressEvent,
|
|
25
28
|
} from '../types/marker';
|
|
29
|
+
import type { PolylineData, PolygonData, CircleData } from '../types/overlay';
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* Props for the NitroMap component
|
|
@@ -49,6 +53,24 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
49
53
|
*/
|
|
50
54
|
initialRegion?: Region;
|
|
51
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Controlled region prop — moves the camera whenever the value changes.
|
|
58
|
+
*
|
|
59
|
+
* Unlike `initialRegion` (set once on mount) or the imperative
|
|
60
|
+
* `animateToRegion()` (called via ref), this is **declarative**:
|
|
61
|
+
* updating the state that feeds this prop re-renders and moves the camera.
|
|
62
|
+
*
|
|
63
|
+
* Pass `undefined` to stop controlling the region.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* const [region, setRegion] = useState<Region>();
|
|
68
|
+
* <NitroMap region={region} />
|
|
69
|
+
* <Button onPress={() => setRegion({ latitude: 40.7, longitude: -74, latitudeDelta: 0.05, longitudeDelta: 0.05 })} />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
region?: Region;
|
|
73
|
+
|
|
52
74
|
/**
|
|
53
75
|
* Show the user's current location on the map
|
|
54
76
|
* Requires location permissions
|
|
@@ -90,21 +112,58 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
90
112
|
mapType?: MapType;
|
|
91
113
|
|
|
92
114
|
/**
|
|
93
|
-
* Custom JSON styling for the map
|
|
115
|
+
* Custom JSON styling for the map.
|
|
116
|
+
* Currently uses Google Maps JSON format. Future providers (Apple, Yandex)
|
|
117
|
+
* will need provider-specific styling approaches.
|
|
94
118
|
* @see https://mapstyle.withgoogle.com/
|
|
95
119
|
*/
|
|
96
120
|
customMapStyle?: MapStyle;
|
|
97
121
|
|
|
98
122
|
/**
|
|
99
|
-
*
|
|
123
|
+
* Configuration for marker clustering behavior
|
|
124
|
+
*/
|
|
125
|
+
clusterConfig?: ClusterConfig;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Padding around the map edges to offset the map center and controls.
|
|
129
|
+
* Use when UI elements (navigation bars, bottom sheets) cover parts of the map.
|
|
130
|
+
* Values are in pixels (React Native logical pixels).
|
|
131
|
+
*/
|
|
132
|
+
mapPadding: EdgePadding;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Show real-time traffic conditions overlay on the map.
|
|
136
|
+
* Displays colored road segments indicating traffic flow.
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
showsTraffic?: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Show 3D building models on the map when zoomed in.
|
|
100
143
|
* @default true
|
|
101
144
|
*/
|
|
102
|
-
|
|
145
|
+
showsBuildings?: boolean;
|
|
103
146
|
|
|
104
147
|
/**
|
|
105
|
-
*
|
|
148
|
+
* Show the compass indicator on the map.
|
|
149
|
+
* The compass appears when the map is rotated away from north.
|
|
150
|
+
* @default true
|
|
106
151
|
*/
|
|
107
|
-
|
|
152
|
+
showsCompass?: boolean;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Minimum zoom level the user can zoom out to.
|
|
156
|
+
* Google Maps range: 1 (world) to 22 (building).
|
|
157
|
+
* @default 1
|
|
158
|
+
*/
|
|
159
|
+
minZoom: number;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Maximum zoom level the user can zoom in to.
|
|
163
|
+
* Google Maps range: 1 (world) to 22 (building).
|
|
164
|
+
* @default 22
|
|
165
|
+
*/
|
|
166
|
+
maxZoom: number;
|
|
108
167
|
|
|
109
168
|
/**
|
|
110
169
|
* Enable dark mode styling for the map
|
|
@@ -112,6 +171,41 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
112
171
|
*/
|
|
113
172
|
darkMode?: boolean;
|
|
114
173
|
|
|
174
|
+
/**
|
|
175
|
+
* User tracking mode for automatic camera following.
|
|
176
|
+
* - `'none'` - No tracking (default)
|
|
177
|
+
* - `'follow'` - Camera follows the user's position
|
|
178
|
+
* - `'followWithHeading'` - Camera follows and rotates with heading
|
|
179
|
+
* Requires `showsUserLocation={true}`.
|
|
180
|
+
* @default 'none'
|
|
181
|
+
*/
|
|
182
|
+
userTrackingMode?: UserTrackingMode;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Custom image URL for the user location marker.
|
|
186
|
+
* When set to a non-empty string, replaces the default blue dot with a custom marker.
|
|
187
|
+
* Supports remote URLs (https://) and local asset names.
|
|
188
|
+
* Set to `''` (empty string) to use the default blue dot.
|
|
189
|
+
* Requires `showsUserLocation={true}`.
|
|
190
|
+
* @default ''
|
|
191
|
+
*/
|
|
192
|
+
userLocationImage: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Size of the custom user location marker in points.
|
|
196
|
+
* Only applies when `userLocationImage` is set.
|
|
197
|
+
* @default 40
|
|
198
|
+
*/
|
|
199
|
+
userLocationSize: number;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Anchor point for the custom user location marker.
|
|
203
|
+
* Values are in 0-1 range: {x: 0, y: 0} = top-left, {x: 0.5, y: 0.5} = center.
|
|
204
|
+
* Only applies when `userLocationImage` is set.
|
|
205
|
+
* @default { x: 0.5, y: 0.5 }
|
|
206
|
+
*/
|
|
207
|
+
userLocationAnchor?: Point;
|
|
208
|
+
|
|
115
209
|
/**
|
|
116
210
|
* Called when the user taps on the map (not on a marker)
|
|
117
211
|
* @param event - Contains the coordinate and screen position of the tap
|
|
@@ -173,11 +267,84 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
173
267
|
*/
|
|
174
268
|
onClusterPress?: (event: ClusterPressEvent) => void;
|
|
175
269
|
|
|
270
|
+
/**
|
|
271
|
+
* Called when a tappable polyline is tapped.
|
|
272
|
+
* Requires `tappable={true}` on the `<NitroPolyline>`.
|
|
273
|
+
* @param id - The polyline ID
|
|
274
|
+
*/
|
|
275
|
+
onPolylinePress?: (id: string) => void;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Called when a tappable polygon is tapped.
|
|
279
|
+
* Requires `tappable={true}` on the `<NitroPolygon>`.
|
|
280
|
+
* @param id - The polygon ID
|
|
281
|
+
*/
|
|
282
|
+
onPolygonPress?: (id: string) => void;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Called when a tappable circle is tapped.
|
|
286
|
+
* Requires `tappable={true}` on the `<NitroCircle>`.
|
|
287
|
+
* @param id - The circle ID
|
|
288
|
+
*/
|
|
289
|
+
onCirclePress?: (id: string) => void;
|
|
290
|
+
|
|
176
291
|
/**
|
|
177
292
|
* Called when an error occurs in the map or marker operations
|
|
178
293
|
* @param error - Error information with code and message
|
|
179
294
|
*/
|
|
180
295
|
onError?: (error: MapError) => void;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Called when the user's location changes.
|
|
299
|
+
* Requires `showsUserLocation={true}`.
|
|
300
|
+
* @param event - Contains coordinate, accuracy, and heading
|
|
301
|
+
*/
|
|
302
|
+
onUserLocationChange?: (event: UserLocationChangeEvent) => void;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Called when the library changes the tracking mode internally.
|
|
306
|
+
* For example, when the user pans the map during follow/heading mode,
|
|
307
|
+
* tracking is automatically disabled. Update your state accordingly:
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```tsx
|
|
311
|
+
* onUserTrackingModeChange={(mode) => setTrackingMode(mode)}
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
314
|
+
onUserTrackingModeChange?: (mode: UserTrackingMode) => void;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Called when location services fail (e.g. permission denied, location unavailable).
|
|
318
|
+
* Requires `showsUserLocation={true}`.
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```tsx
|
|
322
|
+
* onUserLocationError={(error) => {
|
|
323
|
+
* if (error.code === 'LOCATION_PERMISSION_DENIED') {
|
|
324
|
+
* showPermissionDialog();
|
|
325
|
+
* }
|
|
326
|
+
* }}
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
onUserLocationError?: (error: MapError) => void;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Called when the map becomes fully idle — no pending animations,
|
|
333
|
+
* no active user gestures, all tiles loaded.
|
|
334
|
+
*
|
|
335
|
+
* **How it differs from `onRegionChangeComplete`:**
|
|
336
|
+
* - `onRegionChangeComplete` fires after each individual gesture or animation ends.
|
|
337
|
+
* - `onMapIdle` fires once when the map is completely settled.
|
|
338
|
+
*
|
|
339
|
+
* **Use case:** Fetch data for the visible region only after the user has
|
|
340
|
+
* finished navigating (not during every intermediate pan/zoom).
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* ```tsx
|
|
344
|
+
* onMapIdle={() => fetchListingsForRegion(currentRegion)}
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
onMapIdle?: () => void;
|
|
181
348
|
}
|
|
182
349
|
|
|
183
350
|
/**
|
|
@@ -204,6 +371,19 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
204
371
|
animated?: boolean
|
|
205
372
|
): void;
|
|
206
373
|
|
|
374
|
+
/**
|
|
375
|
+
* Fit the map to show markers by their IDs.
|
|
376
|
+
* Looks up marker coordinates internally.
|
|
377
|
+
* @param markerIds - Array of marker IDs to fit
|
|
378
|
+
* @param edgePadding - Optional padding from edges
|
|
379
|
+
* @param animated - Whether to animate the transition (default: true)
|
|
380
|
+
*/
|
|
381
|
+
fitToSuppliedMarkers(
|
|
382
|
+
markerIds: string[],
|
|
383
|
+
edgePadding?: EdgePadding,
|
|
384
|
+
animated?: boolean
|
|
385
|
+
): void;
|
|
386
|
+
|
|
207
387
|
/**
|
|
208
388
|
* Animate the camera to a specific position
|
|
209
389
|
* @param camera - Target camera configuration
|
|
@@ -235,6 +415,34 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
235
415
|
*/
|
|
236
416
|
getMapBoundaries(): Promise<MapBoundaries>;
|
|
237
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Animate the camera to the user's current location.
|
|
420
|
+
* Requires `showsUserLocation={true}` and location permissions.
|
|
421
|
+
* No-op if the user's location is not yet available.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* ```tsx
|
|
425
|
+
* <TouchableOpacity onPress={() => mapRef.current?.centerOnUserLocation()}>
|
|
426
|
+
* <Text>📍 My Location</Text>
|
|
427
|
+
* </TouchableOpacity>
|
|
428
|
+
* ```
|
|
429
|
+
*/
|
|
430
|
+
centerOnUserLocation(): void;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Convert a geographic coordinate to a screen point.
|
|
434
|
+
* @param coordinate - Geographic coordinate (latitude/longitude)
|
|
435
|
+
* @returns Screen point in pixels (React Native logical pixels, not physical)
|
|
436
|
+
*/
|
|
437
|
+
pointForCoordinate(coordinate: Coordinate): Point;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Convert a screen point to a geographic coordinate.
|
|
441
|
+
* @param point - Screen point in pixels (React Native logical pixels)
|
|
442
|
+
* @returns Geographic coordinate (latitude/longitude)
|
|
443
|
+
*/
|
|
444
|
+
coordinateForPoint(point: Point): Coordinate;
|
|
445
|
+
|
|
238
446
|
/**
|
|
239
447
|
* Enable or disable dark mode styling
|
|
240
448
|
* @param enabled - Whether dark mode should be enabled
|
|
@@ -271,6 +479,12 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
271
479
|
*/
|
|
272
480
|
selectMarker(id: string): void;
|
|
273
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Deselect the currently selected marker and dismiss its info window.
|
|
484
|
+
* No-op if no marker is selected.
|
|
485
|
+
*/
|
|
486
|
+
deselectMarker(): void;
|
|
487
|
+
|
|
274
488
|
/**
|
|
275
489
|
* Remove all markers from the map
|
|
276
490
|
*/
|
|
@@ -287,6 +501,81 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
287
501
|
* Call after dynamically adding/removing markers
|
|
288
502
|
*/
|
|
289
503
|
refreshClusters(): void;
|
|
504
|
+
|
|
505
|
+
// ============ Polyline Methods ============
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Add a polyline overlay to the map
|
|
509
|
+
* @param polyline - Polyline data configuration
|
|
510
|
+
*/
|
|
511
|
+
addPolyline(polyline: PolylineData): void;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Update an existing polyline's properties
|
|
515
|
+
* @param polyline - Updated polyline data (must include existing ID)
|
|
516
|
+
*/
|
|
517
|
+
updatePolyline(polyline: PolylineData): void;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Remove a polyline from the map
|
|
521
|
+
* @param id - ID of the polyline to remove
|
|
522
|
+
*/
|
|
523
|
+
removePolyline(id: string): void;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Remove all polylines from the map
|
|
527
|
+
*/
|
|
528
|
+
clearPolylines(): void;
|
|
529
|
+
|
|
530
|
+
// ============ Polygon Methods ============
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Add a polygon overlay to the map
|
|
534
|
+
* @param polygon - Polygon data configuration
|
|
535
|
+
*/
|
|
536
|
+
addPolygon(polygon: PolygonData): void;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Update an existing polygon's properties
|
|
540
|
+
* @param polygon - Updated polygon data (must include existing ID)
|
|
541
|
+
*/
|
|
542
|
+
updatePolygon(polygon: PolygonData): void;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Remove a polygon from the map
|
|
546
|
+
* @param id - ID of the polygon to remove
|
|
547
|
+
*/
|
|
548
|
+
removePolygon(id: string): void;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Remove all polygons from the map
|
|
552
|
+
*/
|
|
553
|
+
clearPolygons(): void;
|
|
554
|
+
|
|
555
|
+
// ============ Circle Methods ============
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Add a circle overlay to the map
|
|
559
|
+
* @param circle - Circle data configuration
|
|
560
|
+
*/
|
|
561
|
+
addCircle(circle: CircleData): void;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Update an existing circle's properties
|
|
565
|
+
* @param circle - Updated circle data (must include existing ID)
|
|
566
|
+
*/
|
|
567
|
+
updateCircle(circle: CircleData): void;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Remove a circle from the map
|
|
571
|
+
* @param id - ID of the circle to remove
|
|
572
|
+
*/
|
|
573
|
+
removeCircle(id: string): void;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Remove all circles from the map
|
|
577
|
+
*/
|
|
578
|
+
clearCircles(): void;
|
|
290
579
|
}
|
|
291
580
|
|
|
292
581
|
export type NitroMap = HybridView<NitroMapProps, NitroMapMethods>;
|
package/src/types/map.ts
CHANGED
|
@@ -112,7 +112,12 @@ export type MapBoundaries = {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* Individual style
|
|
115
|
+
* Individual style modifier for map styling.
|
|
116
|
+
*
|
|
117
|
+
* **Provider note:** Currently uses Google Maps JSON styling format.
|
|
118
|
+
* Apple Maps and Yandex Maps use different styling APIs and will require
|
|
119
|
+
* a provider-specific adapter when implemented.
|
|
120
|
+
* @see https://developers.google.com/maps/documentation/javascript/style-reference
|
|
116
121
|
*/
|
|
117
122
|
export type MapStyler = {
|
|
118
123
|
/** Color in hex format (e.g., "#FF0000") */
|
|
@@ -130,7 +135,12 @@ export type MapStyler = {
|
|
|
130
135
|
};
|
|
131
136
|
|
|
132
137
|
/**
|
|
133
|
-
* Map style element targeting specific features
|
|
138
|
+
* Map style element targeting specific map features.
|
|
139
|
+
*
|
|
140
|
+
* **Provider note:** Uses Google Maps JSON styling format (featureType/elementType/stylers).
|
|
141
|
+
* Future providers will need their own styling approach:
|
|
142
|
+
* - Apple Maps: `MKMapConfiguration` + visual features
|
|
143
|
+
* - Yandex Maps: Custom style format
|
|
134
144
|
* @see https://developers.google.com/maps/documentation/javascript/style-reference
|
|
135
145
|
*/
|
|
136
146
|
export type MapStyleElement = {
|
|
@@ -143,8 +153,8 @@ export type MapStyleElement = {
|
|
|
143
153
|
};
|
|
144
154
|
|
|
145
155
|
/**
|
|
146
|
-
* Complete map style definition
|
|
147
|
-
* Array of style elements to customize map appearance
|
|
156
|
+
* Complete map style definition (Google Maps JSON format).
|
|
157
|
+
* Array of style elements to customize map appearance.
|
|
148
158
|
* @example
|
|
149
159
|
* ```ts
|
|
150
160
|
* const darkStyle: MapStyle = [
|
|
@@ -164,3 +174,25 @@ export type MapError = {
|
|
|
164
174
|
/** Human-readable error description */
|
|
165
175
|
message: string;
|
|
166
176
|
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Event data when the user's location changes
|
|
180
|
+
*/
|
|
181
|
+
export type UserLocationChangeEvent = {
|
|
182
|
+
/** The user's updated geographic coordinate */
|
|
183
|
+
coordinate: Coordinate;
|
|
184
|
+
/** Accuracy of the location in meters (may be 0 if unavailable) */
|
|
185
|
+
accuracy: number;
|
|
186
|
+
/** Heading in degrees (0-360, 0 = north; -1 if unavailable) */
|
|
187
|
+
heading: number;
|
|
188
|
+
/** Speed in meters per second (-1 if unavailable) */
|
|
189
|
+
speed: number;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* User tracking mode for the map camera
|
|
194
|
+
* - `'none'` - No automatic camera tracking
|
|
195
|
+
* - `'follow'` - Camera follows the user's location
|
|
196
|
+
* - `'followWithHeading'` - Camera follows and rotates based on heading
|
|
197
|
+
*/
|
|
198
|
+
export type UserTrackingMode = 'none' | 'follow' | 'followWithHeading';
|
package/src/types/marker.ts
CHANGED
|
@@ -4,37 +4,18 @@ import type { ColorValue } from '../utils/colors';
|
|
|
4
4
|
/**
|
|
5
5
|
* Visual style of the marker
|
|
6
6
|
* - `'default'` - Standard Google Maps marker
|
|
7
|
-
* - `'price'` - Simple price tag
|
|
8
7
|
* - `'image'` - Custom image marker
|
|
9
8
|
* - `'priceMarker'` - Full-featured price marker with currency
|
|
10
|
-
* - `'reactView'` - React Native view marker (internal use by NitroCustomMarker)
|
|
11
|
-
*
|
|
12
|
-
* Note: For React Native views as markers, use the NitroCustomMarker component.
|
|
13
9
|
*/
|
|
14
10
|
export type MarkerStyle = 'default' | 'image' | 'priceMarker';
|
|
15
11
|
|
|
16
12
|
/**
|
|
17
|
-
* Animation type for
|
|
13
|
+
* Animation type for markers when they appear on the map.
|
|
14
|
+
* Uses semantic intents — each provider maps to its best native animation.
|
|
18
15
|
* - `'none'` - No animation
|
|
19
|
-
* - `'
|
|
20
|
-
* - `'fadeIn'` - Fade in animation
|
|
16
|
+
* - `'appear'` - Platform's native appear animation (iOS: pop, Android: drop)
|
|
21
17
|
*/
|
|
22
|
-
export type MarkerAnimation = 'none' | '
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Animation style for cluster expand/collapse
|
|
26
|
-
* - `'default'` - Standard Google Maps Utils animation
|
|
27
|
-
* - `'bounce'` - Markers bounce when appearing
|
|
28
|
-
* - `'scale'` - Scale up from 0 to full size
|
|
29
|
-
* - `'fade'` - Fade in/out
|
|
30
|
-
* - `'spring'` - Spring effect animation
|
|
31
|
-
*/
|
|
32
|
-
export type ClusterAnimationStyle =
|
|
33
|
-
| 'default'
|
|
34
|
-
| 'bounce'
|
|
35
|
-
| 'scale'
|
|
36
|
-
| 'fade'
|
|
37
|
-
| 'spring';
|
|
18
|
+
export type MarkerAnimation = 'none' | 'appear';
|
|
38
19
|
|
|
39
20
|
/**
|
|
40
21
|
* Style configuration for price markers
|
|
@@ -80,24 +61,6 @@ export type MarkerColor = {
|
|
|
80
61
|
a: number;
|
|
81
62
|
};
|
|
82
63
|
|
|
83
|
-
/**
|
|
84
|
-
* Configuration for price-style markers
|
|
85
|
-
*/
|
|
86
|
-
export type PriceMarkerConfig = {
|
|
87
|
-
/** Price text to display */
|
|
88
|
-
price: string;
|
|
89
|
-
/** Background color */
|
|
90
|
-
backgroundColor: MarkerColor;
|
|
91
|
-
/** Text color */
|
|
92
|
-
textColor: MarkerColor;
|
|
93
|
-
/** Font size in pixels */
|
|
94
|
-
fontSize: number;
|
|
95
|
-
/** Corner radius in pixels */
|
|
96
|
-
cornerRadius: number;
|
|
97
|
-
/** Whether marker is in selected state */
|
|
98
|
-
selected: boolean;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
64
|
/**
|
|
102
65
|
* Configuration for image-style markers
|
|
103
66
|
* Colors can be hex strings ("#FF0000", "#F00") or MarkerColor objects
|
|
@@ -129,7 +92,6 @@ export type MarkerConfig = {
|
|
|
129
92
|
image?: ImageMarkerConfig;
|
|
130
93
|
/** Price marker style config (when style is 'priceMarker') */
|
|
131
94
|
priceMarker?: PriceMarkerStyle;
|
|
132
|
-
/** React view marker config (when style is 'reactView') */
|
|
133
95
|
};
|
|
134
96
|
|
|
135
97
|
/**
|
|
@@ -156,10 +118,23 @@ export type MarkerData = {
|
|
|
156
118
|
anchor: Point;
|
|
157
119
|
/** Visual configuration for the marker */
|
|
158
120
|
config: MarkerConfig;
|
|
121
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
122
|
+
accessibilityLabel?: string;
|
|
159
123
|
/** Whether this marker should be included in clustering */
|
|
160
124
|
clusteringEnabled: boolean;
|
|
161
125
|
/** Animation when marker appears */
|
|
162
126
|
animation: MarkerAnimation;
|
|
127
|
+
/**
|
|
128
|
+
* Animation duration in seconds.
|
|
129
|
+
* @default 0.3
|
|
130
|
+
*/
|
|
131
|
+
animationDuration: number;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the marker should animate every time it reappears on the map
|
|
134
|
+
* (e.g., emerging from a cluster, scrolling back into viewport).
|
|
135
|
+
* When false, the animation only plays on the initial mount.
|
|
136
|
+
*/
|
|
137
|
+
animateOnReappear: boolean;
|
|
163
138
|
};
|
|
164
139
|
|
|
165
140
|
/**
|
|
@@ -239,10 +214,15 @@ export type ClusterConfig = {
|
|
|
239
214
|
borderColor?: ColorValue;
|
|
240
215
|
/** Enable cluster animations @default true */
|
|
241
216
|
animatesClusters?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Whether cluster icons should animate every time they reappear
|
|
219
|
+
* (e.g., during pan/zoom re-clustering).
|
|
220
|
+
* When false, clusters only animate on first render.
|
|
221
|
+
* @default true
|
|
222
|
+
*/
|
|
223
|
+
animateOnReappear?: boolean;
|
|
242
224
|
/** Animation duration in seconds (e.g., 0.3) @default 0.3 */
|
|
243
225
|
animationDuration?: number;
|
|
244
|
-
/** Animation style for cluster expand/collapse @default 'default' */
|
|
245
|
-
animationStyle?: ClusterAnimationStyle;
|
|
246
226
|
/**
|
|
247
227
|
* When true, clusters update live during pan/zoom gestures (throttled).
|
|
248
228
|
* When false, clusters only update after the gesture ends (debounced).
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Coordinate } from './map';
|
|
2
|
+
import type { MarkerColor } from './marker';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Data structure for a polyline overlay on the map.
|
|
6
|
+
* Represents a line connecting multiple geographic points.
|
|
7
|
+
*/
|
|
8
|
+
export type PolylineData = {
|
|
9
|
+
/** Unique identifier for the polyline */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Array of geographic coordinates that form the polyline path */
|
|
12
|
+
coordinates: Coordinate[];
|
|
13
|
+
/** Stroke color as RGBA */
|
|
14
|
+
strokeColor: MarkerColor;
|
|
15
|
+
/** Stroke width in pixels */
|
|
16
|
+
strokeWidth: number;
|
|
17
|
+
/** Whether the line follows Earth's curvature (great circle) */
|
|
18
|
+
geodesic: boolean;
|
|
19
|
+
/** Whether the line is dashed */
|
|
20
|
+
dashed: boolean;
|
|
21
|
+
/** Z-index for controlling overlay order */
|
|
22
|
+
zIndex: number;
|
|
23
|
+
/** Whether this overlay responds to tap events */
|
|
24
|
+
tappable: boolean;
|
|
25
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
26
|
+
accessibilityLabel?: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Data structure for a polygon overlay on the map.
|
|
31
|
+
* Represents a closed shape with fill and stroke.
|
|
32
|
+
*/
|
|
33
|
+
export type PolygonData = {
|
|
34
|
+
/** Unique identifier for the polygon */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Array of geographic coordinates that form the polygon boundary */
|
|
37
|
+
coordinates: Coordinate[];
|
|
38
|
+
/** Optional array of holes — each hole is an array of coordinates cut out from the fill */
|
|
39
|
+
holes: Coordinate[][];
|
|
40
|
+
/** Fill color as RGBA */
|
|
41
|
+
fillColor: MarkerColor;
|
|
42
|
+
/** Stroke color as RGBA */
|
|
43
|
+
strokeColor: MarkerColor;
|
|
44
|
+
/** Stroke width in pixels */
|
|
45
|
+
strokeWidth: number;
|
|
46
|
+
/** Z-index for controlling overlay order */
|
|
47
|
+
zIndex: number;
|
|
48
|
+
/** Whether this overlay responds to tap events */
|
|
49
|
+
tappable: boolean;
|
|
50
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
51
|
+
accessibilityLabel?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Data structure for a circle overlay on the map.
|
|
56
|
+
* Represents a circle with center, radius, and styling.
|
|
57
|
+
*/
|
|
58
|
+
export type CircleData = {
|
|
59
|
+
/** Unique identifier for the circle */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Center coordinate of the circle */
|
|
62
|
+
center: Coordinate;
|
|
63
|
+
/** Radius in meters */
|
|
64
|
+
radius: number;
|
|
65
|
+
/** Fill color as RGBA */
|
|
66
|
+
fillColor: MarkerColor;
|
|
67
|
+
/** Stroke color as RGBA */
|
|
68
|
+
strokeColor: MarkerColor;
|
|
69
|
+
/** Stroke width in pixels */
|
|
70
|
+
strokeWidth: number;
|
|
71
|
+
/** Z-index for controlling overlay order */
|
|
72
|
+
zIndex: number;
|
|
73
|
+
/** Whether this overlay responds to tap events */
|
|
74
|
+
tappable: boolean;
|
|
75
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
76
|
+
accessibilityLabel?: string;
|
|
77
|
+
};
|