react-native-google-maps-plus 0.1.0 → 1.0.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 (183) hide show
  1. package/GoogleMapsNitro.podspec +34 -0
  2. package/LICENSE +20 -0
  3. package/README.md +40 -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/googlemapsnitro/Color.kt +65 -0
  11. package/android/src/main/java/com/googlemapsnitro/GoogleMapsNitroPackage.kt +35 -0
  12. package/android/src/main/java/com/googlemapsnitro/GoogleMapsNitroViewImpl.kt +720 -0
  13. package/android/src/main/java/com/googlemapsnitro/HybridGoogleMapsNitroModule.kt +22 -0
  14. package/android/src/main/java/com/googlemapsnitro/HybridGoogleMapsNitroView.kt +337 -0
  15. package/android/src/main/java/com/googlemapsnitro/LocationHandler.kt +205 -0
  16. package/android/src/main/java/com/googlemapsnitro/MapMarker.kt +145 -0
  17. package/android/src/main/java/com/googlemapsnitro/MapPolygon.kt +36 -0
  18. package/android/src/main/java/com/googlemapsnitro/MapPolyline.kt +59 -0
  19. package/android/src/main/java/com/googlemapsnitro/PermissionHandler.kt +116 -0
  20. package/android/src/main/java/com/googlemapsnitro/PlayServicesHandler.kt +25 -0
  21. package/ios/Color.swift +109 -0
  22. package/ios/GoogleMapNitroViewImpl.swift +590 -0
  23. package/ios/HybridGoogleMapsNitroModule.swift +27 -0
  24. package/ios/HybridGoogleMapsNitroView.swift +348 -0
  25. package/ios/LocationHandler.swift +205 -0
  26. package/ios/MapHelper.swift +18 -0
  27. package/ios/MapMarker.swift +207 -0
  28. package/ios/MapPolygon.swift +55 -0
  29. package/ios/MapPolyline.swift +83 -0
  30. package/ios/PermissionHandler.swift +73 -0
  31. package/lib/module/GoogleMapsNitroModule.nitro.js +4 -0
  32. package/lib/module/GoogleMapsNitroModule.nitro.js.map +1 -0
  33. package/lib/module/GoogleMapsNitroView.nitro.js +4 -0
  34. package/lib/module/GoogleMapsNitroView.nitro.js.map +1 -0
  35. package/lib/module/index.js +8 -0
  36. package/lib/module/index.js.map +1 -0
  37. package/lib/module/package.json +1 -0
  38. package/lib/module/types.js +78 -0
  39. package/lib/module/types.js.map +1 -0
  40. package/lib/typescript/package.json +1 -0
  41. package/lib/typescript/src/GoogleMapsNitroModule.nitro.d.ts +12 -0
  42. package/lib/typescript/src/GoogleMapsNitroModule.nitro.d.ts.map +1 -0
  43. package/lib/typescript/src/GoogleMapsNitroView.nitro.d.ts +34 -0
  44. package/lib/typescript/src/GoogleMapsNitroView.nitro.d.ts.map +1 -0
  45. package/lib/typescript/src/index.d.ts +7 -0
  46. package/lib/typescript/src/index.d.ts.map +1 -0
  47. package/lib/typescript/src/types.d.ts +113 -0
  48. package/lib/typescript/src/types.d.ts.map +1 -0
  49. package/nitro.json +28 -0
  50. package/nitrogen/generated/.gitattributes +1 -0
  51. package/nitrogen/generated/android/GoogleMapsNitro+autolinking.cmake +85 -0
  52. package/nitrogen/generated/android/GoogleMapsNitro+autolinking.gradle +27 -0
  53. package/nitrogen/generated/android/GoogleMapsNitroOnLoad.cpp +70 -0
  54. package/nitrogen/generated/android/GoogleMapsNitroOnLoad.hpp +25 -0
  55. package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
  56. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
  57. package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
  58. package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
  59. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
  60. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
  61. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
  62. package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.cpp +83 -0
  63. package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.hpp +67 -0
  64. package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.cpp +485 -0
  65. package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.hpp +108 -0
  66. package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
  67. package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
  68. package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
  69. package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
  70. package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
  71. package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
  72. package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
  73. package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
  74. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
  75. package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
  76. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
  77. package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
  78. package/nitrogen/generated/android/c++/JRNPolygon.hpp +94 -0
  79. package/nitrogen/generated/android/c++/JRNPolyline.hpp +102 -0
  80. package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
  81. package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
  82. package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
  83. package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.cpp +132 -0
  84. package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.hpp +49 -0
  85. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLatLng.kt +81 -0
  86. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocation.kt +81 -0
  87. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocationErrorCode.kt +81 -0
  88. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNMapErrorCode.kt +81 -0
  89. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNRegion_RNCamera_bool.kt +81 -0
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_bool.kt +81 -0
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_std__string.kt +81 -0
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/GoogleMapsNitroOnLoad.kt +35 -0
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroModuleSpec.kt +64 -0
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroViewSpec.kt +263 -0
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNAndroidLocationPermissionResult.kt +22 -0
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNCamera.kt +38 -0
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNIOSPermissionResult.kt +21 -0
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLatLng.kt +32 -0
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineCapType.kt +22 -0
  100. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineJoinType.kt +22 -0
  101. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocation.kt +32 -0
  102. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationErrorCode.kt +25 -0
  103. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationPermissionResult.kt +32 -0
  104. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapErrorCode.kt +26 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapPadding.kt +38 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMarker.kt +47 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolygon.kt +44 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolyline.kt +47 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPosition.kt +32 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNRegion.kt +35 -0
  111. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNUserInterfaceStyle.kt +22 -0
  112. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewManager.kt +50 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewStateUpdater.kt +23 -0
  114. package/nitrogen/generated/ios/GoogleMapsNitro+autolinking.rb +60 -0
  115. package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.cpp +121 -0
  116. package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.hpp +649 -0
  117. package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Umbrella.hpp +104 -0
  118. package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.mm +41 -0
  119. package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.swift +40 -0
  120. package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.cpp +11 -0
  121. package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.hpp +102 -0
  122. package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.cpp +11 -0
  123. package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.hpp +294 -0
  124. package/nitrogen/generated/ios/c++/views/HybridGoogleMapsNitroViewComponent.mm +191 -0
  125. package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
  126. package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
  127. package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
  128. package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
  129. package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
  130. package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
  131. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  132. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  133. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  134. package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec.swift +52 -0
  135. package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec_cxx.swift +164 -0
  136. package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec.swift +73 -0
  137. package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec_cxx.swift +630 -0
  138. package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
  139. package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
  140. package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
  141. package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
  142. package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
  143. package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
  144. package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
  145. package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
  146. package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
  147. package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
  148. package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
  149. package/nitrogen/generated/ios/swift/RNMarker.swift +120 -0
  150. package/nitrogen/generated/ios/swift/RNPolygon.swift +152 -0
  151. package/nitrogen/generated/ios/swift/RNPolyline.swift +168 -0
  152. package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
  153. package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
  154. package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
  155. package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.cpp +24 -0
  156. package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.hpp +67 -0
  157. package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.cpp +66 -0
  158. package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.hpp +145 -0
  159. package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
  160. package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
  161. package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
  162. package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
  163. package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
  164. package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
  165. package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
  166. package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
  167. package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
  168. package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
  169. package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
  170. package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
  171. package/nitrogen/generated/shared/c++/RNPolygon.hpp +91 -0
  172. package/nitrogen/generated/shared/c++/RNPolyline.hpp +101 -0
  173. package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
  174. package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
  175. package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
  176. package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.cpp +315 -0
  177. package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.hpp +139 -0
  178. package/nitrogen/generated/shared/json/GoogleMapsNitroViewConfig.json +29 -0
  179. package/package.json +13 -3
  180. package/src/GoogleMapsNitroModule.nitro.ts +13 -0
  181. package/src/GoogleMapsNitroView.nitro.ts +78 -0
  182. package/src/index.tsx +24 -0
  183. package/src/types.ts +174 -0
