react-native-google-maps-plus 0.1.0 → 1.0.0-dev.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.
Files changed (197) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +156 -0
  3. package/RNGoogleMapsPlus.podspec +34 -0
  4. package/android/CMakeLists.txt +32 -0
  5. package/android/build.gradle +135 -0
  6. package/android/fix-prefab.gradle +51 -0
  7. package/android/gradle.properties +8 -0
  8. package/android/src/main/AndroidManifest.xml +2 -0
  9. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  10. package/android/src/main/java/com/rngooglemapsplus/Color.kt +65 -0
  11. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +847 -0
  12. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +205 -0
  13. package/android/src/main/java/com/rngooglemapsplus/MapCircle.kt +29 -0
  14. package/android/src/main/java/com/rngooglemapsplus/MapMarker.kt +146 -0
  15. package/android/src/main/java/com/rngooglemapsplus/MapPolygon.kt +38 -0
  16. package/android/src/main/java/com/rngooglemapsplus/MapPolyline.kt +61 -0
  17. package/android/src/main/java/com/rngooglemapsplus/PermissionHandler.kt +116 -0
  18. package/android/src/main/java/com/rngooglemapsplus/PlayServicesHandler.kt +25 -0
  19. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusModule.kt +22 -0
  20. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusPackage.kt +35 -0
  21. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +364 -0
  22. package/ios/Color.swift +109 -0
  23. package/ios/GoogleMapViewImpl.swift +645 -0
  24. package/ios/LocationHandler.swift +205 -0
  25. package/ios/MapCircle.swift +43 -0
  26. package/ios/MapHelper.swift +18 -0
  27. package/ios/MapMarker.swift +200 -0
  28. package/ios/MapPolygon.swift +58 -0
  29. package/ios/MapPolyline.swift +85 -0
  30. package/ios/PermissionHandler.swift +73 -0
  31. package/ios/RNGoogleMapsPlusModule.swift +27 -0
  32. package/ios/RNGoogleMapsPlusView.swift +391 -0
  33. package/lib/module/RNGoogleMapsPlusModule.nitro.js +4 -0
  34. package/lib/module/RNGoogleMapsPlusModule.nitro.js.map +1 -0
  35. package/lib/module/RNGoogleMapsPlusView.nitro.js +4 -0
  36. package/lib/module/RNGoogleMapsPlusView.nitro.js.map +1 -0
  37. package/lib/module/index.js +8 -0
  38. package/lib/module/index.js.map +1 -0
  39. package/lib/module/package.json +1 -0
  40. package/lib/module/types.js +78 -0
  41. package/lib/module/types.js.map +1 -0
  42. package/lib/typescript/package.json +1 -0
  43. package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts +12 -0
  44. package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
  45. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +39 -0
  46. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
  47. package/lib/typescript/src/index.d.ts +7 -0
  48. package/lib/typescript/src/index.d.ts.map +1 -0
  49. package/lib/typescript/src/types.d.ts +131 -0
  50. package/lib/typescript/src/types.d.ts.map +1 -0
  51. package/nitro.json +28 -0
  52. package/nitrogen/generated/.gitattributes +1 -0
  53. package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake +85 -0
  54. package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle +27 -0
  55. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +70 -0
  56. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.hpp +25 -0
  57. package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
  58. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
  59. package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
  60. package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
  61. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
  62. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
  63. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
  64. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.cpp +83 -0
  65. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
  66. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +589 -0
  67. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +118 -0
  68. package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
  69. package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
  70. package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
  71. package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
  72. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -0
  73. package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
  74. package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
  75. package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
  76. package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
  77. package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
  78. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
  79. package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
  80. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
  81. package/nitrogen/generated/android/c++/JRNMapType.hpp +68 -0
  82. package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
  83. package/nitrogen/generated/android/c++/JRNPolygon.hpp +98 -0
  84. package/nitrogen/generated/android/c++/JRNPolyline.hpp +106 -0
  85. package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
  86. package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
  87. package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
  88. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +152 -0
  89. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp +49 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLatLng.kt +81 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocation.kt +81 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocationErrorCode.kt +81 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNMapErrorCode.kt +81 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool.kt +81 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_bool.kt +81 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string.kt +81 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +64 -0
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +317 -0
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPermissionResult.kt +22 -0
  100. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +38 -0
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNGoogleMapsPlusOnLoad.kt +35 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSPermissionResult.kt +21 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +32 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineCapType.kt +22 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineJoinType.kt +22 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +32 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationErrorCode.kt +25 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +32 -0
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt +26 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +38 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
  114. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +47 -0
  115. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +47 -0
  116. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +50 -0
  117. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +32 -0
  118. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +35 -0
  119. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUserInterfaceStyle.kt +22 -0
  120. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +56 -0
  121. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewStateUpdater.kt +23 -0
  122. package/nitrogen/generated/ios/RNGoogleMapsPlus+autolinking.rb +60 -0
  123. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +121 -0
  124. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +792 -0
  125. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +113 -0
  126. package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.mm +41 -0
  127. package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.swift +40 -0
  128. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.cpp +11 -0
  129. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.hpp +102 -0
  130. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.cpp +11 -0
  131. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +342 -0
  132. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +216 -0
  133. package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
  134. package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
  135. package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
  136. package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
  137. package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
  138. package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
  139. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  140. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  141. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  142. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
  143. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec_cxx.swift +164 -0
  144. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +78 -0
  145. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +881 -0
  146. package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
  147. package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
  148. package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
  149. package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
  150. package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -0
  151. package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
  152. package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
  153. package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
  154. package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
  155. package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
  156. package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
  157. package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
  158. package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
  159. package/nitrogen/generated/ios/swift/RNMapType.swift +52 -0
  160. package/nitrogen/generated/ios/swift/RNMarker.swift +132 -0
  161. package/nitrogen/generated/ios/swift/RNPolygon.swift +187 -0
  162. package/nitrogen/generated/ios/swift/RNPolyline.swift +203 -0
  163. package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
  164. package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
  165. package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
  166. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.cpp +24 -0
  167. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
  168. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +76 -0
  169. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +164 -0
  170. package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
  171. package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
  172. package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
  173. package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
  174. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -0
  175. package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
  176. package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
  177. package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
  178. package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
  179. package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
  180. package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
  181. package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
  182. package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
  183. package/nitrogen/generated/shared/c++/RNMapType.hpp +88 -0
  184. package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
  185. package/nitrogen/generated/shared/c++/RNPolygon.hpp +95 -0
  186. package/nitrogen/generated/shared/c++/RNPolyline.hpp +105 -0
  187. package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
  188. package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
  189. package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
  190. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +375 -0
  191. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +147 -0
  192. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +34 -0
  193. package/package.json +24 -8
  194. package/src/RNGoogleMapsPlusModule.nitro.ts +13 -0
  195. package/src/RNGoogleMapsPlusView.nitro.ts +86 -0
  196. package/src/index.tsx +24 -0
  197. package/src/types.ts +195 -0
