react-native-google-maps-plus 1.3.0 → 1.4.1-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 (119) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +50 -161
  3. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +38 -36
  4. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +33 -9
  5. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +73 -18
  6. package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +59 -12
  7. package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +47 -12
  8. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +12 -9
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/CameraPositionExtension.kt +12 -0
  10. package/android/src/main/java/com/rngooglemapsplus/extensions/IntExtension.kt +28 -0
  11. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +15 -0
  12. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngExtension.kt +6 -0
  13. package/android/src/main/java/com/rngooglemapsplus/extensions/LocationExtension.kt +59 -0
  14. package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +1 -2
  15. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngExtension.kt +6 -0
  16. package/android/src/main/java/com/rngooglemapsplus/extensions/RNMarkerExtension.kt +8 -0
  17. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolygonExtension.kt +2 -0
  18. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolylineExtension.kt +1 -0
  19. package/ios/GoogleMapViewImpl.swift +39 -180
  20. package/ios/LocationHandler.swift +5 -13
  21. package/ios/MapCircleBuilder.swift +30 -18
  22. package/ios/MapHelper.swift +20 -0
  23. package/ios/MapMarkerBuilder.swift +105 -86
  24. package/ios/MapPolygonBuilder.swift +62 -13
  25. package/ios/MapPolylineBuilder.swift +33 -15
  26. package/ios/RNGoogleMapsPlusView.swift +15 -9
  27. package/ios/extensions/CLError+Extension.swift +14 -0
  28. package/ios/extensions/CLLocation+Extension.swift +27 -0
  29. package/ios/extensions/CLLocationCoordinate2D+Extension.swift +7 -0
  30. package/ios/extensions/GMSCameraPosition+Extension.swift +12 -0
  31. package/ios/extensions/GMSCoordinateBounds+Extension.swift +19 -0
  32. package/ios/extensions/RNLatLng+Extension.swift +7 -0
  33. package/ios/extensions/RNMarker+Extension.swift +7 -3
  34. package/ios/extensions/RNPolygon+Extension.swift.swift +16 -1
  35. package/ios/extensions/RNPolyline+Extension.swift.swift +1 -0
  36. package/lib/module/GoogleMapsPlus.js +7 -0
  37. package/lib/module/GoogleMapsPlus.js.map +1 -0
  38. package/lib/module/index.js +3 -5
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/types.js.map +1 -1
  41. package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +44 -0
  42. package/lib/typescript/src/GoogleMapsPlus.d.ts +5 -0
  43. package/lib/typescript/src/GoogleMapsPlus.d.ts.map +1 -0
  44. package/lib/typescript/src/index.d.ts +3 -3
  45. package/lib/typescript/src/index.d.ts.map +1 -1
  46. package/lib/typescript/src/types.d.ts +33 -0
  47. package/lib/typescript/src/types.d.ts.map +1 -1
  48. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +6 -0
  49. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +12 -0
  50. package/nitrogen/generated/android/c++/JRNLocation.hpp +32 -2
  51. package/nitrogen/generated/android/c++/JRNLocationAndroid.hpp +82 -0
  52. package/nitrogen/generated/android/c++/JRNLocationIOS.hpp +77 -0
  53. package/nitrogen/generated/android/c++/JRNMarker.hpp +8 -0
  54. package/nitrogen/generated/android/c++/JRNPolygon.hpp +29 -2
  55. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +72 -0
  56. package/nitrogen/generated/android/c++/JRNPolyline.hpp +4 -0
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +19 -1
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationAndroid.kt +50 -0
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationIOS.kt +47 -0
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +6 -0
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +7 -1
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygonHole.kt +29 -0
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +3 -0
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +8 -3
  65. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +16 -16
  66. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +87 -20
  67. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +9 -0
  68. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +12 -3
  69. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +8 -0
  70. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +7 -56
  71. package/nitrogen/generated/ios/swift/RNCamera.swift +1 -8
  72. package/nitrogen/generated/ios/swift/RNHeatmap.swift +1 -8
  73. package/nitrogen/generated/ios/swift/RNHeatmapGradient.swift +11 -15
  74. package/nitrogen/generated/ios/swift/RNInitialProps.swift +1 -8
  75. package/nitrogen/generated/ios/swift/RNLocation.swift +92 -2
  76. package/nitrogen/generated/ios/swift/RNLocationAndroid.swift +215 -0
  77. package/nitrogen/generated/ios/swift/RNLocationConfig.swift +2 -16
  78. package/nitrogen/generated/ios/swift/RNLocationIOS.swift +185 -0
  79. package/nitrogen/generated/ios/swift/RNMarker.swift +47 -15
  80. package/nitrogen/generated/ios/swift/RNPolygon.swift +66 -1
  81. package/nitrogen/generated/ios/swift/RNPolygonHole.swift +47 -0
  82. package/nitrogen/generated/ios/swift/RNPolyline.swift +24 -1
  83. package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +1 -8
  84. package/nitrogen/generated/shared/c++/RNAndroidLocationConfig.hpp +8 -0
  85. package/nitrogen/generated/shared/c++/RNCamera.hpp +8 -0
  86. package/nitrogen/generated/shared/c++/RNCircle.hpp +8 -0
  87. package/nitrogen/generated/shared/c++/RNHeatmap.hpp +8 -0
  88. package/nitrogen/generated/shared/c++/RNHeatmapGradient.hpp +8 -0
  89. package/nitrogen/generated/shared/c++/RNHeatmapPoint.hpp +8 -0
  90. package/nitrogen/generated/shared/c++/RNIOSLocationConfig.hpp +8 -0
  91. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +8 -0
  92. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +8 -0
  93. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +8 -0
  94. package/nitrogen/generated/shared/c++/RNKMLayer.hpp +8 -0
  95. package/nitrogen/generated/shared/c++/RNLatLng.hpp +8 -0
  96. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +8 -0
  97. package/nitrogen/generated/shared/c++/RNLocation.hpp +41 -2
  98. package/nitrogen/generated/shared/c++/RNLocationAndroid.hpp +104 -0
  99. package/nitrogen/generated/shared/c++/RNLocationConfig.hpp +8 -0
  100. package/nitrogen/generated/shared/c++/RNLocationIOS.hpp +99 -0
  101. package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +8 -0
  102. package/nitrogen/generated/shared/c++/RNMapPadding.hpp +8 -0
  103. package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +8 -0
  104. package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +8 -0
  105. package/nitrogen/generated/shared/c++/RNMarker.hpp +17 -1
  106. package/nitrogen/generated/shared/c++/RNMarkerSvg.hpp +8 -0
  107. package/nitrogen/generated/shared/c++/RNPolygon.hpp +21 -2
  108. package/nitrogen/generated/shared/c++/RNPolygonHole.hpp +77 -0
  109. package/nitrogen/generated/shared/c++/RNPolyline.hpp +13 -1
  110. package/nitrogen/generated/shared/c++/RNPosition.hpp +8 -0
  111. package/nitrogen/generated/shared/c++/RNRegion.hpp +8 -0
  112. package/nitrogen/generated/shared/c++/RNSize.hpp +8 -0
  113. package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +8 -0
  114. package/package.json +9 -16
  115. package/src/GoogleMapsPlus.tsx +20 -0
  116. package/src/index.tsx +6 -14
  117. package/src/types.ts +36 -0
  118. package/lib/module/package.json +0 -1
  119. package/lib/typescript/package.json +0 -1