@@ -0,0 +1,139 @@
1
+ ///
2
+ /// HybridGoogleMapsNitroViewComponent.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 <optional>
11
+ #include <NitroModules/NitroDefines.hpp>
12
+ #include <NitroModules/NitroHash.hpp>
13
+ #include <NitroModules/CachedProp.hpp>
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+ #include <react/renderer/core/PropsParserContext.h>
16
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
+ #include <react/renderer/components/view/ViewProps.h>
18
+
19
+ #include <string>
20
+ #include "RNCamera.hpp"
21
+ #include "RNUserInterfaceStyle.hpp"
22
+ #include "RNMapPadding.hpp"
23
+ #include "RNMarker.hpp"
24
+ #include <vector>
25
+ #include "RNPolygon.hpp"
26
+ #include "RNPolyline.hpp"
27
+ #include "RNMapErrorCode.hpp"
28
+ #include <functional>
29
+ #include <optional>
30
+ #include "RNLocation.hpp"
31
+ #include "RNLocationErrorCode.hpp"
32
+ #include "RNLatLng.hpp"
33
+ #include "RNRegion.hpp"
34
+ #include <memory>
35
+ #include "HybridGoogleMapsNitroViewSpec.hpp"
36
+
37
+ namespace margelo::nitro::googlemapsnitro::views {
38
+
39
+ using namespace facebook;
40
+
41
+ /**
42
+ * The name of the actual native View.
43
+ */
44
+ extern const char HybridGoogleMapsNitroViewComponentName[];
45
+
46
+ /**
47
+ * Props for the "GoogleMapsNitroView" View.
48
+ */
49
+ class HybridGoogleMapsNitroViewProps final: public react::ViewProps {
50
+ public:
51
+ HybridGoogleMapsNitroViewProps() = default;
52
+ HybridGoogleMapsNitroViewProps(const HybridGoogleMapsNitroViewProps&);
53
+ HybridGoogleMapsNitroViewProps(const react::PropsParserContext& context,
54
+ const HybridGoogleMapsNitroViewProps& sourceProps,
55
+ const react::RawProps& rawProps);
56
+
57
+ public:
58
+ CachedProp<bool> buildingEnabled;
59
+ CachedProp<bool> trafficEnabled;
60
+ CachedProp<std::string> customMapStyle;
61
+ CachedProp<RNCamera> initialCamera;
62
+ CachedProp<RNUserInterfaceStyle> userInterfaceStyle;
63
+ CachedProp<double> minZoomLevel;
64
+ CachedProp<double> maxZoomLevel;
65
+ CachedProp<RNMapPadding> mapPadding;
66
+ CachedProp<std::vector<RNMarker>> markers;
67
+ CachedProp<std::vector<RNPolygon>> polygons;
68
+ CachedProp<std::vector<RNPolyline>> polylines;
69
+ CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>> onMapError;
70
+ CachedProp<std::optional<std::function<void(bool /* ready */)>>> onMapReady;
71
+ CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onLocationUpdate;
72
+ CachedProp<std::optional<std::function<void(RNLocationErrorCode /* error */)>>> onLocationError;
73
+ CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapPress;
74
+ CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onMarkerPress;
75
+ CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
76
+ CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
77
+ CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
78
+ CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridGoogleMapsNitroViewSpec>& /* ref */)>>> hybridRef;
79
+
80
+ private:
81
+ static bool filterObjectKeys(const std::string& propName);
82
+ };
83
+
84
+ /**
85
+ * State for the "GoogleMapsNitroView" View.
86
+ */
87
+ class HybridGoogleMapsNitroViewState final {
88
+ public:
89
+ HybridGoogleMapsNitroViewState() = default;
90
+
91
+ public:
92
+ void setProps(const HybridGoogleMapsNitroViewProps& props) { _props.emplace(props); }
93
+ const std::optional<HybridGoogleMapsNitroViewProps>& getProps() const { return _props; }
94
+
95
+ public:
96
+ #ifdef ANDROID
97
+ HybridGoogleMapsNitroViewState(const HybridGoogleMapsNitroViewState& /* previousState */, folly::dynamic /* data */) {}
98
+ folly::dynamic getDynamic() const {
99
+ throw std::runtime_error("HybridGoogleMapsNitroViewState does not support folly!");
100
+ }
101
+ react::MapBuffer getMapBuffer() const {
102
+ throw std::runtime_error("HybridGoogleMapsNitroViewState does not support MapBuffer!");
103
+ };
104
+ #endif
105
+
106
+ private:
107
+ std::optional<HybridGoogleMapsNitroViewProps> _props;
108
+ };
109
+
110
+ /**
111
+ * The Shadow Node for the "GoogleMapsNitroView" View.
112
+ */
113
+ using HybridGoogleMapsNitroViewShadowNode = react::ConcreteViewShadowNode<HybridGoogleMapsNitroViewComponentName /* "HybridGoogleMapsNitroView" */,
114
+ HybridGoogleMapsNitroViewProps /* custom props */,
115
+ react::ViewEventEmitter /* default */,
116
+ HybridGoogleMapsNitroViewState /* custom state */>;
117
+
118
+ /**
119
+ * The Component Descriptor for the "GoogleMapsNitroView" View.
120
+ */
121
+ class HybridGoogleMapsNitroViewComponentDescriptor final: public react::ConcreteComponentDescriptor<HybridGoogleMapsNitroViewShadowNode> {
122
+ public:
123
+ HybridGoogleMapsNitroViewComponentDescriptor(const react::ComponentDescriptorParameters& parameters);
124
+
125
+ public:
126
+ /**
127
+ * A faster path for cloning props - reuses the caching logic from `HybridGoogleMapsNitroViewProps`.
128
+ */
129
+ std::shared_ptr<const react::Props> cloneProps(const react::PropsParserContext& context,
130
+ const std::shared_ptr<const react::Props>& props,
131
+ react::RawProps rawProps) const override;
132
+ #ifdef ANDROID
133
+ void adopt(react::ShadowNode& shadowNode) const override;
134
+ #endif
135
+ };
136
+
137
+ /* The actual view for "GoogleMapsNitroView" needs to be implemented in platform-specific code. */
138
+
139
+ } // namespace margelo::nitro::googlemapsnitro::views
@@ -0,0 +1,29 @@
1
+ {
2
+ "uiViewClassName": "GoogleMapsNitroView",
3
+ "supportsRawText": false,
4
+ "bubblingEventTypes": {},
5
+ "directEventTypes": {},
6
+ "validAttributes": {
7
+ "buildingEnabled": true,
8
+ "trafficEnabled": true,
9
+ "customMapStyle": true,
10
+ "initialCamera": true,
11
+ "userInterfaceStyle": true,
12
+ "minZoomLevel": true,
13
+ "maxZoomLevel": true,
14
+ "mapPadding": true,
15
+ "markers": true,
16
+ "polygons": true,
17
+ "polylines": true,
18
+ "onMapError": true,
19
+ "onMapReady": true,
20
+ "onLocationUpdate": true,
21
+ "onLocationError": true,
22
+ "onMapPress": true,
23
+ "onMarkerPress": true,
24
+ "onCameraChangeStart": true,
25
+ "onCameraChange": true,
26
+ "onCameraChangeComplete": true,
27
+ "hybridRef": true
28
+ }
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "0.1.0",
3
+ "version": "1.0.1",
4
4
  "description": "React-native wrapper for android & IOS google maps sdk",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -21,7 +21,8 @@
21
21
  "git:clean": "git clean -dfX",
22
22
  "release": "semantic-release",
23
23
  "build": "yarn typecheck && yarn nitrogen && bob build",
24
- "nitrogen": "nitrogen --logLevel=\"debug\" && node scripts/post-script.js"
24
+ "nitrogen": "nitrogen --logLevel=\"debug\" && node scripts/post-script.js",
25
+ "prepare": "bob build"
25
26
  },
