@maydon_tech/react-native-nitro-maps 0.1.4 → 0.2.1
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/build.gradle +6 -2
- 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 +137 -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 +84 -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++/JCoordinateRing.hpp +77 -0
- 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 +332 -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 +133 -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/CoordinateRing.kt +38 -0
- 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 +178 -17
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +18 -3
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +252 -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/CoordinateRing.swift +48 -0
- 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 +167 -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++/CoordinateRing.hpp +77 -0
- 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 +117 -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 +28 -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 +87 -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
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
export { NitroMap, default } from './components/NitroMap';
|
|
2
2
|
export { PriceMarker } from './components/PriceMarker';
|
|
3
3
|
export { ImageMarker } from './components/ImageMarker';
|
|
4
|
+
export { Marker } from './components/Marker';
|
|
5
|
+
export { NitroPolyline } from './components/NitroPolyline';
|
|
6
|
+
export { NitroPolygon } from './components/NitroPolygon';
|
|
7
|
+
export { NitroCircle } from './components/NitroCircle';
|
|
4
8
|
export type { NitroMapProps, NitroMapRef } from './components/NitroMap';
|
|
5
|
-
export type {
|
|
6
|
-
export
|
|
9
|
+
export type { NitroMapMethods } from './specs/NitroMap.nitro';
|
|
10
|
+
export { NitroMapContext } from './context/NitroMapContext';
|
|
11
|
+
export type { NitroMapContextValue } from './context/NitroMapContext';
|
|
12
|
+
export type { Region, Coordinate, MapType, MapPressEvent, RegionChangeEvent, EdgePadding, Camera, MapBoundaries, MapStyleElement, MapStyler, MapProvider, MapStyle, MapError, Point, UserLocationChangeEvent, UserTrackingMode, } from './types/map';
|
|
13
|
+
export type { MarkerStyle, PriceMarkerStyle, MarkerColor, ImageMarkerConfig, ClusterPressEvent, ClusterConfig, ClusterStrategy, MarkerAnimation, MarkerConfig, MarkerData, MarkerDragEvent, MarkerPressEvent, } from './types/marker';
|
|
14
|
+
export type { CoordinateRing, PolylineData, PolygonData, CircleData, } from './types/overlay';
|
|
15
|
+
export type { GoogleMapTheme, AppleMapTheme, YandexMapTheme, ThemeForProvider, MapTheme, } from './types/theme';
|
|
7
16
|
export { NitroMapInitialize, IsNitroMapInitialized, getDefaultProvider, type NitroMapInitConfig, } from './modules';
|
|
8
17
|
export type { PriceMarkerProps } from './components/PriceMarker';
|
|
9
18
|
export type { ImageMarkerProps } from './components/ImageMarker';
|
|
19
|
+
export type { MarkerProps } from './components/Marker';
|
|
20
|
+
export type { NitroPolylineProps } from './components/NitroPolyline';
|
|
21
|
+
export type { NitroPolygonProps } from './components/NitroPolygon';
|
|
22
|
+
export type { NitroCircleProps } from './components/NitroCircle';
|
|
10
23
|
export { rgb, hex, Colors } from './utils/colors';
|
|
11
24
|
export type { ColorValue } from './utils/colors';
|
|
12
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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;
|
|
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,WA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A0B,CAAC;AACjE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
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';
|
|
2
|
+
import type { Camera, Coordinate, EdgePadding, MapBoundaries, MapError, MapPressEvent, MapProvider, MapStyle, MapType, Point, Region, RegionChangeEvent, UserLocationChangeEvent, UserTrackingMode } from '../types/map';
|
|
3
3
|
import type { ClusterConfig, ClusterPressEvent, MarkerData, MarkerDragEvent, MarkerPressEvent } from '../types/marker';
|
|
4
|
+
import type { PolylineData, PolygonData, CircleData } from '../types/overlay';
|
|
4
5
|
/**
|
|
5
6
|
* Props for the NitroMap component
|
|
6
7
|
*/
|
|
@@ -24,6 +25,23 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
26
27
|
initialRegion?: Region;
|
|
28
|
+
/**
|
|
29
|
+
* Controlled region prop — moves the camera whenever the value changes.
|
|
30
|
+
*
|
|
31
|
+
* Unlike `initialRegion` (set once on mount) or the imperative
|
|
32
|
+
* `animateToRegion()` (called via ref), this is **declarative**:
|
|
33
|
+
* updating the state that feeds this prop re-renders and moves the camera.
|
|
34
|
+
*
|
|
35
|
+
* Pass `undefined` to stop controlling the region.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const [region, setRegion] = useState<Region>();
|
|
40
|
+
* <NitroMap region={region} />
|
|
41
|
+
* <Button onPress={() => setRegion({ latitude: 40.7, longitude: -74, latitudeDelta: 0.05, longitudeDelta: 0.05 })} />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
region?: Region;
|
|
27
45
|
/**
|
|
28
46
|
* Show the user's current location on the map
|
|
29
47
|
* Requires location permissions
|
|
@@ -59,24 +77,87 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
59
77
|
*/
|
|
60
78
|
mapType?: MapType;
|
|
61
79
|
/**
|
|
62
|
-
* Custom JSON styling for the map
|
|
80
|
+
* Custom JSON styling for the map.
|
|
81
|
+
* Currently uses Google Maps JSON format. Future providers (Apple, Yandex)
|
|
82
|
+
* will need provider-specific styling approaches.
|
|
63
83
|
* @see https://mapstyle.withgoogle.com/
|
|
64
84
|
*/
|
|
65
85
|
customMapStyle?: MapStyle;
|
|
66
86
|
/**
|
|
67
|
-
*
|
|
87
|
+
* Configuration for marker clustering behavior
|
|
88
|
+
*/
|
|
89
|
+
clusterConfig?: ClusterConfig;
|
|
90
|
+
/**
|
|
91
|
+
* Padding around the map edges to offset the map center and controls.
|
|
92
|
+
* Use when UI elements (navigation bars, bottom sheets) cover parts of the map.
|
|
93
|
+
* Values are in pixels (React Native logical pixels).
|
|
94
|
+
*/
|
|
95
|
+
mapPadding: EdgePadding;
|
|
96
|
+
/**
|
|
97
|
+
* Show real-time traffic conditions overlay on the map.
|
|
98
|
+
* Displays colored road segments indicating traffic flow.
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
showsTraffic?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Show 3D building models on the map when zoomed in.
|
|
68
104
|
* @default true
|
|
69
105
|
*/
|
|
70
|
-
|
|
106
|
+
showsBuildings?: boolean;
|
|
71
107
|
/**
|
|
72
|
-
*
|
|
108
|
+
* Show the compass indicator on the map.
|
|
109
|
+
* The compass appears when the map is rotated away from north.
|
|
110
|
+
* @default true
|
|
73
111
|
*/
|
|
74
|
-
|
|
112
|
+
showsCompass?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Minimum zoom level the user can zoom out to.
|
|
115
|
+
* Google Maps range: 1 (world) to 22 (building).
|
|
116
|
+
* @default 1
|
|
117
|
+
*/
|
|
118
|
+
minZoom: number;
|
|
119
|
+
/**
|
|
120
|
+
* Maximum zoom level the user can zoom in to.
|
|
121
|
+
* Google Maps range: 1 (world) to 22 (building).
|
|
122
|
+
* @default 22
|
|
123
|
+
*/
|
|
124
|
+
maxZoom: number;
|
|
75
125
|
/**
|
|
76
126
|
* Enable dark mode styling for the map
|
|
77
127
|
* @default false
|
|
78
128
|
*/
|
|
79
129
|
darkMode?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* User tracking mode for automatic camera following.
|
|
132
|
+
* - `'none'` - No tracking (default)
|
|
133
|
+
* - `'follow'` - Camera follows the user's position
|
|
134
|
+
* - `'followWithHeading'` - Camera follows and rotates with heading
|
|
135
|
+
* Requires `showsUserLocation={true}`.
|
|
136
|
+
* @default 'none'
|
|
137
|
+
*/
|
|
138
|
+
userTrackingMode?: UserTrackingMode;
|
|
139
|
+
/**
|
|
140
|
+
* Custom image URL for the user location marker.
|
|
141
|
+
* When set to a non-empty string, replaces the default blue dot with a custom marker.
|
|
142
|
+
* Supports remote URLs (https://) and local asset names.
|
|
143
|
+
* Set to `''` (empty string) to use the default blue dot.
|
|
144
|
+
* Requires `showsUserLocation={true}`.
|
|
145
|
+
* @default ''
|
|
146
|
+
*/
|
|
147
|
+
userLocationImage: string;
|
|
148
|
+
/**
|
|
149
|
+
* Size of the custom user location marker in points.
|
|
150
|
+
* Only applies when `userLocationImage` is set.
|
|
151
|
+
* @default 40
|
|
152
|
+
*/
|
|
153
|
+
userLocationSize: number;
|
|
154
|
+
/**
|
|
155
|
+
* Anchor point for the custom user location marker.
|
|
156
|
+
* Values are in 0-1 range: {x: 0, y: 0} = top-left, {x: 0.5, y: 0.5} = center.
|
|
157
|
+
* Only applies when `userLocationImage` is set.
|
|
158
|
+
* @default { x: 0.5, y: 0.5 }
|
|
159
|
+
*/
|
|
160
|
+
userLocationAnchor?: Point;
|
|
80
161
|
/**
|
|
81
162
|
* Called when the user taps on the map (not on a marker)
|
|
82
163
|
* @param event - Contains the coordinate and screen position of the tap
|
|
@@ -128,11 +209,77 @@ export interface NitroMapProps extends HybridViewProps {
|
|
|
128
209
|
* @param event - Contains the cluster coordinate, marker IDs, and count
|
|
129
210
|
*/
|
|
130
211
|
onClusterPress?: (event: ClusterPressEvent) => void;
|
|
212
|
+
/**
|
|
213
|
+
* Called when a tappable polyline is tapped.
|
|
214
|
+
* Requires `tappable={true}` on the `<NitroPolyline>`.
|
|
215
|
+
* @param id - The polyline ID
|
|
216
|
+
*/
|
|
217
|
+
onPolylinePress?: (id: string) => void;
|
|
218
|
+
/**
|
|
219
|
+
* Called when a tappable polygon is tapped.
|
|
220
|
+
* Requires `tappable={true}` on the `<NitroPolygon>`.
|
|
221
|
+
* @param id - The polygon ID
|
|
222
|
+
*/
|
|
223
|
+
onPolygonPress?: (id: string) => void;
|
|
224
|
+
/**
|
|
225
|
+
* Called when a tappable circle is tapped.
|
|
226
|
+
* Requires `tappable={true}` on the `<NitroCircle>`.
|
|
227
|
+
* @param id - The circle ID
|
|
228
|
+
*/
|
|
229
|
+
onCirclePress?: (id: string) => void;
|
|
131
230
|
/**
|
|
132
231
|
* Called when an error occurs in the map or marker operations
|
|
133
232
|
* @param error - Error information with code and message
|
|
134
233
|
*/
|
|
135
234
|
onError?: (error: MapError) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Called when the user's location changes.
|
|
237
|
+
* Requires `showsUserLocation={true}`.
|
|
238
|
+
* @param event - Contains coordinate, accuracy, and heading
|
|
239
|
+
*/
|
|
240
|
+
onUserLocationChange?: (event: UserLocationChangeEvent) => void;
|
|
241
|
+
/**
|
|
242
|
+
* Called when the library changes the tracking mode internally.
|
|
243
|
+
* For example, when the user pans the map during follow/heading mode,
|
|
244
|
+
* tracking is automatically disabled. Update your state accordingly:
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```tsx
|
|
248
|
+
* onUserTrackingModeChange={(mode) => setTrackingMode(mode)}
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
onUserTrackingModeChange?: (mode: UserTrackingMode) => void;
|
|
252
|
+
/**
|
|
253
|
+
* Called when location services fail (e.g. permission denied, location unavailable).
|
|
254
|
+
* Requires `showsUserLocation={true}`.
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```tsx
|
|
258
|
+
* onUserLocationError={(error) => {
|
|
259
|
+
* if (error.code === 'LOCATION_PERMISSION_DENIED') {
|
|
260
|
+
* showPermissionDialog();
|
|
261
|
+
* }
|
|
262
|
+
* }}
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
onUserLocationError?: (error: MapError) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Called when the map becomes fully idle — no pending animations,
|
|
268
|
+
* no active user gestures, all tiles loaded.
|
|
269
|
+
*
|
|
270
|
+
* **How it differs from `onRegionChangeComplete`:**
|
|
271
|
+
* - `onRegionChangeComplete` fires after each individual gesture or animation ends.
|
|
272
|
+
* - `onMapIdle` fires once when the map is completely settled.
|
|
273
|
+
*
|
|
274
|
+
* **Use case:** Fetch data for the visible region only after the user has
|
|
275
|
+
* finished navigating (not during every intermediate pan/zoom).
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```tsx
|
|
279
|
+
* onMapIdle={() => fetchListingsForRegion(currentRegion)}
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
onMapIdle?: () => void;
|
|
136
283
|
}
|
|
137
284
|
/**
|
|
138
285
|
* Methods available on the NitroMap ref
|
|
@@ -152,6 +299,14 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
152
299
|
* @param animated - Whether to animate the transition (default: true)
|
|
153
300
|
*/
|
|
154
301
|
fitToCoordinates(coordinates: Coordinate[], edgePadding?: EdgePadding, animated?: boolean): void;
|
|
302
|
+
/**
|
|
303
|
+
* Fit the map to show markers by their IDs.
|
|
304
|
+
* Looks up marker coordinates internally.
|
|
305
|
+
* @param markerIds - Array of marker IDs to fit
|
|
306
|
+
* @param edgePadding - Optional padding from edges
|
|
307
|
+
* @param animated - Whether to animate the transition (default: true)
|
|
308
|
+
*/
|
|
309
|
+
fitToSuppliedMarkers(markerIds: string[], edgePadding?: EdgePadding, animated?: boolean): void;
|
|
155
310
|
/**
|
|
156
311
|
* Animate the camera to a specific position
|
|
157
312
|
* @param camera - Target camera configuration
|
|
@@ -178,6 +333,31 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
178
333
|
* @returns Promise resolving to northeast/southwest corners
|
|
179
334
|
*/
|
|
180
335
|
getMapBoundaries(): Promise<MapBoundaries>;
|
|
336
|
+
/**
|
|
337
|
+
* Animate the camera to the user's current location.
|
|
338
|
+
* Requires `showsUserLocation={true}` and location permissions.
|
|
339
|
+
* No-op if the user's location is not yet available.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```tsx
|
|
343
|
+
* <TouchableOpacity onPress={() => mapRef.current?.centerOnUserLocation()}>
|
|
344
|
+
* <Text>📍 My Location</Text>
|
|
345
|
+
* </TouchableOpacity>
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
centerOnUserLocation(): void;
|
|
349
|
+
/**
|
|
350
|
+
* Convert a geographic coordinate to a screen point.
|
|
351
|
+
* @param coordinate - Geographic coordinate (latitude/longitude)
|
|
352
|
+
* @returns Screen point in pixels (React Native logical pixels, not physical)
|
|
353
|
+
*/
|
|
354
|
+
pointForCoordinate(coordinate: Coordinate): Point;
|
|
355
|
+
/**
|
|
356
|
+
* Convert a screen point to a geographic coordinate.
|
|
357
|
+
* @param point - Screen point in pixels (React Native logical pixels)
|
|
358
|
+
* @returns Geographic coordinate (latitude/longitude)
|
|
359
|
+
*/
|
|
360
|
+
coordinateForPoint(point: Point): Coordinate;
|
|
181
361
|
/**
|
|
182
362
|
* Enable or disable dark mode styling
|
|
183
363
|
* @param enabled - Whether dark mode should be enabled
|
|
@@ -208,6 +388,11 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
208
388
|
* @param id - ID of the marker to select
|
|
209
389
|
*/
|
|
210
390
|
selectMarker(id: string): void;
|
|
391
|
+
/**
|
|
392
|
+
* Deselect the currently selected marker and dismiss its info window.
|
|
393
|
+
* No-op if no marker is selected.
|
|
394
|
+
*/
|
|
395
|
+
deselectMarker(): void;
|
|
211
396
|
/**
|
|
212
397
|
* Remove all markers from the map
|
|
213
398
|
*/
|
|
@@ -222,6 +407,63 @@ export interface NitroMapMethods extends HybridViewMethods {
|
|
|
222
407
|
* Call after dynamically adding/removing markers
|
|
223
408
|
*/
|
|
224
409
|
refreshClusters(): void;
|
|
410
|
+
/**
|
|
411
|
+
* Add a polyline overlay to the map
|
|
412
|
+
* @param polyline - Polyline data configuration
|
|
413
|
+
*/
|
|
414
|
+
addPolyline(polyline: PolylineData): void;
|
|
415
|
+
/**
|
|
416
|
+
* Update an existing polyline's properties
|
|
417
|
+
* @param polyline - Updated polyline data (must include existing ID)
|
|
418
|
+
*/
|
|
419
|
+
updatePolyline(polyline: PolylineData): void;
|
|
420
|
+
/**
|
|
421
|
+
* Remove a polyline from the map
|
|
422
|
+
* @param id - ID of the polyline to remove
|
|
423
|
+
*/
|
|
424
|
+
removePolyline(id: string): void;
|
|
425
|
+
/**
|
|
426
|
+
* Remove all polylines from the map
|
|
427
|
+
*/
|
|
428
|
+
clearPolylines(): void;
|
|
429
|
+
/**
|
|
430
|
+
* Add a polygon overlay to the map
|
|
431
|
+
* @param polygon - Polygon data configuration
|
|
432
|
+
*/
|
|
433
|
+
addPolygon(polygon: PolygonData): void;
|
|
434
|
+
/**
|
|
435
|
+
* Update an existing polygon's properties
|
|
436
|
+
* @param polygon - Updated polygon data (must include existing ID)
|
|
437
|
+
*/
|
|
438
|
+
updatePolygon(polygon: PolygonData): void;
|
|
439
|
+
/**
|
|
440
|
+
* Remove a polygon from the map
|
|
441
|
+
* @param id - ID of the polygon to remove
|
|
442
|
+
*/
|
|
443
|
+
removePolygon(id: string): void;
|
|
444
|
+
/**
|
|
445
|
+
* Remove all polygons from the map
|
|
446
|
+
*/
|
|
447
|
+
clearPolygons(): void;
|
|
448
|
+
/**
|
|
449
|
+
* Add a circle overlay to the map
|
|
450
|
+
* @param circle - Circle data configuration
|
|
451
|
+
*/
|
|
452
|
+
addCircle(circle: CircleData): void;
|
|
453
|
+
/**
|
|
454
|
+
* Update an existing circle's properties
|
|
455
|
+
* @param circle - Updated circle data (must include existing ID)
|
|
456
|
+
*/
|
|
457
|
+
updateCircle(circle: CircleData): void;
|
|
458
|
+
/**
|
|
459
|
+
* Remove a circle from the map
|
|
460
|
+
* @param id - ID of the circle to remove
|
|
461
|
+
*/
|
|
462
|
+
removeCircle(id: string): void;
|
|
463
|
+
/**
|
|
464
|
+
* Remove all circles from the map
|
|
465
|
+
*/
|
|
466
|
+
clearCircles(): void;
|
|
225
467
|
}
|
|
226
468
|
export type NitroMap = HybridView<NitroMapProps, NitroMapMethods>;
|
|
227
469
|
//# sourceMappingURL=NitroMap.nitro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NitroMap.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/NitroMap.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACP,MAAM,EACN,iBAAiB,
|
|
1
|
+
{"version":3,"file":"NitroMap.nitro.d.ts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,YAAY,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;IAIvB;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IAItB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEpC;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,YAAY,IAAI,IAAI,CAAC;CACtB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -102,7 +102,12 @@ export type MapBoundaries = {
|
|
|
102
102
|
southWest: Coordinate;
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
105
|
-
* Individual style
|
|
105
|
+
* Individual style modifier for map styling.
|
|
106
|
+
*
|
|
107
|
+
* **Provider note:** Currently uses Google Maps JSON styling format.
|
|
108
|
+
* Apple Maps and Yandex Maps use different styling APIs and will require
|
|
109
|
+
* a provider-specific adapter when implemented.
|
|
110
|
+
* @see https://developers.google.com/maps/documentation/javascript/style-reference
|
|
106
111
|
*/
|
|
107
112
|
export type MapStyler = {
|
|
108
113
|
/** Color in hex format (e.g., "#FF0000") */
|
|
@@ -119,7 +124,12 @@ export type MapStyler = {
|
|
|
119
124
|
gamma?: number;
|
|
120
125
|
};
|
|
121
126
|
/**
|
|
122
|
-
* Map style element targeting specific features
|
|
127
|
+
* Map style element targeting specific map features.
|
|
128
|
+
*
|
|
129
|
+
* **Provider note:** Uses Google Maps JSON styling format (featureType/elementType/stylers).
|
|
130
|
+
* Future providers will need their own styling approach:
|
|
131
|
+
* - Apple Maps: `MKMapConfiguration` + visual features
|
|
132
|
+
* - Yandex Maps: Custom style format
|
|
123
133
|
* @see https://developers.google.com/maps/documentation/javascript/style-reference
|
|
124
134
|
*/
|
|
125
135
|
export type MapStyleElement = {
|
|
@@ -131,8 +141,8 @@ export type MapStyleElement = {
|
|
|
131
141
|
stylers: MapStyler[];
|
|
132
142
|
};
|
|
133
143
|
/**
|
|
134
|
-
* Complete map style definition
|
|
135
|
-
* Array of style elements to customize map appearance
|
|
144
|
+
* Complete map style definition (Google Maps JSON format).
|
|
145
|
+
* Array of style elements to customize map appearance.
|
|
136
146
|
* @example
|
|
137
147
|
* ```ts
|
|
138
148
|
* const darkStyle: MapStyle = [
|
|
@@ -151,4 +161,24 @@ export type MapError = {
|
|
|
151
161
|
/** Human-readable error description */
|
|
152
162
|
message: string;
|
|
153
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* Event data when the user's location changes
|
|
166
|
+
*/
|
|
167
|
+
export type UserLocationChangeEvent = {
|
|
168
|
+
/** The user's updated geographic coordinate */
|
|
169
|
+
coordinate: Coordinate;
|
|
170
|
+
/** Accuracy of the location in meters (may be 0 if unavailable) */
|
|
171
|
+
accuracy: number;
|
|
172
|
+
/** Heading in degrees (0-360, 0 = north; -1 if unavailable) */
|
|
173
|
+
heading: number;
|
|
174
|
+
/** Speed in meters per second (-1 if unavailable) */
|
|
175
|
+
speed: number;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* User tracking mode for the map camera
|
|
179
|
+
* - `'none'` - No automatic camera tracking
|
|
180
|
+
* - `'follow'` - Camera follows the user's location
|
|
181
|
+
* - `'followWithHeading'` - Camera follows and rotates based on heading
|
|
182
|
+
*/
|
|
183
|
+
export type UserTrackingMode = 'none' | 'follow' | 'followWithHeading';
|
|
154
184
|
//# sourceMappingURL=map.d.ts.map
|
|
@@ -1 +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,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,6BAA6B;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,6BAA6B;IAC7B,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,mDAAmD;IACnD,UAAU,EAAE,UAAU,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,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,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,OAAO,EAAE,SAAS,EAAE,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,+CAA+C;IAC/C,UAAU,EAAE,UAAU,CAAC;IACvB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,mBAAmB,CAAC"}
|
|
@@ -3,30 +3,17 @@ import type { ColorValue } from '../utils/colors';
|
|
|
3
3
|
/**
|
|
4
4
|
* Visual style of the marker
|
|
5
5
|
* - `'default'` - Standard Google Maps marker
|
|
6
|
-
* - `'price'` - Simple price tag
|
|
7
6
|
* - `'image'` - Custom image marker
|
|
8
7
|
* - `'priceMarker'` - Full-featured price marker with currency
|
|
9
|
-
* - `'reactView'` - React Native view marker (internal use by NitroCustomMarker)
|
|
10
|
-
*
|
|
11
|
-
* Note: For React Native views as markers, use the NitroCustomMarker component.
|
|
12
8
|
*/
|
|
13
9
|
export type MarkerStyle = 'default' | 'image' | 'priceMarker';
|
|
14
10
|
/**
|
|
15
|
-
* Animation type for
|
|
11
|
+
* Animation type for markers when they appear on the map.
|
|
12
|
+
* Uses semantic intents — each provider maps to its best native animation.
|
|
16
13
|
* - `'none'` - No animation
|
|
17
|
-
* - `'
|
|
18
|
-
* - `'fadeIn'` - Fade in animation
|
|
14
|
+
* - `'appear'` - Platform's native appear animation (iOS: pop, Android: drop)
|
|
19
15
|
*/
|
|
20
|
-
export type MarkerAnimation = 'none' | '
|
|
21
|
-
/**
|
|
22
|
-
* Animation style for cluster expand/collapse
|
|
23
|
-
* - `'default'` - Standard Google Maps Utils animation
|
|
24
|
-
* - `'bounce'` - Markers bounce when appearing
|
|
25
|
-
* - `'scale'` - Scale up from 0 to full size
|
|
26
|
-
* - `'fade'` - Fade in/out
|
|
27
|
-
* - `'spring'` - Spring effect animation
|
|
28
|
-
*/
|
|
29
|
-
export type ClusterAnimationStyle = 'default' | 'bounce' | 'scale' | 'fade' | 'spring';
|
|
16
|
+
export type MarkerAnimation = 'none' | 'appear';
|
|
30
17
|
/**
|
|
31
18
|
* Style configuration for price markers
|
|
32
19
|
* Colors can be hex strings ("#FF0000", "#F00") or MarkerColor objects
|
|
@@ -69,23 +56,6 @@ export type MarkerColor = {
|
|
|
69
56
|
/** Alpha/opacity component (0-255) */
|
|
70
57
|
a: number;
|
|
71
58
|
};
|
|
72
|
-
/**
|
|
73
|
-
* Configuration for price-style markers
|
|
74
|
-
*/
|
|
75
|
-
export type PriceMarkerConfig = {
|
|
76
|
-
/** Price text to display */
|
|
77
|
-
price: string;
|
|
78
|
-
/** Background color */
|
|
79
|
-
backgroundColor: MarkerColor;
|
|
80
|
-
/** Text color */
|
|
81
|
-
textColor: MarkerColor;
|
|
82
|
-
/** Font size in pixels */
|
|
83
|
-
fontSize: number;
|
|
84
|
-
/** Corner radius in pixels */
|
|
85
|
-
cornerRadius: number;
|
|
86
|
-
/** Whether marker is in selected state */
|
|
87
|
-
selected: boolean;
|
|
88
|
-
};
|
|
89
59
|
/**
|
|
90
60
|
* Configuration for image-style markers
|
|
91
61
|
* Colors can be hex strings ("#FF0000", "#F00") or MarkerColor objects
|
|
@@ -141,10 +111,23 @@ export type MarkerData = {
|
|
|
141
111
|
anchor: Point;
|
|
142
112
|
/** Visual configuration for the marker */
|
|
143
113
|
config: MarkerConfig;
|
|
114
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
115
|
+
accessibilityLabel?: string;
|
|
144
116
|
/** Whether this marker should be included in clustering */
|
|
145
117
|
clusteringEnabled: boolean;
|
|
146
118
|
/** Animation when marker appears */
|
|
147
119
|
animation: MarkerAnimation;
|
|
120
|
+
/**
|
|
121
|
+
* Animation duration in seconds.
|
|
122
|
+
* @default 0.3
|
|
123
|
+
*/
|
|
124
|
+
animationDuration: number;
|
|
125
|
+
/**
|
|
126
|
+
* Whether the marker should animate every time it reappears on the map
|
|
127
|
+
* (e.g., emerging from a cluster, scrolling back into viewport).
|
|
128
|
+
* When false, the animation only plays on the initial mount.
|
|
129
|
+
*/
|
|
130
|
+
animateOnReappear: boolean;
|
|
148
131
|
};
|
|
149
132
|
/**
|
|
150
133
|
* Event data when a marker is pressed
|
|
@@ -219,10 +202,15 @@ export type ClusterConfig = {
|
|
|
219
202
|
borderColor?: ColorValue;
|
|
220
203
|
/** Enable cluster animations @default true */
|
|
221
204
|
animatesClusters?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Whether cluster icons should animate every time they reappear
|
|
207
|
+
* (e.g., during pan/zoom re-clustering).
|
|
208
|
+
* When false, clusters only animate on first render.
|
|
209
|
+
* @default true
|
|
210
|
+
*/
|
|
211
|
+
animateOnReappear?: boolean;
|
|
222
212
|
/** Animation duration in seconds (e.g., 0.3) @default 0.3 */
|
|
223
213
|
animationDuration?: number;
|
|
224
|
-
/** Animation style for cluster expand/collapse @default 'default' */
|
|
225
|
-
animationStyle?: ClusterAnimationStyle;
|
|
226
214
|
/**
|
|
227
215
|
* When true, clusters update live during pan/zoom gestures (throttled).
|
|
228
216
|
* When false, clusters only update after the gesture ends (debounced).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../../src/types/marker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../../src/types/marker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iEAAiE;IACjE,uBAAuB,CAAC,EAAE,UAAU,CAAC;IACrC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,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AAC;IAChB,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,uEAAuE;IACvE,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Coordinate } from './map';
|
|
2
|
+
import type { MarkerColor } from './marker';
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper struct for an array of coordinates.
|
|
5
|
+
* Used to avoid nested arrays (Coordinate[][]) which trigger a Nitrogen codegen bug
|
|
6
|
+
* where variable names collide in the generated C++ JNI bridge code.
|
|
7
|
+
*/
|
|
8
|
+
export type CoordinateRing = {
|
|
9
|
+
/** Array of coordinates forming a ring (e.g., a polygon hole boundary) */
|
|
10
|
+
coordinates: Coordinate[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Data structure for a polyline overlay on the map.
|
|
14
|
+
* Represents a line connecting multiple geographic points.
|
|
15
|
+
*/
|
|
16
|
+
export type PolylineData = {
|
|
17
|
+
/** Unique identifier for the polyline */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Array of geographic coordinates that form the polyline path */
|
|
20
|
+
coordinates: Coordinate[];
|
|
21
|
+
/** Stroke color as RGBA */
|
|
22
|
+
strokeColor: MarkerColor;
|
|
23
|
+
/** Stroke width in pixels */
|
|
24
|
+
strokeWidth: number;
|
|
25
|
+
/** Whether the line follows Earth's curvature (great circle) */
|
|
26
|
+
geodesic: boolean;
|
|
27
|
+
/** Whether the line is dashed */
|
|
28
|
+
dashed: boolean;
|
|
29
|
+
/** Z-index for controlling overlay order */
|
|
30
|
+
zIndex: number;
|
|
31
|
+
/** Whether this overlay responds to tap events */
|
|
32
|
+
tappable: boolean;
|
|
33
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
34
|
+
accessibilityLabel?: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Data structure for a polygon overlay on the map.
|
|
38
|
+
* Represents a closed shape with fill and stroke.
|
|
39
|
+
*/
|
|
40
|
+
export type PolygonData = {
|
|
41
|
+
/** Unique identifier for the polygon */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Array of geographic coordinates that form the polygon boundary */
|
|
44
|
+
coordinates: Coordinate[];
|
|
45
|
+
/** Array of holes — each hole is a CoordinateRing cut out from the fill */
|
|
46
|
+
holes: CoordinateRing[];
|
|
47
|
+
/** Fill color as RGBA */
|
|
48
|
+
fillColor: MarkerColor;
|
|
49
|
+
/** Stroke color as RGBA */
|
|
50
|
+
strokeColor: MarkerColor;
|
|
51
|
+
/** Stroke width in pixels */
|
|
52
|
+
strokeWidth: number;
|
|
53
|
+
/** Z-index for controlling overlay order */
|
|
54
|
+
zIndex: number;
|
|
55
|
+
/** Whether this overlay responds to tap events */
|
|
56
|
+
tappable: boolean;
|
|
57
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
58
|
+
accessibilityLabel?: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Data structure for a circle overlay on the map.
|
|
62
|
+
* Represents a circle with center, radius, and styling.
|
|
63
|
+
*/
|
|
64
|
+
export type CircleData = {
|
|
65
|
+
/** Unique identifier for the circle */
|
|
66
|
+
id: string;
|
|
67
|
+
/** Center coordinate of the circle */
|
|
68
|
+
center: Coordinate;
|
|
69
|
+
/** Radius in meters */
|
|
70
|
+
radius: number;
|
|
71
|
+
/** Fill color as RGBA */
|
|
72
|
+
fillColor: MarkerColor;
|
|
73
|
+
/** Stroke color as RGBA */
|
|
74
|
+
strokeColor: MarkerColor;
|
|
75
|
+
/** Stroke width in pixels */
|
|
76
|
+
strokeWidth: number;
|
|
77
|
+
/** Z-index for controlling overlay order */
|
|
78
|
+
zIndex: number;
|
|
79
|
+
/** Whether this overlay responds to tap events */
|
|
80
|
+
tappable: boolean;
|
|
81
|
+
/** Accessibility label read by screen readers (VoiceOver / TalkBack) */
|
|
82
|
+
accessibilityLabel?: string;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=overlay.d.ts.map
|