@@ -0,0 +1,131 @@
1
+ import type { RNGoogleMapsPlusViewMethods } from './RNGoogleMapsPlusView.nitro';
2
+ import type { HybridView } from 'react-native-nitro-modules';
3
+ export type GoogleMapsViewRef = HybridView<RNGoogleMapsPlusViewMethods>;
4
+ export type RNInitialProps = {
5
+ mapId?: string;
6
+ liteMode?: boolean;
7
+ initialCamera?: RNCamera;
8
+ };
9
+ export type RNLatLng = {
10
+ latitude: number;
11
+ longitude: number;
12
+ };
13
+ export type RNBoundingBox = {
14
+ northEast: RNLatLng;
15
+ southWest: RNLatLng;
16
+ };
17
+ export type RNMapPadding = {
18
+ top: number;
19
+ left: number;
20
+ bottom: number;
21
+ right: number;
22
+ };
23
+ export type RNMapType = 'none' | 'normal' | 'hybrid' | 'satellite' | 'terrain';
24
+ export type RNUserInterfaceStyle = 'light' | 'dark' | 'default';
25
+ export type RNFeatureType = string;
26
+ export type RNElementType = string;
27
+ export type RNVisibility = string;
28
+ export interface RNMapStyler {
29
+ color?: string;
30
+ visibility?: RNVisibility;
31
+ weight?: number;
32
+ gamma?: number;
33
+ lightness?: number;
34
+ saturation?: number;
35
+ invert_lightness?: boolean;
36
+ }
37
+ export interface RNMapStyleElement {
38
+ featureType?: RNFeatureType;
39
+ elementType?: RNElementType;
40
+ stylers: RNMapStyler[];
41
+ }
42
+ export type RNCamera = {
43
+ center?: RNLatLng;
44
+ zoom?: number;
45
+ bearing?: number;
46
+ tilt?: number;
47
+ };
48
+ export type RNRegion = {
49
+ center: RNLatLng;
50
+ latitudeDelta: number;
51
+ longitudeDelta: number;
52
+ };
53
+ export type RNPosition = {
54
+ x: number;
55
+ y: number;
56
+ };
57
+ export type RNLineCapType = 'butt' | 'round' | 'square';
58
+ export type RNLineJoinType = 'miter' | 'round' | 'bevel';
59
+ export type RNMarker = {
60
+ id: string;
61
+ zIndex?: number;
62
+ coordinate: RNLatLng;
63
+ anchor?: RNPosition;
64
+ width: number;
65
+ height: number;
66
+ iconSvg: string;
67
+ };
68
+ export type RNPolygon = {
69
+ id: string;
70
+ zIndex?: number;
71
+ pressable?: boolean;
72
+ coordinates: RNLatLng[];
73
+ fillColor?: string;
74
+ strokeColor?: string;
75
+ strokeWidth?: number;
76
+ };
77
+ export type RNPolyline = {
78
+ id: string;
79
+ zIndex?: number;
80
+ pressable?: boolean;
81
+ coordinates: RNLatLng[];
82
+ lineCap?: RNLineCapType;
83
+ lineJoin?: RNLineJoinType;
84
+ color?: string;
85
+ width?: number;
86
+ };
87
+ export type RNCircle = {
88
+ id: string;
89
+ pressable?: boolean;
90
+ zIndex?: number;
91
+ center: RNLatLng;
92
+ radius?: number;
93
+ strokeWidth?: number;
94
+ strokeColor?: string;
95
+ fillColor?: string;
96
+ };
97
+ export type RNLocationPermissionResult = {
98
+ android?: RNAndroidLocationPermissionResult;
99
+ ios?: RNIOSPermissionResult;
100
+ };
101
+ export declare enum RNAndroidLocationPermissionResult {
102
+ GRANTED = 1,
103
+ DENIED = -1,
104
+ NEVER_ASK_AGAIN = -2
105
+ }
106
+ export declare enum RNIOSPermissionResult {
107
+ DENIED = -1,
108
+ AUTHORIZED = 1
109
+ }
110
+ export type RNLocation = {
111
+ center: RNLatLng;
112
+ bearing: number;
113
+ };
114
+ export declare enum RNLocationErrorCode {
115
+ PERMISSION_DENIED = 1,
116
+ POSITION_UNAVAILABLE = 2,
117
+ TIMEOUT = 3,
118
+ PLAY_SERVICE_NOT_AVAILABLE = 4,
119
+ SETTINGS_NOT_SATISFIED = 5,
120
+ INTERNAL_ERROR = -1
121
+ }
122
+ export declare enum RNMapErrorCode {
123
+ PLAY_SERVICES_MISSING = 0,
124
+ PLAY_SERVICES_INVALID = 1,
125
+ PLAY_SERVICES_DISABLED = 2,
126
+ PLAY_SERVICES_OUTDATED = 3,
127
+ PLAY_SERVICE_UPDATE_AVAILABLE = 4,
128
+ PLAY_SERVICE_UPDATING = 5,
129
+ UNKNOWN = 6
130
+ }
131
+ //# sour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;IACrB,oBAAoB,IAAI;IACxB,OAAO,IAAI;IACX,0BAA0B,IAAI;IAC9B,sBAAsB,IAAI;IAC1B,cAAc,KAAK;CACpB;AAED,oBAAY,cAAc;IACxB,qBAAqB,IAAI;IACzB,qBAAqB,IAAI;IACzB,sBAAsB,IAAI;IAC1B,sBAAsB,IAAI;IAC1B,6BAA6B,IAAI;IACjC,qBAAqB,IAAI;IACzB,OAAO,IAAI;CACZ"}
package/nitro.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://nitro.margelo.com/nitro.schema.json",
3
+ "cxxNamespace": ["rngooglemapsplus"],
4
+ "ios": {
5
+ "iosModuleName": "RNGoogleMapsPlus"
6
+ },
7
+ "android": {
8
+ "androidNamespace": ["rngooglemapsplus"],
9
+ "androidCxxLibName": "RNGoogleMapsPlus"
10
+ },
11
+ "hybridViews": [
12
+ {
13
+ "name": "RNGoogleMapsPlusView",
14
+ "platforms": ["ios", "android"]
15
+ }
16
+ ],
17
+ "autolinking": {
18
+ "RNGoogleMapsPlusView": {
19
+ "swift": "RNGoogleMapsPlusView",
20
+ "kotlin": "RNGoogleMapsPlusView"
21
+ },
22
+ "RNGoogleMapsPlusModule": {
23
+ "swift": "RNGoogleMapsPlusModule",
24
+ "kotlin": "RNGoogleMapsPlusModule"
25
+ }
26
+ },
27
+ "ignorePaths": ["**/node_modules"]
28
+ }
@@ -0,0 +1 @@
1
+ ** linguist-generated=true
@@ -0,0 +1,85 @@
1
+ #
2
+ # RNGoogleMapsPlus+autolinking.cmake
3
+ # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ # https://github.com/mrousavy/nitro
5
+ # Copyright © 2025 Marc Rousavy @ Margelo
6
+ #
7
+
8
+ # This is a CMake file that adds all files generated by Nitrogen
9
+ # to the current CMake project.
10
+ #
11
+ # To use it, add this to your CMakeLists.txt:
12
+ # ```cmake
13
+ # include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake)
14
+ # ```
15
+
16
+ # Define a flag to check if we are building properly
17
+ add_definitions(-DBUILDING_RNGOOGLEMAPSPLUS_WITH_GENERATED_CMAKE_PROJECT)
18
+
19
+ # Enable Raw Props parsing in react-native (for Nitro Views)
20
+ add_definitions(-DRN_SERIALIZABLE_STATE)
21
+
22
+ # Add all headers that were generated by Nitrogen
23
+ include_directories(
24
+ "../nitrogen/generated/shared/c++"
25
+ "../nitrogen/generated/android/c++"
26
+ "../nitrogen/generated/android/"
27
+ )
28
+
29
+ # Add all .cpp sources that were generated by Nitrogen
30
+ target_sources(
31
+ # CMake project name (Android C++ library name)
32
+ RNGoogleMapsPlus PRIVATE
33
+ # Autolinking Setup
34
+ ../nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp
35
+ # Shared Nitrogen C++ sources
36
+ ../nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.cpp
37
+ ../nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp
38
+ ../nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp
39
+ # Android-specific Nitrogen C++ sources
40
+ ../nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.cpp
41
+ ../nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp
42
+ ../nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp
43
+ )
44
+
45
+ # From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
46
+ # Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
47
+ target_compile_definitions(
48
+ RNGoogleMapsPlus PRIVATE
49
+ -DFOLLY_NO_CONFIG=1
50
+ -DFOLLY_HAVE_CLOCK_GETTIME=1
51
+ -DFOLLY_USE_LIBCPP=1
52
+ -DFOLLY_CFG_NO_COROUTINES=1
53
+ -DFOLLY_MOBILE=1
54
+ -DFOLLY_HAVE_RECVMMSG=1
55
+ -DFOLLY_HAVE_PTHREAD=1
56
+ # Once we target android-23 above, we can comment
57
+ # the following line. NDK uses GNU style stderror_r() after API 23.
58
+ -DFOLLY_HAVE_XSI_STRERROR_R=1
59
+ )
60
+
61
+ # Add all libraries required by the generated specs
62
+ find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
63
+ find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
64
+ find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
65
+
66
+ # Link all libraries together
67
+ target_link_libraries(
68
+ RNGoogleMapsPlus
69
+ fbjni::fbjni # <-- Facebook C++ JNI helpers
70
+ ReactAndroid::jsi # <-- RN: JSI
71
+ react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
72
+ )
73
+
74
+ # Link react-native (different prefab between RN 0.75 and RN 0.76)
75
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
76
+ target_link_libraries(
77
+ RNGoogleMapsPlus
78
+ ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
79
+ )
80
+ else()
81
+ target_link_libraries(
82
+ RNGoogleMapsPlus
83
+ ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
84
+ )
85
+ endif()
@@ -0,0 +1,27 @@
1
+ ///
2
+ /// RNGoogleMapsPlus+autolinking.gradle
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ /// This is a Gradle file that adds all files generated by Nitrogen
9
+ /// to the current Gradle project.
10
+ ///
11
+ /// To use it, add this to your build.gradle:
12
+ /// ```gradle
13
+ /// apply from: '../nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle'
14
+ /// ```
15
+
16
+ logger.warn("[NitroModules] 🔥 RNGoogleMapsPlus is boosted by nitro!")
17
+
18
+ android {
19
+ sourceSets {
20
+ main {
21
+ java.srcDirs += [
22
+ // Nitrogen files
23
+ "${project.projectDir}/../nitrogen/generated/android/kotlin"
24
+ ]
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,70 @@
1
+ ///
2
+ /// RNGoogleMapsPlusOnLoad.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #ifndef BUILDING_RNGOOGLEMAPSPLUS_WITH_GENERATED_CMAKE_PROJECT
9
+ #error RNGoogleMapsPlusOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
10
+ #endif
11
+
12
+ #include "RNGoogleMapsPlusOnLoad.hpp"
13
+
14
+ #include <jni.h>
15
+ #include <fbjni/fbjni.h>
16
+ #include <NitroModules/HybridObjectRegistry.hpp>
17
+
18
+ #include "JHybridRNGoogleMapsPlusModuleSpec.hpp"
19
+ #include "JHybridRNGoogleMapsPlusViewSpec.hpp"
20
+ #include "JFunc_void_RNMapErrorCode.hpp"
21
+ #include "JFunc_void_bool.hpp"
22
+ #include "JFunc_void_RNLocation.hpp"
23
+ #include "JFunc_void_RNLocationErrorCode.hpp"
24
+ #include "JFunc_void_RNLatLng.hpp"
25
+ #include "JFunc_void_std__string.hpp"
26
+ #include "JFunc_void_RNRegion_RNCamera_bool.hpp"
27
+ #include "views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp"
28
+ #include <NitroModules/DefaultConstructableObject.hpp>
29
+
30
+ namespace margelo::nitro::rngooglemapsplus {
31
+
32
+ int initialize(JavaVM* vm) {
33
+ using namespace margelo::nitro;
34
+ using namespace margelo::nitro::rngooglemapsplus;
35
+ using namespace facebook;
36
+
37
+ return facebook::jni::initialize(vm, [] {
38
+ // Register native JNI methods
39
+ margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusModuleSpec::registerNatives();
40
+ margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusViewSpec::registerNatives();
41
+ margelo::nitro::rngooglemapsplus::JFunc_void_RNMapErrorCode_cxx::registerNatives();
42
+ margelo::nitro::rngooglemapsplus::JFunc_void_bool_cxx::registerNatives();
43
+ margelo::nitro::rngooglemapsplus::JFunc_void_RNLocation_cxx::registerNatives();
44
+ margelo::nitro::rngooglemapsplus::JFunc_void_RNLocationErrorCode_cxx::registerNatives();
45
+ margelo::nitro::rngooglemapsplus::JFunc_void_RNLatLng_cxx::registerNatives();
46
+ margelo::nitro::rngooglemapsplus::JFunc_void_std__string_cxx::registerNatives();
47
+ margelo::nitro::rngooglemapsplus::JFunc_void_RNRegion_RNCamera_bool_cxx::registerNatives();
48
+ margelo::nitro::rngooglemapsplus::views::JHybridRNGoogleMapsPlusViewStateUpdater::registerNatives();
49
+
50
+ // Register Nitro Hybrid Objects
51
+ HybridObjectRegistry::registerHybridObjectConstructor(
52
+ "RNGoogleMapsPlusView",
53
+ []() -> std::shared_ptr<HybridObject> {
54
+ static DefaultConstructableObject<JHybridRNGoogleMapsPlusViewSpec::javaobject> object("com/rngooglemapsplus/RNGoogleMapsPlusView");
55
+ auto instance = object.create();
56
+ return instance->cthis()->shared();
57
+ }
58
+ );
59
+ HybridObjectRegistry::registerHybridObjectConstructor(
60
+ "RNGoogleMapsPlusModule",
61
+ []() -> std::shared_ptr<HybridObject> {
62
+ static DefaultConstructableObject<JHybridRNGoogleMapsPlusModuleSpec::javaobject> object("com/rngooglemapsplus/RNGoogleMapsPlusModule");
63
+ auto instance = object.create();
64
+ return instance->cthis()->shared();
65
+ }
66
+ );
67
+ });
68
+ }
69
+
70
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,25 @@
1
+ ///
2
+ /// RNGoogleMapsPlusOnLoad.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include <jni.h>
9
+ #include <NitroModules/NitroDefines.hpp>
10
+
11
+ namespace margelo::nitro::rngooglemapsplus {
12
+
13
+ /**
14
+ * Initializes the native (C++) part of RNGoogleMapsPlus, and autolinks all Hybrid Objects.
15
+ * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
16
+ * Example:
17
+ * ```cpp (cpp-adapter.cpp)
18
+ * JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
19
+ * return margelo::nitro::rngooglemapsplus::initialize(vm);
20
+ * }
21
+ * ```
22
+ */
23
+ int initialize(JavaVM* vm);
24
+
25
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// JFunc_void_RNLatLng.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include <functional>
12
+
13
+ #include "RNLatLng.hpp"
14
+ #include <functional>
15
+ #include "JRNLatLng.hpp"
16
+
17
+ namespace margelo::nitro::rngooglemapsplus {
18
+
19
+ using namespace facebook;
20
+
21
+ /**
22
+ * Represents the Java/Kotlin callback `(coordinate: RNLatLng) -> Unit`.
23
+ * This can be passed around between C++ and Java/Kotlin.
24
+ */
25
+ struct JFunc_void_RNLatLng: public jni::JavaClass<JFunc_void_RNLatLng> {
26
+ public:
27
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLatLng;";
28
+
29
+ public:
30
+ /**
31
+ * Invokes the function this `JFunc_void_RNLatLng` instance holds through JNI.
32
+ */
33
+ void invoke(const RNLatLng& coordinate) const {
34
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLatLng> /* coordinate */)>("invoke");
35
+ method(self(), JRNLatLng::fromCpp(coordinate));
36
+ }
37
+ };
38
+
39
+ /**
40
+ * An implementation of Func_void_RNLatLng that is backed by a C++ implementation (using `std::function<...>`)
41
+ */
42
+ struct JFunc_void_RNLatLng_cxx final: public jni::HybridClass<JFunc_void_RNLatLng_cxx, JFunc_void_RNLatLng> {
43
+ public:
44
+ static jni::local_ref<JFunc_void_RNLatLng::javaobject> fromCpp(const std::function<void(const RNLatLng& /* coordinate */)>& func) {
45
+ return JFunc_void_RNLatLng_cxx::newObjectCxxArgs(func);
46
+ }
47
+
48
+ public:
49
+ /**
50
+ * Invokes the C++ `std::function<...>` this `JFunc_void_RNLatLng_cxx` instance holds.
51
+ */
52
+ void invoke_cxx(jni::alias_ref<JRNLatLng> coordinate) {
53
+ _func(coordinate->toCpp());
54
+ }
55
+
56
+ public:
57
+ [[nodiscard]]
58
+ inline const std::function<void(const RNLatLng& /* coordinate */)>& getFunction() const {
59
+ return _func;
60
+ }
61
+
62
+ public:
63
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLatLng_cxx;";
64
+ static void registerNatives() {
65
+ registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLatLng_cxx::invoke_cxx)});
66
+ }
67
+
68
+ private:
69
+ explicit JFunc_void_RNLatLng_cxx(const std::function<void(const RNLatLng& /* coordinate */)>& func): _func(func) { }
70
+
71
+ private:
72
+ friend HybridBase;
73
+ std::function<void(const RNLatLng& /* coordinate */)> _func;
74
+ };
75
+
76
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,78 @@
1
+ ///
2
+ /// JFunc_void_RNLocation.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include <functional>
12
+
13
+ #include "RNLocation.hpp"
14
+ #include <functional>
15
+ #include "JRNLocation.hpp"
16
+ #include "RNLatLng.hpp"
17
+ #include "JRNLatLng.hpp"
18
+
19
+ namespace margelo::nitro::rngooglemapsplus {
20
+
21
+ using namespace facebook;
22
+
23
+ /**
24
+ * Represents the Java/Kotlin callback `(location: RNLocation) -> Unit`.
25
+ * This can be passed around between C++ and Java/Kotlin.
26
+ */
27
+ struct JFunc_void_RNLocation: public jni::JavaClass<JFunc_void_RNLocation> {
28
+ public:
29
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocation;";
30
+
31
+ public:
32
+ /**
33
+ * Invokes the function this `JFunc_void_RNLocation` instance holds through JNI.
34
+ */
35
+ void invoke(const RNLocation& location) const {
36
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocation> /* location */)>("invoke");
37
+ method(self(), JRNLocation::fromCpp(location));
38
+ }
39
+ };
40
+
41
+ /**
42
+ * An implementation of Func_void_RNLocation that is backed by a C++ implementation (using `std::function<...>`)
43
+ */
44
+ struct JFunc_void_RNLocation_cxx final: public jni::HybridClass<JFunc_void_RNLocation_cxx, JFunc_void_RNLocation> {
45
+ public:
46
+ static jni::local_ref<JFunc_void_RNLocation::javaobject> fromCpp(const std::function<void(const RNLocation& /* location */)>& func) {
47
+ return JFunc_void_RNLocation_cxx::newObjectCxxArgs(func);
48
+ }
49
+
50
+ public:
51
+ /**
52
+ * Invokes the C++ `std::function<...>` this `JFunc_void_RNLocation_cxx` instance holds.
53
+ */
54
+ void invoke_cxx(jni::alias_ref<JRNLocation> location) {
55
+ _func(location->toCpp());
56
+ }
57
+
58
+ public:
59
+ [[nodiscard]]
60
+ inline const std::function<void(const RNLocation& /* location */)>& getFunction() const {
61
+ return _func;
62
+ }
63
+
64
+ public:
65
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocation_cxx;";
66
+ static void registerNatives() {
67
+ registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLocation_cxx::invoke_cxx)});
68
+ }
69
+
70
+ private:
71
+ explicit JFunc_void_RNLocation_cxx(const std::function<void(const RNLocation& /* location */)>& func): _func(func) { }
72
+
73
+ private:
74
+ friend HybridBase;
75
+ std::function<void(const RNLocation& /* location */)> _func;
76
+ };
77
+
78
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// JFunc_void_RNLocationErrorCode.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include <functional>
12
+
13
+ #include "RNLocationErrorCode.hpp"
14
+ #include <functional>
15
+ #include "JRNLocationErrorCode.hpp"
16
+
17
+ namespace margelo::nitro::rngooglemapsplus {
18
+
19
+ using namespace facebook;
20
+
21
+ /**
22
+ * Represents the Java/Kotlin callback `(error: RNLocationErrorCode) -> Unit`.
23
+ * This can be passed around between C++ and Java/Kotlin.
24
+ */
25
+ struct JFunc_void_RNLocationErrorCode: public jni::JavaClass<JFunc_void_RNLocationErrorCode> {
26
+ public:
27
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocationErrorCode;";
28
+
29
+ public:
30
+ /**
31
+ * Invokes the function this `JFunc_void_RNLocationErrorCode` instance holds through JNI.
32
+ */
33
+ void invoke(RNLocationErrorCode error) const {
34
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocationErrorCode> /* error */)>("invoke");
35
+ method(self(), JRNLocationErrorCode::fromCpp(error));
36
+ }
37
+ };
38
+
39
+ /**
40
+ * An implementation of Func_void_RNLocationErrorCode that is backed by a C++ implementation (using `std::function<...>`)
41
+ */
42
+ struct JFunc_void_RNLocationErrorCode_cxx final: public jni::HybridClass<JFunc_void_RNLocationErrorCode_cxx, JFunc_void_RNLocationErrorCode> {
43
+ public:
44
+ static jni::local_ref<JFunc_void_RNLocationErrorCode::javaobject> fromCpp(const std::function<void(RNLocationErrorCode /* error */)>& func) {
45
+ return JFunc_void_RNLocationErrorCode_cxx::newObjectCxxArgs(func);
46
+ }
47
+
48
+ public:
49
+ /**
50
+ * Invokes the C++ `std::function<...>` this `JFunc_void_RNLocationErrorCode_cxx` instance holds.
51
+ */
52
+ void invoke_cxx(jni::alias_ref<JRNLocationErrorCode> error) {
53
+ _func(error->toCpp());
54
+ }
55
+
56
+ public:
57
+ [[nodiscard]]
58
+ inline const std::function<void(RNLocationErrorCode /* error */)>& getFunction() const {
59
+ return _func;
60
+ }
61
+
62
+ public:
63
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNLocationErrorCode_cxx;";
64
+ static void registerNatives() {
65
+ registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNLocationErrorCode_cxx::invoke_cxx)});
66
+ }
67
+
68
+ private:
69
+ explicit JFunc_void_RNLocationErrorCode_cxx(const std::function<void(RNLocationErrorCode /* error */)>& func): _func(func) { }
70
+
71
+ private:
72
+ friend HybridBase;
73
+ std::function<void(RNLocationErrorCode /* error */)> _func;
74
+ };
75
+
76
+ } // namespace margelo::nitro::rngooglemapsplus