@@ -17,14 +17,22 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
  // Forward declaration of `RNLatLng` to properly resolve imports.
22
27
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
28
+ // Forward declaration of `RNPolygonHole` to properly resolve imports.
29
+ namespace margelo::nitro::rngooglemapsplus { struct RNPolygonHole; }
23
30
 
24
31
  #include <string>
25
32
  #include <optional>
26
33
  #include "RNLatLng.hpp"
27
34
  #include <vector>
35
+ #include "RNPolygonHole.hpp"
28
36
 
29
37
  namespace margelo::nitro::rngooglemapsplus {
30
38
 
@@ -40,10 +48,12 @@ namespace margelo::nitro::rngooglemapsplus {
40
48
  std::optional<std::string> fillColor SWIFT_PRIVATE;
41
49
  std::optional<std::string> strokeColor SWIFT_PRIVATE;
42
50
  std::optional<double> strokeWidth SWIFT_PRIVATE;
51
+ std::optional<std::vector<RNPolygonHole>> holes SWIFT_PRIVATE;
52
+ std::optional<bool> geodesic SWIFT_PRIVATE;
43
53
 
44
54
  public:
45
55
  RNPolygon() = default;
46
- explicit RNPolygon(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<std::string> fillColor, std::optional<std::string> strokeColor, std::optional<double> strokeWidth): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), fillColor(fillColor), strokeColor(strokeColor), strokeWidth(strokeWidth) {}
56
+ explicit RNPolygon(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<std::string> fillColor, std::optional<std::string> strokeColor, std::optional<double> strokeWidth, std::optional<std::vector<RNPolygonHole>> holes, std::optional<bool> geodesic): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), fillColor(fillColor), strokeColor(strokeColor), strokeWidth(strokeWidth), holes(holes), geodesic(geodesic) {}
47
57
  };