26
27
  "keywords": [
27
28
  "react-native",
@@ -59,6 +60,10 @@
59
60
  "license": "MIT",
60
61
  "bugs": "https://github.com/pinpong/react-native-google-maps-plus/issues",
61
62
  "homepage": "https://github.com/pinpong/react-native-google-maps-plus#readme",
63
+ "publishConfig": {
64
+ "access": "public",
65
+ "provenance": true
66
+ },
62
67
  "devDependencies": {
63
68
  "@commitlint/cli": "20.0.0",
64
69
  "@commitlint/config-conventional": "20.0.0",
@@ -70,6 +75,7 @@
70
75
  "@react-native/eslint-config": "0.82.0-rc.4",
71
76
  "@semantic-release/changelog": "6.0.3",
72
77
  "@semantic-release/git": "10.0.1",
78
+ "@semantic-release/npm": "13.0.0-beta.1",
73
79
  "@types/jest": "30.0.0",
74
80
  "@types/react": "19.1.15",
75
81
  "clang-format-node": "2.0.1",
@@ -87,9 +93,13 @@
87
93
  "react-native": "0.82.0-rc.4",
88
94
  "react-native-builder-bob": "0.40.13",
89
95
  "react-native-nitro-modules": "0.29.6",
90
- "semantic-release": "24.2.9",
96
+ "semantic-release": "25.0.0-beta.6",
91
97
  "typescript": "5.9.2"
92
98
  },
99
+ "overrides": {
100
+ "@semantic-release/npm": "13.0.0-beta.1",
101
+ "semantic-release": "25.0.0-beta.6"
102
+ },
93
103
  "peerDependencies": {
94
104
  "react": "*",
95
105
  "react-native": "*",
@@ -0,0 +1,13 @@
1
+ import { type HybridObject } from 'react-native-nitro-modules';
2
+ import type { RNLocationPermissionResult } from './types';
3
+
4
+ export interface GoogleMapsNitroModule
5
+ extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
6
+ showLocationDialog(): void;
7
+
8
+ openLocationSettings(): void;
9
+
10
+ requestLocationPermission(): Promise<RNLocationPermissionResult>;
11
+
12
+ isGooglePlayServicesAvailable(): boolean;
13
+ }
@@ -0,0 +1,78 @@
1
+ import type {
2
+ HybridView,
3
+ HybridViewMethods,
4
+ HybridViewProps,
5
+ } from 'react-native-nitro-modules';
6
+ import type {
7
+ RNCamera,
8
+ RNLatLng,
9
+ RNMapPadding,
10
+ RNPolygon,
11
+ RNPolyline,
12
+ RNUserInterfaceStyle,
13
+ RNLocationErrorCode,
14
+ RNMarker,
15
+ RNLocationPermissionResult,
16
+ RNRegion,
17
+ RNLocation,
18
+ RNMapErrorCode,
19
+ } from './types';
20
+
21
+ export interface GoogleMapsNitroViewProps extends HybridViewProps {
22
+ buildingEnabled: boolean;
23
+ trafficEnabled: boolean;
24
+ customMapStyle: string;
25
+ initialCamera: RNCamera;
26
+ userInterfaceStyle: RNUserInterfaceStyle;
27
+ minZoomLevel: number;
28
+ maxZoomLevel: number;
29
+ mapPadding: RNMapPadding;
30
+ markers: RNMarker[];
31
+ polygons: RNPolygon[];
32
+ polylines: RNPolyline[];
33
+ onMapError?: (error: RNMapErrorCode) => void;
34
+ onMapReady?: (ready: boolean) => void;
35
+ onLocationUpdate?: (location: RNLocation) => void;
36
+ onLocationError?: (error: RNLocationErrorCode) => void;
37
+ onMapPress?: (coordinate: RNLatLng) => void;
38
+ onMarkerPress?: (id: string) => void;
39
+ onCameraChangeStart?: (
40
+ region: RNRegion,
41
+ camera: RNCamera,
42
+ isGesture: boolean
43
+ ) => void;
44
+ onCameraChange?: (
45
+ region: RNRegion,
46
+ camera: RNCamera,
47
+ isGesture: boolean
48
+ ) => void;
49
+ onCameraChangeComplete?: (
50
+ region: RNRegion,
51
+ camera: RNCamera,
52
+ isGesture: boolean
53
+ ) => void;
54
+ }
55
+
56
+ export interface GoogleMapsNitroViewMethods extends HybridViewMethods {
57
+ setCamera(camera: RNCamera, animated?: boolean, durationMS?: number): void;
58
+
59
+ setCameraToCoordinates(
60
+ coordinates: RNLatLng[],
61
+ padding?: RNMapPadding,
62
+ animated?: boolean,
63
+ durationMS?: number
64
+ ): void;
65
+
66
+ showLocationDialog(): void;
67
+
68
+ openLocationSettings(): void;
69
+
70
+ requestLocationPermission(): Promise<RNLocationPermissionResult>;
71
+
72
+ isGooglePlayServicesAvailable(): boolean;
73
+ }
74
+
75
+ export type GoogleMapsNitroView = HybridView<
76
+ GoogleMapsNitroViewProps,
77
+ GoogleMapsNitroViewMethods
78
+ >;
package/src/index.tsx ADDED
@@ -0,0 +1,24 @@
1
+ import { getHostComponent, NitroModules } from 'react-native-nitro-modules';
2
+
3
+ const GoogleMapsNitroConfig = require('../nitrogen/generated/shared/json/GoogleMapsNitroViewConfig.json');
4
+
5
+ import type {
6
+ GoogleMapsNitroViewMethods,
7
+ GoogleMapsNitroViewProps,
8
+ } from './GoogleMapsNitroView.nitro';
9
+
10
+ import type { GoogleMapsNitroModule } from './GoogleMapsNitroModule.nitro';
11
+
12
+ export * from './types';
13
+
14
+ export type { GoogleMapsNitroViewMethods, GoogleMapsNitroViewProps };
15
+
16
+ export const GoogleMapsView = getHostComponent<
17
+ GoogleMapsNitroViewProps,
18
+ GoogleMapsNitroViewMethods
19
+ >('GoogleMapsNitroView', () => GoogleMapsNitroConfig);
20
+
21
+ export const GoogleMapsModule =
22
+ NitroModules.createHybridObject<GoogleMapsNitroModule>(
23
+ 'GoogleMapsNitroModule'
24
+ );
package/src/types.ts ADDED
@@ -0,0 +1,174 @@
1
+ import type { GoogleMapsNitroViewMethods } from './GoogleMapsNitroView.nitro';
2
+ import type { HybridView } from 'react-native-nitro-modules';
3
+
4
+ export type GoogleMapsViewRef = HybridView<GoogleMapsNitroViewMethods>;
5
+
6
+ export type RNLatLng = { latitude: number; longitude: number };
7
+
8
+ export type RNBoundingBox = { northEast: RNLatLng; southWest: RNLatLng };
9
+
10
+ export type RNMapPadding = {
11
+ top: number;
12
+ left: number;
13
+ bottom: number;
14
+ right: number;
15
+ };
16
+
17
+ export type RNUserInterfaceStyle = 'light' | 'dark' | 'default';
18
+
19
+ export type RNFeatureType = string;
20
+
21
+ /*
22
+ | 'administrative'
23
+ | 'administrative.country'
24
+ | 'administrative.land_parcel'
25
+ | 'administrative.locality'
26
+ | 'administrative.neighborhood'
27
+ | 'administrative.province'
28
+ | 'landscape'
29
+ | 'landscape.man_made'
30
+ | 'landscape.natural'
31
+ | 'poi'
32
+ | 'poi.attraction'
33
+ | 'poi.business'
34
+ | 'poi.government'
35
+ | 'poi.medical'
36
+ | 'poi.park'
37
+ | 'poi.place_of_worship'
38
+ | 'poi.school'
39
+ | 'poi.sports_complex'
40
+ | 'road'
41
+ | 'road.arterial'
42
+ | 'road.highway'
43
+ | 'road.local'
44
+ | 'transit'
45
+ | 'transit.line'
46
+ | 'transit.station'
47
+ | 'water';
48
+ */
49
+
50
+ export type RNElementType = string;
51
+
52
+ /*
53
+ | 'all'
54
+ | 'geometry'
55
+ | 'geometry.fill'
56
+ | 'geometry.stroke'
57
+ | 'labels'
58
+ | 'labels.icon'
59
+ | 'labels.text'
60
+ | 'labels.text.fill'
61
+ | 'labels.text.stroke'
62
+ */
63
+
64
+ export type RNVisibility = string;
65
+
66
+ /*
67
+ 'on' | 'off' | 'simplified';
68
+ */
69
+
70
+ export interface RNMapStyler {
71
+ color?: string;
72
+ visibility?: RNVisibility;
73
+ weight?: number;
74
+ gamma?: number;
75
+ lightness?: number;
76
+ saturation?: number;
77
+ invert_lightness?: boolean;
78
+ }
79
+
80
+ export interface RNMapStyleElement {
81
+ featureType?: RNFeatureType;
82
+ elementType?: RNElementType;
83
+ stylers: RNMapStyler[];
84
+ }
85
+
86
+ export type RNCamera = {
87
+ center?: RNLatLng;
88
+ zoom?: number;
89
+ bearing?: number;
90
+ tilt?: number;
91
+ };
92
+
93
+ export type RNRegion = {
94
+ center: RNLatLng;
95
+ latitudeDelta: number;
96
+ longitudeDelta: number;
97
+ };
98
+
99
+ export type RNPosition = {
100
+ x: number;
101
+ y: number;
102
+ };
103
+
104
+ export type RNLineCapType = 'butt' | 'round' | 'square';
105
+ export type RNLineJoinType = 'miter' | 'round' | 'bevel';
106
+
107
+ export type RNMarker = {
108
+ id: string;
109
+ zIndex: number;
110
+ coordinate: RNLatLng;
111
+ anchor?: RNPosition;
112
+ width: number;
113
+ height: number;
114
+ iconSvg: string;
115
+ };
116
+
117
+ export type RNPolygon = {
118
+ id: string;
119
+ zIndex: number;
120
+ coordinates: RNLatLng[];
121
+ fillColor?: string;
122
+ strokeColor?: string;
123
+ strokeWidth?: number;
124
+ };
125
+
126
+ export type RNPolyline = {
127
+ id: string;
128
+ zIndex: number;
129
+ coordinates: RNLatLng[];
130
+ lineCap?: RNLineCapType;
131
+ lineJoin?: RNLineJoinType;
132
+ color?: string;
133
+ width?: number;
134
+ };
135
+
136
+ export type RNLocationPermissionResult = {
137
+ android?: RNAndroidLocationPermissionResult;
138
+ ios?: RNIOSPermissionResult;
139
+ };
140
+
141
+ export enum RNAndroidLocationPermissionResult {
142
+ GRANTED = 1,
143
+ DENIED = -1,
144
+ NEVER_ASK_AGAIN = -2,
145
+ }
146
+
147
+ export enum RNIOSPermissionResult {
148
+ DENIED = -1,
149
+ AUTHORIZED = 1,
150
+ }
151
+
152
+ export type RNLocation = {
153
+ center: RNLatLng;
154
+ bearing: number;
155
+ };
156
+
157
+ export enum RNLocationErrorCode {
158
+ PERMISSION_DENIED = 1,
159
+ POSITION_UNAVAILABLE = 2,
160
+ TIMEOUT = 3,
161
+ PLAY_SERVICE_NOT_AVAILABLE = 4,
162
+ SETTINGS_NOT_SATISFIED = 5,
163
+ INTERNAL_ERROR = -1,
164
+ }
165
+
166
+ export enum RNMapErrorCode {
167
+ PLAY_SERVICES_MISSING = 0,
168
+ PLAY_SERVICES_INVALID = 1,
169
+ PLAY_SERVICES_DISABLED = 2,
170
+ PLAY_SERVICES_OUTDATED = 3,
171
+ PLAY_SERVICE_UPDATE_AVAILABLE = 4,
172
+ PLAY_SERVICE_UPDATING = 5,
173
+ UNKNOWN = 6,
174
+ }