@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.
Files changed (217) hide show
  1. package/LICENSE +1 -1
  2. package/NitroMap.podspec +1 -1
  3. package/README.md +82 -9
  4. package/android/CMakeLists.txt +4 -1
  5. package/android/gradle.properties +4 -4
  6. package/android/src/main/cpp/ClusterEngineJNI.cpp +198 -0
  7. package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMap.kt +397 -0
  8. package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMapConfig.kt +53 -0
  9. package/android/src/main/{java → kotlin}/com/margelo/nitro/nitromap/NitroMapPackage.kt +4 -4
  10. package/android/src/main/kotlin/com/margelo/nitro/nitromap/NitroMapView.kt +73 -0
  11. package/android/src/main/kotlin/com/margelo/nitro/nitromap/UserLocationManager.kt +295 -0
  12. package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/ClusterIconRenderer.kt +111 -0
  13. package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/ClusteringManager.kt +104 -0
  14. package/android/src/main/kotlin/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +166 -0
  15. package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/MarkerIconFactory.kt +303 -0
  16. package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/MarkerSelectionHandler.kt +72 -0
  17. package/android/src/main/kotlin/com/margelo/nitro/nitromap/markers/PriceMarkerRenderer.kt +159 -0
  18. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/MapProviderFactory.kt +24 -0
  19. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +128 -0
  20. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapDelegate.kt +317 -0
  21. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Clustering.kt +524 -0
  22. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Markers.kt +358 -0
  23. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+Overlays.kt +272 -0
  24. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider+UserLocation.kt +296 -0
  25. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/GoogleMapProvider.kt +815 -0
  26. package/android/src/main/kotlin/com/margelo/nitro/nitromap/providers/google/MarkerTagData.kt +19 -0
  27. package/ios/Location/NitroLocationManager.swift +116 -0
  28. package/ios/MarkerRenderer/MarkerIconFactory.swift +1 -3
  29. package/ios/MarkerRenderer/PriceMarkerRenderer.swift +10 -6
  30. package/ios/NitroMap.swift +279 -13
  31. package/ios/NitroMapConfig/NitroMapConfig.swift +45 -0
  32. package/ios/Providers/{GoogleMapDelegate.swift → Google/GoogleMapDelegate.swift} +48 -23
  33. package/ios/Providers/Google/GoogleMapProvider+Camera.swift +180 -0
  34. package/ios/Providers/Google/GoogleMapProvider+Clustering.swift +541 -0
  35. package/ios/Providers/Google/GoogleMapProvider+Markers.swift +270 -0
  36. package/ios/Providers/Google/GoogleMapProvider+Overlays.swift +245 -0
  37. package/ios/Providers/Google/GoogleMapProvider+UserLocation.swift +180 -0
  38. package/ios/Providers/Google/GoogleMapProvider.swift +342 -0
  39. package/ios/Providers/MapProviderFactory.swift +17 -0
  40. package/ios/Providers/MapProviderProtocol.swift +48 -1
  41. package/ios/Shared/ClusterConfig+Factory.swift +2 -2
  42. package/ios/Shared/MapStyleProvider.swift +6 -4
  43. package/ios/Shared/MarkerSelectionHandler.swift +4 -1
  44. package/ios/Utils/ColorValueExtension.swift +46 -67
  45. package/lib/module/components/ImageMarker.js +39 -29
  46. package/lib/module/components/ImageMarker.js.map +1 -1
  47. package/lib/module/components/Marker.js +118 -0
  48. package/lib/module/components/Marker.js.map +1 -0
  49. package/lib/module/components/NitroCircle.js +92 -0
  50. package/lib/module/components/NitroCircle.js.map +1 -0
  51. package/lib/module/components/NitroMap.js +216 -76
  52. package/lib/module/components/NitroMap.js.map +1 -1
  53. package/lib/module/components/NitroPolygon.js +135 -0
  54. package/lib/module/components/NitroPolygon.js.map +1 -0
  55. package/lib/module/components/NitroPolyline.js +115 -0
  56. package/lib/module/components/NitroPolyline.js.map +1 -0
  57. package/lib/module/components/PriceMarker.js +16 -29
  58. package/lib/module/components/PriceMarker.js.map +1 -1
  59. package/lib/module/context/NitroMapContext.js.map +1 -1
  60. package/lib/module/hooks/useNitroCircle.js +18 -0
  61. package/lib/module/hooks/useNitroCircle.js.map +1 -0
  62. package/lib/module/hooks/useNitroMarker.js +26 -9
  63. package/lib/module/hooks/useNitroMarker.js.map +1 -1
  64. package/lib/module/hooks/useNitroOverlay.js +59 -0
  65. package/lib/module/hooks/useNitroOverlay.js.map +1 -0
  66. package/lib/module/hooks/useNitroPolygon.js +18 -0
  67. package/lib/module/hooks/useNitroPolygon.js.map +1 -0
  68. package/lib/module/hooks/useNitroPolyline.js +18 -0
  69. package/lib/module/hooks/useNitroPolyline.js.map +1 -0
  70. package/lib/module/index.js +5 -0
  71. package/lib/module/index.js.map +1 -1
  72. package/lib/module/types/overlay.js +4 -0
  73. package/lib/module/types/overlay.js.map +1 -0
  74. package/lib/module/types/theme.js +4 -0
  75. package/lib/module/types/theme.js.map +1 -0
  76. package/lib/module/utils/colors.js +41 -13
  77. package/lib/module/utils/colors.js.map +1 -1
  78. package/lib/module/utils/validation.js +45 -0
  79. package/lib/module/utils/validation.js.map +1 -0
  80. package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -1
  81. package/lib/typescript/src/components/Marker.d.ts +34 -0
  82. package/lib/typescript/src/components/Marker.d.ts.map +1 -0
  83. package/lib/typescript/src/components/NitroCircle.d.ts +70 -0
  84. package/lib/typescript/src/components/NitroCircle.d.ts.map +1 -0
  85. package/lib/typescript/src/components/NitroMap.d.ts +60 -3
  86. package/lib/typescript/src/components/NitroMap.d.ts.map +1 -1
  87. package/lib/typescript/src/components/NitroPolygon.d.ts +86 -0
  88. package/lib/typescript/src/components/NitroPolygon.d.ts.map +1 -0
  89. package/lib/typescript/src/components/NitroPolyline.d.ts +84 -0
  90. package/lib/typescript/src/components/NitroPolyline.d.ts.map +1 -0
  91. package/lib/typescript/src/components/PriceMarker.d.ts +0 -5
  92. package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -1
  93. package/lib/typescript/src/context/NitroMapContext.d.ts +2 -0
  94. package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -1
  95. package/lib/typescript/src/hooks/useNitroCircle.d.ts +7 -0
  96. package/lib/typescript/src/hooks/useNitroCircle.d.ts.map +1 -0
  97. package/lib/typescript/src/hooks/useNitroMarker.d.ts +20 -0
  98. package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -1
  99. package/lib/typescript/src/hooks/useNitroOverlay.d.ts +26 -0
  100. package/lib/typescript/src/hooks/useNitroOverlay.d.ts.map +1 -0
  101. package/lib/typescript/src/hooks/useNitroPolygon.d.ts +7 -0
  102. package/lib/typescript/src/hooks/useNitroPolygon.d.ts.map +1 -0
  103. package/lib/typescript/src/hooks/useNitroPolyline.d.ts +7 -0
  104. package/lib/typescript/src/hooks/useNitroPolyline.d.ts.map +1 -0
  105. package/lib/typescript/src/index.d.ts +15 -2
  106. package/lib/typescript/src/index.d.ts.map +1 -1
  107. package/lib/typescript/src/specs/NitroMap.nitro.d.ts +248 -6
  108. package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -1
  109. package/lib/typescript/src/types/map.d.ts +34 -4
  110. package/lib/typescript/src/types/map.d.ts.map +1 -1
  111. package/lib/typescript/src/types/marker.d.ts +24 -36
  112. package/lib/typescript/src/types/marker.d.ts.map +1 -1
  113. package/lib/typescript/src/types/overlay.d.ts +75 -0
  114. package/lib/typescript/src/types/overlay.d.ts.map +1 -0
  115. package/lib/typescript/src/types/theme.d.ts +93 -0
  116. package/lib/typescript/src/types/theme.d.ts.map +1 -0
  117. package/lib/typescript/src/utils/colors.d.ts +6 -8
  118. package/lib/typescript/src/utils/colors.d.ts.map +1 -1
  119. package/lib/typescript/src/utils/validation.d.ts +12 -0
  120. package/lib/typescript/src/utils/validation.d.ts.map +1 -0
  121. package/nitrogen/generated/android/c++/JCircleData.hpp +94 -0
  122. package/nitrogen/generated/android/c++/JClusterConfig.hpp +5 -7
  123. package/nitrogen/generated/android/c++/JFunc_void_UserLocationChangeEvent.hpp +79 -0
  124. package/nitrogen/generated/android/c++/JFunc_void_UserTrackingMode.hpp +77 -0
  125. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
  126. package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +328 -21
  127. package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +53 -2
  128. package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +3 -6
  129. package/nitrogen/generated/android/c++/JMarkerData.hpp +15 -3
  130. package/nitrogen/generated/android/c++/JPolygonData.hpp +149 -0
  131. package/nitrogen/generated/android/c++/JPolylineData.hpp +113 -0
  132. package/nitrogen/generated/android/c++/JUserLocationChangeEvent.hpp +70 -0
  133. package/nitrogen/generated/android/c++/JUserTrackingMode.hpp +62 -0
  134. package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +72 -4
  135. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/CircleData.kt +62 -0
  136. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +4 -4
  137. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_UserLocationChangeEvent.kt +80 -0
  138. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_UserTrackingMode.kt +80 -0
  139. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_std__string.kt +80 -0
  140. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +228 -2
  141. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +1 -2
  142. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +12 -3
  143. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PolygonData.kt +62 -0
  144. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PolylineData.kt +62 -0
  145. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/UserLocationChangeEvent.kt +47 -0
  146. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/{ClusterAnimationStyle.kt → UserTrackingMode.kt} +6 -8
  147. package/nitrogen/generated/android/nitromapOnLoad.cpp +6 -0
  148. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +24 -0
  149. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +175 -17
  150. package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +15 -3
  151. package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +249 -16
  152. package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +90 -5
  153. package/nitrogen/generated/ios/swift/CircleData.swift +143 -0
  154. package/nitrogen/generated/ios/swift/ClusterConfig.swift +22 -15
  155. package/nitrogen/generated/ios/swift/Func_void_UserLocationChangeEvent.swift +47 -0
  156. package/nitrogen/generated/ios/swift/Func_void_UserTrackingMode.swift +47 -0
  157. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  158. package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +35 -1
  159. package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +582 -8
  160. package/nitrogen/generated/ios/swift/MarkerAnimation.swift +4 -8
  161. package/nitrogen/generated/ios/swift/MarkerData.swift +54 -2
  162. package/nitrogen/generated/ios/swift/PolygonData.swift +179 -0
  163. package/nitrogen/generated/ios/swift/PolylineData.swift +155 -0
  164. package/nitrogen/generated/ios/swift/UserLocationChangeEvent.swift +69 -0
  165. package/nitrogen/generated/ios/swift/UserTrackingMode.swift +44 -0
  166. package/nitrogen/generated/shared/c++/CircleData.hpp +113 -0
  167. package/nitrogen/generated/shared/c++/ClusterConfig.hpp +5 -8
  168. package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +53 -2
  169. package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +75 -6
  170. package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +4 -8
  171. package/nitrogen/generated/shared/c++/MarkerData.hpp +14 -2
  172. package/nitrogen/generated/shared/c++/PolygonData.hpp +114 -0
  173. package/nitrogen/generated/shared/c++/PolylineData.hpp +114 -0
  174. package/nitrogen/generated/shared/c++/UserLocationChangeEvent.hpp +88 -0
  175. package/nitrogen/generated/shared/c++/UserTrackingMode.hpp +80 -0
  176. package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +216 -12
  177. package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +23 -1
  178. package/nitrogen/generated/shared/json/NitroMapConfig.json +18 -1
  179. package/package.json +36 -5
  180. package/src/components/ImageMarker.tsx +58 -42
  181. package/src/components/Marker.tsx +161 -0
  182. package/src/components/NitroCircle.tsx +183 -0
  183. package/src/components/NitroMap.tsx +328 -78
  184. package/src/components/NitroPolygon.tsx +229 -0
  185. package/src/components/NitroPolyline.tsx +208 -0
  186. package/src/components/PriceMarker.tsx +23 -48
  187. package/src/context/NitroMapContext.tsx +4 -0
  188. package/src/hooks/useNitroCircle.ts +25 -0
  189. package/src/hooks/useNitroMarker.ts +49 -10
  190. package/src/hooks/useNitroOverlay.ts +68 -0
  191. package/src/hooks/useNitroPolygon.ts +25 -0
  192. package/src/hooks/useNitroPolyline.ts +25 -0
  193. package/src/index.tsx +23 -2
  194. package/src/specs/NitroMap.nitro.ts +294 -5
  195. package/src/types/map.ts +36 -4
  196. package/src/types/marker.ts +24 -44
  197. package/src/types/overlay.ts +77 -0
  198. package/src/types/theme.ts +101 -0
  199. package/src/utils/colors.ts +48 -16
  200. package/src/utils/validation.ts +69 -0
  201. package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +0 -108
  202. package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +0 -63
  203. package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +0 -408
  204. package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +0 -68
  205. package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +0 -176
  206. package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +0 -252
  207. package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +0 -252
  208. package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +0 -195
  209. package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +0 -912
  210. package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +0 -70
  211. package/cpp/QuadTree.hpp +0 -246
  212. package/ios/NitroMapConfig/HybridNitroMapConfig.swift +0 -33
  213. package/ios/Providers/GoogleMapProvider+Camera.swift +0 -164
  214. package/ios/Providers/GoogleMapProvider.swift +0 -924
  215. package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +0 -68
  216. package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +0 -52
  217. package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +0 -88
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_UserLocationChangeEvent.kt
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
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(event: struct) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_UserLocationChangeEvent: (UserLocationChangeEvent) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(event: UserLocationChangeEvent): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(event: struct) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_UserLocationChangeEvent_cxx: Func_void_UserLocationChangeEvent {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(event: UserLocationChangeEvent): Unit
60
+ = invoke_cxx(event)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(event: UserLocationChangeEvent): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(event: struct) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(UserLocationChangeEvent) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_UserLocationChangeEvent_java(private val function: (UserLocationChangeEvent) -> Unit): Func_void_UserLocationChangeEvent {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(event: UserLocationChangeEvent): Unit {
78
+ return this.function(event)
79
+ }
80
+ }
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_UserTrackingMode.kt
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
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(mode: enum) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_UserTrackingMode: (UserTrackingMode) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(mode: UserTrackingMode): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(mode: enum) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_UserTrackingMode_cxx: Func_void_UserTrackingMode {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(mode: UserTrackingMode): Unit
60
+ = invoke_cxx(mode)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(mode: UserTrackingMode): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(mode: enum) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(UserTrackingMode) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_UserTrackingMode_java(private val function: (UserTrackingMode) -> Unit): Func_void_UserTrackingMode {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(mode: UserTrackingMode): Unit {
78
+ return this.function(mode)
79
+ }
80
+ }
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// Func_void_std__string.kt
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
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import dalvik.annotation.optimization.FastNative
14
+
15
+
16
+ /**
17
+ * Represents the JavaScript callback `(id: string) => void`.
18
+ * This can be either implemented in C++ (in which case it might be a callback coming from JS),
19
+ * or in Kotlin/Java (in which case it is a native callback).
20
+ */
21
+ @DoNotStrip
22
+ @Keep
23
+ @Suppress("ClassName", "RedundantUnitReturnType")
24
+ fun interface Func_void_std__string: (String) -> Unit {
25
+ /**
26
+ * Call the given JS callback.
27
+ * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
28
+ */
29
+ @DoNotStrip
30
+ @Keep
31
+ override fun invoke(id: String): Unit
32
+ }
33
+
34
+ /**
35
+ * Represents the JavaScript callback `(id: string) => void`.
36
+ * This is implemented in C++, via a `std::function<...>`.
37
+ * The callback might be coming from JS.
38
+ */
39
+ @DoNotStrip
40
+ @Keep
41
+ @Suppress(
42
+ "KotlinJniMissingFunction", "unused",
43
+ "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
44
+ "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
45
+ )
46
+ class Func_void_std__string_cxx: Func_void_std__string {
47
+ @DoNotStrip
48
+ @Keep
49
+ private val mHybridData: HybridData
50
+
51
+ @DoNotStrip
52
+ @Keep
53
+ private constructor(hybridData: HybridData) {
54
+ mHybridData = hybridData
55
+ }
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ override fun invoke(id: String): Unit
60
+ = invoke_cxx(id)
61
+
62
+ @FastNative
63
+ private external fun invoke_cxx(id: String): Unit
64
+ }
65
+
66
+ /**
67
+ * Represents the JavaScript callback `(id: string) => void`.
68
+ * This is implemented in Java/Kotlin, via a `(String) -> Unit`.
69
+ * The callback is always coming from native.
70
+ */
71
+ @DoNotStrip
72
+ @Keep
73
+ @Suppress("ClassName", "RedundantUnitReturnType", "unused")
74
+ class Func_void_std__string_java(private val function: (String) -> Unit): Func_void_std__string {
75
+ @DoNotStrip
76
+ @Keep
77
+ override fun invoke(id: String): Unit {
78
+ return this.function(id)
79
+ }
80
+ }
@@ -55,6 +55,12 @@ abstract class HybridNitroMapSpec: HybridView() {
55
55
  @set:Keep
56
56
  abstract var initialRegion: Region?
57
57
 
58
+ @get:DoNotStrip
59
+ @get:Keep
60
+ @set:DoNotStrip
61
+ @set:Keep
62
+ abstract var region: Region?
63
+
58
64
  @get:DoNotStrip
59
65
  @get:Keep
60
66
  @set:DoNotStrip
@@ -101,13 +107,43 @@ abstract class HybridNitroMapSpec: HybridView() {
101
107
  @get:Keep
102
108
  @set:DoNotStrip
103
109
  @set:Keep
104
- abstract var showsMyLocationButton: Boolean?
110
+ abstract var clusterConfig: ClusterConfig?
105
111
 
106
112
  @get:DoNotStrip
107
113
  @get:Keep
108
114
  @set:DoNotStrip
109
115
  @set:Keep
110
- abstract var clusterConfig: ClusterConfig?
116
+ abstract var mapPadding: EdgePadding
117
+
118
+ @get:DoNotStrip
119
+ @get:Keep
120
+ @set:DoNotStrip
121
+ @set:Keep
122
+ abstract var showsTraffic: Boolean?
123
+
124
+ @get:DoNotStrip
125
+ @get:Keep
126
+ @set:DoNotStrip
127
+ @set:Keep
128
+ abstract var showsBuildings: Boolean?
129
+
130
+ @get:DoNotStrip
131
+ @get:Keep
132
+ @set:DoNotStrip
133
+ @set:Keep
134
+ abstract var showsCompass: Boolean?
135
+
136
+ @get:DoNotStrip
137
+ @get:Keep
138
+ @set:DoNotStrip
139
+ @set:Keep
140
+ abstract var minZoom: Double
141
+
142
+ @get:DoNotStrip
143
+ @get:Keep
144
+ @set:DoNotStrip
145
+ @set:Keep
146
+ abstract var maxZoom: Double
111
147
 
112
148
  @get:DoNotStrip
113
149
  @get:Keep
@@ -115,6 +151,30 @@ abstract class HybridNitroMapSpec: HybridView() {
115
151
  @set:Keep
116
152
  abstract var darkMode: Boolean?
117
153
 
154
+ @get:DoNotStrip
155
+ @get:Keep
156
+ @set:DoNotStrip
157
+ @set:Keep
158
+ abstract var userTrackingMode: UserTrackingMode?
159
+
160
+ @get:DoNotStrip
161
+ @get:Keep
162
+ @set:DoNotStrip
163
+ @set:Keep
164
+ abstract var userLocationImage: String
165
+
166
+ @get:DoNotStrip
167
+ @get:Keep
168
+ @set:DoNotStrip
169
+ @set:Keep
170
+ abstract var userLocationSize: Double
171
+
172
+ @get:DoNotStrip
173
+ @get:Keep
174
+ @set:DoNotStrip
175
+ @set:Keep
176
+ abstract var userLocationAnchor: Point?
177
+
118
178
  abstract var onPress: ((event: MapPressEvent) -> Unit)?
119
179
 
120
180
  private var onPress_cxx: Func_void_MapPressEvent?
@@ -255,6 +315,48 @@ abstract class HybridNitroMapSpec: HybridView() {
255
315
  onClusterPress = value?.let { it }
256
316
  }
257
317
 
318
+ abstract var onPolylinePress: ((id: String) -> Unit)?
319
+
320
+ private var onPolylinePress_cxx: Func_void_std__string?
321
+ @Keep
322
+ @DoNotStrip
323
+ get() {
324
+ return onPolylinePress?.let { Func_void_std__string_java(it) }
325
+ }
326
+ @Keep
327
+ @DoNotStrip
328
+ set(value) {
329
+ onPolylinePress = value?.let { it }
330
+ }
331
+
332
+ abstract var onPolygonPress: ((id: String) -> Unit)?
333
+
334
+ private var onPolygonPress_cxx: Func_void_std__string?
335
+ @Keep
336
+ @DoNotStrip
337
+ get() {
338
+ return onPolygonPress?.let { Func_void_std__string_java(it) }
339
+ }
340
+ @Keep
341
+ @DoNotStrip
342
+ set(value) {
343
+ onPolygonPress = value?.let { it }
344
+ }
345
+
346
+ abstract var onCirclePress: ((id: String) -> Unit)?
347
+
348
+ private var onCirclePress_cxx: Func_void_std__string?
349
+ @Keep
350
+ @DoNotStrip
351
+ get() {
352
+ return onCirclePress?.let { Func_void_std__string_java(it) }
353
+ }
354
+ @Keep
355
+ @DoNotStrip
356
+ set(value) {
357
+ onCirclePress = value?.let { it }
358
+ }
359
+
258
360
  abstract var onError: ((error: MapError) -> Unit)?
259
361
 
260
362
  private var onError_cxx: Func_void_MapError?
@@ -268,6 +370,62 @@ abstract class HybridNitroMapSpec: HybridView() {
268
370
  set(value) {
269
371
  onError = value?.let { it }
270
372
  }
373
+
374
+ abstract var onUserLocationChange: ((event: UserLocationChangeEvent) -> Unit)?
375
+
376
+ private var onUserLocationChange_cxx: Func_void_UserLocationChangeEvent?
377
+ @Keep
378
+ @DoNotStrip
379
+ get() {
380
+ return onUserLocationChange?.let { Func_void_UserLocationChangeEvent_java(it) }
381
+ }
382
+ @Keep
383
+ @DoNotStrip
384
+ set(value) {
385
+ onUserLocationChange = value?.let { it }
386
+ }
387
+
388
+ abstract var onUserTrackingModeChange: ((mode: UserTrackingMode) -> Unit)?
389
+
390
+ private var onUserTrackingModeChange_cxx: Func_void_UserTrackingMode?
391
+ @Keep
392
+ @DoNotStrip
393
+ get() {
394
+ return onUserTrackingModeChange?.let { Func_void_UserTrackingMode_java(it) }
395
+ }
396
+ @Keep
397
+ @DoNotStrip
398
+ set(value) {
399
+ onUserTrackingModeChange = value?.let { it }
400
+ }
401
+
402
+ abstract var onUserLocationError: ((error: MapError) -> Unit)?
403
+
404
+ private var onUserLocationError_cxx: Func_void_MapError?
405
+ @Keep
406
+ @DoNotStrip
407
+ get() {
408
+ return onUserLocationError?.let { Func_void_MapError_java(it) }
409
+ }
410
+ @Keep
411
+ @DoNotStrip
412
+ set(value) {
413
+ onUserLocationError = value?.let { it }
414
+ }
415
+
416
+ abstract var onMapIdle: (() -> Unit)?
417
+
418
+ private var onMapIdle_cxx: Func_void?
419
+ @Keep
420
+ @DoNotStrip
421
+ get() {
422
+ return onMapIdle?.let { Func_void_java(it) }
423
+ }
424
+ @Keep
425
+ @DoNotStrip
426
+ set(value) {
427
+ onMapIdle = value?.let { it }
428
+ }
271
429
 
272
430
  // Methods
273
431
  @DoNotStrip
@@ -278,6 +436,10 @@ abstract class HybridNitroMapSpec: HybridView() {
278
436
  @Keep
279
437
  abstract fun fitToCoordinates(coordinates: Array<Coordinate>, edgePadding: EdgePadding?, animated: Boolean?): Unit
280
438
 
439
+ @DoNotStrip
440
+ @Keep
441
+ abstract fun fitToSuppliedMarkers(markerIds: Array<String>, edgePadding: EdgePadding?, animated: Boolean?): Unit
442
+
281
443
  @DoNotStrip
282
444
  @Keep
283
445
  abstract fun animateCamera(camera: Camera, duration: Double?): Unit
@@ -298,6 +460,18 @@ abstract class HybridNitroMapSpec: HybridView() {
298
460
  @Keep
299
461
  abstract fun getMapBoundaries(): Promise<MapBoundaries>
300
462
 
463
+ @DoNotStrip
464
+ @Keep
465
+ abstract fun centerOnUserLocation(): Unit
466
+
467
+ @DoNotStrip
468
+ @Keep
469
+ abstract fun pointForCoordinate(coordinate: Coordinate): Point
470
+
471
+ @DoNotStrip
472
+ @Keep
473
+ abstract fun coordinateForPoint(point: Point): Coordinate
474
+
301
475
  @DoNotStrip
302
476
  @Keep
303
477
  abstract fun setIsDarkMode(enabled: Boolean): Unit
@@ -322,6 +496,10 @@ abstract class HybridNitroMapSpec: HybridView() {
322
496
  @Keep
323
497
  abstract fun selectMarker(id: String): Unit
324
498
 
499
+ @DoNotStrip
500
+ @Keep
501
+ abstract fun deselectMarker(): Unit
502
+
325
503
  @DoNotStrip
326
504
  @Keep
327
505
  abstract fun clearMarkers(): Unit
@@ -333,6 +511,54 @@ abstract class HybridNitroMapSpec: HybridView() {
333
511
  @DoNotStrip
334
512
  @Keep
335
513
  abstract fun refreshClusters(): Unit
514
+
515
+ @DoNotStrip
516
+ @Keep
517
+ abstract fun addPolyline(polyline: PolylineData): Unit
518
+
519
+ @DoNotStrip
520
+ @Keep
521
+ abstract fun updatePolyline(polyline: PolylineData): Unit
522
+
523
+ @DoNotStrip
524
+ @Keep
525
+ abstract fun removePolyline(id: String): Unit
526
+
527
+ @DoNotStrip
528
+ @Keep
529
+ abstract fun clearPolylines(): Unit
530
+
531
+ @DoNotStrip
532
+ @Keep
533
+ abstract fun addPolygon(polygon: PolygonData): Unit
534
+
535
+ @DoNotStrip
536
+ @Keep
537
+ abstract fun updatePolygon(polygon: PolygonData): Unit
538
+
539
+ @DoNotStrip
540
+ @Keep
541
+ abstract fun removePolygon(id: String): Unit
542
+
543
+ @DoNotStrip
544
+ @Keep
545
+ abstract fun clearPolygons(): Unit
546
+
547
+ @DoNotStrip
548
+ @Keep
549
+ abstract fun addCircle(circle: CircleData): Unit
550
+
551
+ @DoNotStrip
552
+ @Keep
553
+ abstract fun updateCircle(circle: CircleData): Unit
554
+
555
+ @DoNotStrip
556
+ @Keep
557
+ abstract fun removeCircle(id: String): Unit
558
+
559
+ @DoNotStrip
560
+ @Keep
561
+ abstract fun clearCircles(): Unit
336
562
 
337
563
  private external fun initHybrid(): HybridData
338
564
 
@@ -17,6 +17,5 @@ import com.facebook.proguard.annotations.DoNotStrip
17
17
  @Keep
18
18
  enum class MarkerAnimation(@DoNotStrip @Keep val value: Int) {
19
19
  NONE(0),
20
- POP(1),
21
- FADEIN(2);
20
+ APPEAR(1);
22
21
  }
@@ -49,10 +49,19 @@ data class MarkerData(
49
49
  val config: MarkerConfig,
50
50
  @DoNotStrip
51
51
  @Keep
52
+ val accessibilityLabel: String?,
53
+ @DoNotStrip
54
+ @Keep
52
55
  val clusteringEnabled: Boolean,
53
56
  @DoNotStrip
54
57
  @Keep
55
- val animation: MarkerAnimation
58
+ val animation: MarkerAnimation,
59
+ @DoNotStrip
60
+ @Keep
61
+ val animationDuration: Double,
62
+ @DoNotStrip
63
+ @Keep
64
+ val animateOnReappear: Boolean
56
65
  ) {
57
66
  /* primary constructor */
58
67
 
@@ -64,8 +73,8 @@ data class MarkerData(
64
73
  @Keep
65
74
  @Suppress("unused")
66
75
  @JvmStatic
67
- private fun fromCpp(id: String, coordinate: Coordinate, title: String?, description: String?, draggable: Boolean, opacity: Double, rotation: Double, zIndex: Double, anchor: Point, config: MarkerConfig, clusteringEnabled: Boolean, animation: MarkerAnimation): MarkerData {
68
- return MarkerData(id, coordinate, title, description, draggable, opacity, rotation, zIndex, anchor, config, clusteringEnabled, animation)
76
+ private fun fromCpp(id: String, coordinate: Coordinate, title: String?, description: String?, draggable: Boolean, opacity: Double, rotation: Double, zIndex: Double, anchor: Point, config: MarkerConfig, accessibilityLabel: String?, clusteringEnabled: Boolean, animation: MarkerAnimation, animationDuration: Double, animateOnReappear: Boolean): MarkerData {
77
+ return MarkerData(id, coordinate, title, description, draggable, opacity, rotation, zIndex, anchor, config, accessibilityLabel, clusteringEnabled, animation, animationDuration, animateOnReappear)
69
78
  }
70
79
  }
71
80
  }
@@ -0,0 +1,62 @@
1
+ ///
2
+ /// PolygonData.kt
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
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "PolygonData".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class PolygonData(
20
+ @DoNotStrip
21
+ @Keep
22
+ val id: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val coordinates: Array<Coordinate>,
26
+ @DoNotStrip
27
+ @Keep
28
+ val holes: Array<Array<Coordinate>>,
29
+ @DoNotStrip
30
+ @Keep
31
+ val fillColor: MarkerColor,
32
+ @DoNotStrip
33
+ @Keep
34
+ val strokeColor: MarkerColor,
35
+ @DoNotStrip
36
+ @Keep
37
+ val strokeWidth: Double,
38
+ @DoNotStrip
39
+ @Keep
40
+ val zIndex: Double,
41
+ @DoNotStrip
42
+ @Keep
43
+ val tappable: Boolean,
44
+ @DoNotStrip
45
+ @Keep
46
+ val accessibilityLabel: String?
47
+ ) {
48
+ /* primary constructor */
49
+
50
+ private companion object {
51
+ /**
52
+ * Constructor called from C++
53
+ */
54
+ @DoNotStrip
55
+ @Keep
56
+ @Suppress("unused")
57
+ @JvmStatic
58
+ private fun fromCpp(id: String, coordinates: Array<Coordinate>, holes: Array<Array<Coordinate>>, fillColor: MarkerColor, strokeColor: MarkerColor, strokeWidth: Double, zIndex: Double, tappable: Boolean, accessibilityLabel: String?): PolygonData {
59
+ return PolygonData(id, coordinates, holes, fillColor, strokeColor, strokeWidth, zIndex, tappable, accessibilityLabel)
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,62 @@
1
+ ///
2
+ /// PolylineData.kt
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
+ package com.margelo.nitro.nitromap
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+
13
+
14
+ /**
15
+ * Represents the JavaScript object/struct "PolylineData".
16
+ */
17
+ @DoNotStrip
18
+ @Keep
19
+ data class PolylineData(
20
+ @DoNotStrip
21
+ @Keep
22
+ val id: String,
23
+ @DoNotStrip
24
+ @Keep
25
+ val coordinates: Array<Coordinate>,
26
+ @DoNotStrip
27
+ @Keep
28
+ val strokeColor: MarkerColor,
29
+ @DoNotStrip
30
+ @Keep
31
+ val strokeWidth: Double,
32
+ @DoNotStrip
33
+ @Keep
34
+ val geodesic: Boolean,
35
+ @DoNotStrip
36
+ @Keep
37
+ val dashed: Boolean,
38
+ @DoNotStrip
39
+ @Keep
40
+ val zIndex: Double,
41
+ @DoNotStrip
42
+ @Keep
43
+ val tappable: Boolean,
44
+ @DoNotStrip
45
+ @Keep
46
+ val accessibilityLabel: String?
47
+ ) {
48
+ /* primary constructor */
49
+
50
+ private companion object {
51
+ /**
52
+ * Constructor called from C++
53
+ */
54
+ @DoNotStrip
55
+ @Keep
56
+ @Suppress("unused")
57
+ @JvmStatic
58
+ private fun fromCpp(id: String, coordinates: Array<Coordinate>, strokeColor: MarkerColor, strokeWidth: Double, geodesic: Boolean, dashed: Boolean, zIndex: Double, tappable: Boolean, accessibilityLabel: String?): PolylineData {
59
+ return PolylineData(id, coordinates, strokeColor, strokeWidth, geodesic, dashed, zIndex, tappable, accessibilityLabel)
60
+ }
61
+ }
62
+ }