48
58
 
49
59
  } // namespace margelo::nitro::rngooglemapsplus
@@ -62,7 +72,9 @@ namespace margelo::nitro {
62
72
  JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
63
73
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor")),
64
74
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
65
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth"))
75
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth")),
76
+ JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::fromJSI(runtime, obj.getProperty(runtime, "holes")),
77
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "geodesic"))
66
78
  );
67
79
  }
68
80
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolygon& arg) {
@@ -74,6 +86,8 @@ namespace margelo::nitro {
74
86
  obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
75
87
  obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
76
88
  obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
89
+ obj.setProperty(runtime, "holes", JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::toJSI(runtime, arg.holes));
90
+ obj.setProperty(runtime, "geodesic", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.geodesic));
77
91
  return obj;
78
92
  }
79
93
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -81,6 +95,9 @@ namespace margelo::nitro {
81
95
  return false;
82
96
  }
83
97
  jsi::Object obj = value.getObject(runtime);
98
+ if (!nitro::isPlainObject(runtime, obj)) {
99
+ return false;
100
+ }
84
101
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
85
102
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
86
103
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
@@ -88,6 +105,8 @@ namespace margelo::nitro {
88
105
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
89
106
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
90
107
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
108
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::canConvert(runtime, obj.getProperty(runtime, "holes"))) return false;
109
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "geodesic"))) return false;
91
110
  return true;
92
111
  }
93
112
  };
@@ -0,0 +1,77 @@
1
+ ///
2
+ /// RNPolygonHole.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
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
25
+
26
+ // Forward declaration of `RNLatLng` to properly resolve imports.
27
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
28
+
29
+ #include "RNLatLng.hpp"
30
+ #include <vector>
31
+
32
+ namespace margelo::nitro::rngooglemapsplus {
33
+
34
+ /**
35
+ * A struct which can be represented as a JavaScript object (RNPolygonHole).
36
+ */
37
+ struct RNPolygonHole {
38
+ public:
39
+ std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
40
+
41
+ public:
42
+ RNPolygonHole() = default;
43
+ explicit RNPolygonHole(std::vector<RNLatLng> coordinates): coordinates(coordinates) {}
44
+ };
45
+
46
+ } // namespace margelo::nitro::rngooglemapsplus
47
+
48
+ namespace margelo::nitro {
49
+
50
+ // C++ RNPolygonHole <> JS RNPolygonHole (object)
51
+ template <>
52
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNPolygonHole> final {
53
+ static inline margelo::nitro::rngooglemapsplus::RNPolygonHole fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
+ jsi::Object obj = arg.asObject(runtime);
55
+ return margelo::nitro::rngooglemapsplus::RNPolygonHole(
56
+ JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates"))
57
+ );
58
+ }
59
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolygonHole& arg) {
60
+ jsi::Object obj(runtime);
61
+ obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
62
+ return obj;
63
+ }
64
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
65
+ if (!value.isObject()) {
66
+ return false;
67
+ }
68
+ jsi::Object obj = value.getObject(runtime);
69
+ if (!nitro::isPlainObject(runtime, obj)) {
70
+ return false;
71
+ }
72
+ if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
73
+ return true;
74
+ }
75
+ };
76
+
77
+ } // namespace margelo::nitro
@@ -17,6 +17,11 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
  // Forward declaration of `RNLatLng` to properly resolve imports.
