@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
|
@@ -19,7 +19,7 @@ public extension ClusterConfig {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a new instance of `ClusterConfig`.
|
|
21
21
|
*/
|
|
22
|
-
init(enabled: Bool, strategy: ClusterStrategy?, radius: Double?, minimumClusterSize: Double?, maxZoom: Double?, backgroundColor: Variant_String_MarkerColor?, textColor: Variant_String_MarkerColor?, borderWidth: Double?, borderColor: Variant_String_MarkerColor?, animatesClusters: Bool?,
|
|
22
|
+
init(enabled: Bool, strategy: ClusterStrategy?, radius: Double?, minimumClusterSize: Double?, maxZoom: Double?, backgroundColor: Variant_String_MarkerColor?, textColor: Variant_String_MarkerColor?, borderWidth: Double?, borderColor: Variant_String_MarkerColor?, animatesClusters: Bool?, animateOnReappear: Bool?, animationDuration: Double?, realtimeClustering: Bool?, renderBuffer: Double?, throttleInterval: Double?) {
|
|
23
23
|
self.init(enabled, { () -> bridge.std__optional_ClusterStrategy_ in
|
|
24
24
|
if let __unwrappedValue = strategy {
|
|
25
25
|
return bridge.create_std__optional_ClusterStrategy_(__unwrappedValue)
|
|
@@ -95,15 +95,15 @@ public extension ClusterConfig {
|
|
|
95
95
|
} else {
|
|
96
96
|
return .init()
|
|
97
97
|
}
|
|
98
|
-
}(), { () -> bridge.
|
|
99
|
-
if let __unwrappedValue =
|
|
100
|
-
return bridge.
|
|
98
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
99
|
+
if let __unwrappedValue = animateOnReappear {
|
|
100
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
101
101
|
} else {
|
|
102
102
|
return .init()
|
|
103
103
|
}
|
|
104
|
-
}(), { () -> bridge.
|
|
105
|
-
if let __unwrappedValue =
|
|
106
|
-
return bridge.
|
|
104
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
105
|
+
if let __unwrappedValue = animationDuration {
|
|
106
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
107
107
|
} else {
|
|
108
108
|
return .init()
|
|
109
109
|
}
|
|
@@ -377,16 +377,23 @@ public extension ClusterConfig {
|
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
var
|
|
380
|
+
var animateOnReappear: Bool? {
|
|
381
381
|
@inline(__always)
|
|
382
382
|
get {
|
|
383
|
-
return
|
|
383
|
+
return { () -> Bool? in
|
|
384
|
+
if bridge.has_value_std__optional_bool_(self.__animateOnReappear) {
|
|
385
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__animateOnReappear)
|
|
386
|
+
return __unwrapped
|
|
387
|
+
} else {
|
|
388
|
+
return nil
|
|
389
|
+
}
|
|
390
|
+
}()
|
|
384
391
|
}
|
|
385
392
|
@inline(__always)
|
|
386
393
|
set {
|
|
387
|
-
self.
|
|
394
|
+
self.__animateOnReappear = { () -> bridge.std__optional_bool_ in
|
|
388
395
|
if let __unwrappedValue = newValue {
|
|
389
|
-
return bridge.
|
|
396
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
390
397
|
} else {
|
|
391
398
|
return .init()
|
|
392
399
|
}
|
|
@@ -394,16 +401,16 @@ public extension ClusterConfig {
|
|
|
394
401
|
}
|
|
395
402
|
}
|
|
396
403
|
|
|
397
|
-
var
|
|
404
|
+
var animationDuration: Double? {
|
|
398
405
|
@inline(__always)
|
|
399
406
|
get {
|
|
400
|
-
return self.
|
|
407
|
+
return self.__animationDuration.value
|
|
401
408
|
}
|
|
402
409
|
@inline(__always)
|
|
403
410
|
set {
|
|
404
|
-
self.
|
|
411
|
+
self.__animationDuration = { () -> bridge.std__optional_double_ in
|
|
405
412
|
if let __unwrappedValue = newValue {
|
|
406
|
-
return bridge.
|
|
413
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
407
414
|
} else {
|
|
408
415
|
return .init()
|
|
409
416
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_UserLocationChangeEvent.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ event: UserLocationChangeEvent) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_UserLocationChangeEvent {
|
|
16
|
+
public typealias bridge = margelo.nitro.nitromap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ event: UserLocationChangeEvent) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ event: UserLocationChangeEvent) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(event: UserLocationChangeEvent) -> Void {
|
|
26
|
+
self.closure(event)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_UserLocationChangeEvent`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_UserLocationChangeEvent>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_UserLocationChangeEvent {
|
|
45
|
+
return Unmanaged<Func_void_UserLocationChangeEvent>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_UserTrackingMode.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ mode: UserTrackingMode) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_UserTrackingMode {
|
|
16
|
+
public typealias bridge = margelo.nitro.nitromap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ mode: UserTrackingMode) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ mode: UserTrackingMode) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(mode: Int32) -> Void {
|
|
26
|
+
self.closure(margelo.nitro.nitromap.UserTrackingMode(rawValue: mode)!)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_UserTrackingMode`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_UserTrackingMode>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_UserTrackingMode {
|
|
45
|
+
return Unmanaged<Func_void_UserTrackingMode>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__string.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ id: String) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_std__string {
|
|
16
|
+
public typealias bridge = margelo.nitro.nitromap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ id: String) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ id: String) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(id: std.string) -> Void {
|
|
26
|
+
self.closure(String(id))
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_std__string`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__string>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__string {
|
|
45
|
+
return Unmanaged<Func_void_std__string>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -13,6 +13,7 @@ public protocol HybridNitroMapSpec_protocol: HybridObject, HybridView {
|
|
|
13
13
|
// Properties
|
|
14
14
|
var provider: MapProvider? { get set }
|
|
15
15
|
var initialRegion: Region? { get set }
|
|
16
|
+
var region: Region? { get set }
|
|
16
17
|
var showsUserLocation: Bool? { get set }
|
|
17
18
|
var zoomEnabled: Bool? { get set }
|
|
18
19
|
var scrollEnabled: Bool? { get set }
|
|
@@ -20,9 +21,18 @@ public protocol HybridNitroMapSpec_protocol: HybridObject, HybridView {
|
|
|
20
21
|
var pitchEnabled: Bool? { get set }
|
|
21
22
|
var mapType: MapType? { get set }
|
|
22
23
|
var customMapStyle: [MapStyleElement]? { get set }
|
|
23
|
-
var showsMyLocationButton: Bool? { get set }
|
|
24
24
|
var clusterConfig: ClusterConfig? { get set }
|
|
25
|
+
var mapPadding: EdgePadding { get set }
|
|
26
|
+
var showsTraffic: Bool? { get set }
|
|
27
|
+
var showsBuildings: Bool? { get set }
|
|
28
|
+
var showsCompass: Bool? { get set }
|
|
29
|
+
var minZoom: Double { get set }
|
|
30
|
+
var maxZoom: Double { get set }
|
|
25
31
|
var darkMode: Bool? { get set }
|
|
32
|
+
var userTrackingMode: UserTrackingMode? { get set }
|
|
33
|
+
var userLocationImage: String { get set }
|
|
34
|
+
var userLocationSize: Double { get set }
|
|
35
|
+
var userLocationAnchor: Point? { get set }
|
|
26
36
|
var onPress: ((_ event: MapPressEvent) -> Void)? { get set }
|
|
27
37
|
var onLongPress: ((_ event: MapPressEvent) -> Void)? { get set }
|
|
28
38
|
var onMapReady: (() -> Void)? { get set }
|
|
@@ -33,25 +43,49 @@ public protocol HybridNitroMapSpec_protocol: HybridObject, HybridView {
|
|
|
33
43
|
var onMarkerDrag: ((_ event: MarkerDragEvent) -> Void)? { get set }
|
|
34
44
|
var onMarkerDragEnd: ((_ event: MarkerDragEvent) -> Void)? { get set }
|
|
35
45
|
var onClusterPress: ((_ event: ClusterPressEvent) -> Void)? { get set }
|
|
46
|
+
var onPolylinePress: ((_ id: String) -> Void)? { get set }
|
|
47
|
+
var onPolygonPress: ((_ id: String) -> Void)? { get set }
|
|
48
|
+
var onCirclePress: ((_ id: String) -> Void)? { get set }
|
|
36
49
|
var onError: ((_ error: MapError) -> Void)? { get set }
|
|
50
|
+
var onUserLocationChange: ((_ event: UserLocationChangeEvent) -> Void)? { get set }
|
|
51
|
+
var onUserTrackingModeChange: ((_ mode: UserTrackingMode) -> Void)? { get set }
|
|
52
|
+
var onUserLocationError: ((_ error: MapError) -> Void)? { get set }
|
|
53
|
+
var onMapIdle: (() -> Void)? { get set }
|
|
37
54
|
|
|
38
55
|
// Methods
|
|
39
56
|
func animateToRegion(region: Region, duration: Double?) throws -> Void
|
|
40
57
|
func fitToCoordinates(coordinates: [Coordinate], edgePadding: EdgePadding?, animated: Bool?) throws -> Void
|
|
58
|
+
func fitToSuppliedMarkers(markerIds: [String], edgePadding: EdgePadding?, animated: Bool?) throws -> Void
|
|
41
59
|
func animateCamera(camera: Camera, duration: Double?) throws -> Void
|
|
42
60
|
func getCamera() throws -> Promise<Camera>
|
|
43
61
|
func setCamera(camera: Camera) throws -> Void
|
|
44
62
|
func setMapStyle(style: [MapStyleElement]?) throws -> Void
|
|
45
63
|
func getMapBoundaries() throws -> Promise<MapBoundaries>
|
|
64
|
+
func centerOnUserLocation() throws -> Void
|
|
65
|
+
func pointForCoordinate(coordinate: Coordinate) throws -> Point
|
|
66
|
+
func coordinateForPoint(point: Point) throws -> Coordinate
|
|
46
67
|
func setIsDarkMode(enabled: Bool) throws -> Void
|
|
47
68
|
func addMarker(marker: MarkerData) throws -> Void
|
|
48
69
|
func addMarkers(markers: [MarkerData]) throws -> Void
|
|
49
70
|
func updateMarker(marker: MarkerData) throws -> Void
|
|
50
71
|
func removeMarker(id: String) throws -> Void
|
|
51
72
|
func selectMarker(id: String) throws -> Void
|
|
73
|
+
func deselectMarker() throws -> Void
|
|
52
74
|
func clearMarkers() throws -> Void
|
|
53
75
|
func setClusteringEnabled(enabled: Bool) throws -> Void
|
|
54
76
|
func refreshClusters() throws -> Void
|
|
77
|
+
func addPolyline(polyline: PolylineData) throws -> Void
|
|
78
|
+
func updatePolyline(polyline: PolylineData) throws -> Void
|
|
79
|
+
func removePolyline(id: String) throws -> Void
|
|
80
|
+
func clearPolylines() throws -> Void
|
|
81
|
+
func addPolygon(polygon: PolygonData) throws -> Void
|
|
82
|
+
func updatePolygon(polygon: PolygonData) throws -> Void
|
|
83
|
+
func removePolygon(id: String) throws -> Void
|
|
84
|
+
func clearPolygons() throws -> Void
|
|
85
|
+
func addCircle(circle: CircleData) throws -> Void
|
|
86
|
+
func updateCircle(circle: CircleData) throws -> Void
|
|
87
|
+
func removeCircle(id: String) throws -> Void
|
|
88
|
+
func clearCircles() throws -> Void
|
|
55
89
|
}
|
|
56
90
|
|
|
57
91
|
public extension HybridNitroMapSpec_protocol {
|