22
27
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
@@ -45,12 +50,13 @@ namespace margelo::nitro::rngooglemapsplus {
45
50
  std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
46
51
  std::optional<RNLineCapType> lineCap SWIFT_PRIVATE;
47
52
  std::optional<RNLineJoinType> lineJoin SWIFT_PRIVATE;
53
+ std::optional<bool> geodesic SWIFT_PRIVATE;
48
54
  std::optional<std::string> color SWIFT_PRIVATE;
49
55
  std::optional<double> width SWIFT_PRIVATE;
50
56
 
51
57
  public:
52
58
  RNPolyline() = default;
53
- explicit RNPolyline(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<RNLineCapType> lineCap, std::optional<RNLineJoinType> lineJoin, std::optional<std::string> color, std::optional<double> width): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), lineCap(lineCap), lineJoin(lineJoin), color(color), width(width) {}
59
+ explicit RNPolyline(std::string id, std::optional<double> zIndex, std::optional<bool> pressable, std::vector<RNLatLng> coordinates, std::optional<RNLineCapType> lineCap, std::optional<RNLineJoinType> lineJoin, std::optional<bool> geodesic, std::optional<std::string> color, std::optional<double> width): id(id), zIndex(zIndex), pressable(pressable), coordinates(coordinates), lineCap(lineCap), lineJoin(lineJoin), geodesic(geodesic), color(color), width(width) {}
54
60
  };
55
61
 
56
62
  } // namespace margelo::nitro::rngooglemapsplus
@@ -69,6 +75,7 @@ namespace margelo::nitro {
69
75
  JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
70
76
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::fromJSI(runtime, obj.getProperty(runtime, "lineCap")),
71
77
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::fromJSI(runtime, obj.getProperty(runtime, "lineJoin")),
78
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "geodesic")),
72
79
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "color")),
73
80
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "width"))
74
81
  );
@@ -81,6 +88,7 @@ namespace margelo::nitro {
81
88
  obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
82
89
  obj.setProperty(runtime, "lineCap", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::toJSI(runtime, arg.lineCap));
83
90
  obj.setProperty(runtime, "lineJoin", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::toJSI(runtime, arg.lineJoin));
91
+ obj.setProperty(runtime, "geodesic", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.geodesic));
84
92
  obj.setProperty(runtime, "color", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.color));
85
93
  obj.setProperty(runtime, "width", JSIConverter<std::optional<double>>::toJSI(runtime, arg.width));
86
94
  return obj;
@@ -90,12 +98,16 @@ namespace margelo::nitro {
90
98
  return false;
91
99
  }
92
100
  jsi::Object obj = value.getObject(runtime);
101
+ if (!nitro::isPlainObject(runtime, obj)) {
102
+ return false;
103
+ }
93
104
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
94
105
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
95
106
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
96
107
  if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
97
108
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::canConvert(runtime, obj.getProperty(runtime, "lineCap"))) return false;
98
109
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::canConvert(runtime, obj.getProperty(runtime, "lineJoin"))) return false;
110
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "geodesic"))) return false;
99
111
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "color"))) return false;
100
112
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
101
113
  return true;
@@ -17,6 +17,11 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
 
22
27
 
@@ -62,6 +67,9 @@ namespace margelo::nitro {
62
67
  return false;
63
68
  }
64
69
  jsi::Object obj = value.getObject(runtime);
70
+ if (!nitro::isPlainObject(runtime, obj)) {
71
+ return false;
72
+ }
65
73
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "x"))) return false;
66
74
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "y"))) return false;
67
75
  return true;
@@ -17,6 +17,11 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
  // Forward declaration of `RNLatLng` to properly resolve imports.
22
27
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
@@ -66,6 +71,9 @@ namespace margelo::nitro {
66
71
  return false;
67
72
  }
68
73
  jsi::Object obj = value.getObject(runtime);
74
+ if (!nitro::isPlainObject(runtime, obj)) {
75
+ return false;
76
+ }
69
77
  if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
70
78
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitudeDelta"))) return false;
71
79
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitudeDelta"))) return false;
@@ -17,6 +17,11 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
 
22
27
 
@@ -62,6 +67,9 @@ namespace margelo::nitro {
62
67
  return false;
63
68
  }
64
69
  jsi::Object obj = value.getObject(runtime);
70
+ if (!nitro::isPlainObject(runtime, obj)) {
71
+ return false;
72
+ }
65
73
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
66
74
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
67
75
  return true;
@@ -17,6 +17,11 @@
17
17
  #else
18
18
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
19
  #endif
20
+ #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
+ #include <NitroModules/JSIHelpers.hpp>
22
+ #else
23
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
+ #endif
20
25
 
21
26
  // Forward declaration of `RNSize` to properly resolve imports.
22
27
  namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
@@ -76,6 +81,9 @@ namespace margelo::nitro {
76
81
  return false;
77
82
  }
78
83
  jsi::Object obj = value.getObject(runtime);
84
+ if (!nitro::isPlainObject(runtime, obj)) {
85
+ return false;
86
+ }
79
87
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNSize>>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
80
88
  if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotFormat>::canConvert(runtime, obj.getProperty(runtime, "format"))) return false;
81
89
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "quality"))) return false;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.3.0",
3
+ "version": "1.4.1-dev.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",
7
7
  "types": "./lib/typescript/src/index.d.ts",
8
8
  "source": "src/index",
9
+ "react-native": "src/index",
9
10
  "scripts": {
10
11
  "typecheck": "tsc --noEmit",
11
12
  "lint": "yarn lint:js && yarn lint:android && yarn lint:ios",
@@ -84,7 +85,7 @@
84
85
  "@semantic-release/npm": "13.0.0-beta.1",
85
86
  "@types/jest": "30.0.0",
86
87
  "@types/react": "19.2.2",
87
- "clang-format-node": "2.0.1",
88
+ "clang-format-node": "2.0.2",
88
89
  "conventional-changelog-conventionalcommits": "9.1.0",
89
90
  "del-cli": "7.0.0",
90
91
  "eslint": "9.37.0",
@@ -93,12 +94,12 @@
93
94
  "eslint-plugin-prettier": "5.5.4",
94
95
  "jest": "30.2.0",
95
96
  "lefthook": "1.13.6",
96
- "nitrogen": "0.29.6",
97
+ "nitrogen": "0.30.0",
97
98
  "prettier": "3.6.2",
98
99
  "react": "19.2.0",
99
100
  "react-native": "0.82.0",
100
101
  "react-native-builder-bob": "0.40.13",
101
- "react-native-nitro-modules": "0.29.8",
102
+ "react-native-nitro-modules": "0.30.0",
102
103
  "semantic-release": "25.0.0-beta.6",
103
104
  "typescript": "5.9.3"
104
105
  },
@@ -148,22 +149,14 @@
148
149
  "source": "src",
149
150
  "output": "lib",
150
151
  "targets": [
152
+ "module",
151
153
  [
152
- "module",
154
+ "typescript",
153
155
  {
154
- "esm": true
156
+ "project": "tsconfig.json"
155
157
  }
156
- ],
157
- "typescript"
158
+ ]
158
159
  ]
159
160
  },
160
- "exports": {
161
- ".": {
162
- "source": "./src/index.tsx",
163
- "types": "./lib/typescript/src/index.d.ts",
164
- "default": "./lib/module/index.js"
165
- },
166
- "./package.json": "./package.json"
167
- },
168
161
  "packageManager": "yarn@3.6.1"
169
162
  }
@@ -0,0 +1,20 @@
1
+ import { getHostComponent, NitroModules } from 'react-native-nitro-modules';
2
+
3
+ import ViewConfig from '../nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json' with { type: 'json' };
4
+
5
+ import type {
6
+ RNGoogleMapsPlusViewMethods,
7
+ RNGoogleMapsPlusViewProps,
8
+ } from './RNGoogleMapsPlusView.nitro.js';
9
+
10
+ import type { RNGoogleMapsPlusModule } from './RNGoogleMapsPlusModule.nitro.js';
11
+
12
+ export const GoogleMapsView = getHostComponent<
13
+ RNGoogleMapsPlusViewProps,
14
+ RNGoogleMapsPlusViewMethods
15
+ >('RNGoogleMapsPlusView', () => ViewConfig);
16
+
17
+ export const GoogleMapsModule =
18
+ NitroModules.createHybridObject<RNGoogleMapsPlusModule>(
19
+ 'RNGoogleMapsPlusModule'
20
+ );
package/src/index.tsx CHANGED
@@ -1,24 +1,16 @@
1
- import { getHostComponent, NitroModules } from 'react-native-nitro-modules';
2
-
3
- import ViewConfig from '../nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json';
4
-
1
+ import { GoogleMapsView, GoogleMapsModule } from './GoogleMapsPlus';
5
2
  import type {
6
3
  RNGoogleMapsPlusViewMethods,
7
4
  RNGoogleMapsPlusViewProps,
8
5
  } from './RNGoogleMapsPlusView.nitro';
9
-
10
6
  import type { RNGoogleMapsPlusModule } from './RNGoogleMapsPlusModule.nitro';
11
7
 
12
8
  export * from './types';
13
9
 
14
- export type { RNGoogleMapsPlusViewMethods, RNGoogleMapsPlusViewProps };
15
-
16
- export const GoogleMapsView = getHostComponent<
10
+ export type {
11
+ RNGoogleMapsPlusViewMethods,
17
12
  RNGoogleMapsPlusViewProps,
18
- RNGoogleMapsPlusViewMethods
19
- >('RNGoogleMapsPlusView', () => ViewConfig);
13
+ RNGoogleMapsPlusModule,
14
+ };
20
15
 
21
- export const GoogleMapsModule =
22
- NitroModules.createHybridObject<RNGoogleMapsPlusModule>(
23
- 'RNGoogleMapsPlusModule'
24
- );
16
+ export { GoogleMapsView, GoogleMapsModule };
package/src/types.ts CHANGED
@@ -164,6 +164,8 @@ export type RNMarker = {
164
164
  opacity?: number;
165
165
  flat?: boolean;
166
166
  draggable?: boolean;
167
+ rotation?: number;
168
+ infoWindowAnchor?: RNPosition;
167
169
  iconSvg?: RNMarkerSvg;
168
170
  };
169
171
 
@@ -181,6 +183,12 @@ export type RNPolygon = {
181
183
  fillColor?: string;
182
184
  strokeColor?: string;
183
185
  strokeWidth?: number;
186
+ holes?: RNPolygonHole[];
187
+ geodesic?: boolean;
188
+ };
189
+
190
+ export type RNPolygonHole = {
191
+ coordinates: RNLatLng[];
184
192
  };
185
193
 
186
194
  export type RNPolyline = {
@@ -190,6 +198,7 @@ export type RNPolyline = {
190
198
  coordinates: RNLatLng[];
191
199
  lineCap?: RNLineCapType;
192
200
  lineJoin?: RNLineJoinType;
201
+ geodesic?: boolean;
193
202
  color?: string;
194
203
  width?: number;
195
204
  };
@@ -250,6 +259,7 @@ export type RNLocationConfig = {
250
259
  android?: RNAndroidLocationConfig;
251
260
  ios?: RNIOSLocationConfig;
252
261
  };
262
+
253
263
  export type RNAndroidLocationConfig = {
254
264
  priority?: RNAndroidLocationPriority;
255
265
  interval?: number;
@@ -293,7 +303,33 @@ export enum RNIOSPermissionResult {
293
303
 
294
304
  export type RNLocation = {
295
305
  center: RNLatLng;
306
+ altitude: number;
307
+ accuracy: number;
296
308
  bearing: number;
309
+ speed: number;
310
+ time: number;
311
+ android?: RNLocationAndroid;
312
+ ios?: RNLocationIOS;
313
+ };
314
+
315
+ export type RNLocationAndroid = {
316
+ provider?: string | null;
317
+ elapsedRealtimeNanos?: number;
318
+ bearingAccuracyDegrees?: number;
319
+ speedAccuracyMetersPerSecond?: number;
320
+ verticalAccuracyMeters?: number;
321
+ mslAltitudeMeters?: number;
322
+ mslAltitudeAccuracyMeters?: number;
323
+ isMock?: boolean;
324
+ };
325
+ export type RNLocationIOS = {
326
+ horizontalAccuracy?: number;
327
+ verticalAccuracy?: number;
328
+ speedAccuracy?: number;
329
+ courseAccuracy?: number;
330
+ floor?: number | null;
331
+ isFromMockProvider?: boolean;
332
+ timestamp?: number;
297
333
  };
298
334
 
299
335
  export enum RNLocationErrorCode {
@@ -1 +0,0 @@
1
- {"type":"module"}
@@ -1 +0,0 @@
1
- {"type":"module"}