react-native-google-maps-plus 1.3.0-dev.4 → 1.3.0-dev.6

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 (82) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +15 -23
  3. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +4 -3
  4. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +11 -7
  5. package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -10
  6. package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +6 -4
  7. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +8 -5
  8. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngExtension.kt +6 -0
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +1 -2
  10. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngExtension.kt +6 -0
  11. package/android/src/main/java/com/rngooglemapsplus/extensions/RNMarkerExtension.kt +8 -0
  12. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolygonExtension.kt +2 -0
  13. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolylineExtension.kt +1 -0
  14. package/ios/GoogleMapViewImpl.swift +18 -49
  15. package/ios/MapCircleBuilder.swift +2 -10
  16. package/ios/MapMarkerBuilder.swift +12 -10
  17. package/ios/MapPolygonBuilder.swift +17 -2
  18. package/ios/MapPolylineBuilder.swift +4 -2
  19. package/ios/RNGoogleMapsPlusView.swift +7 -5
  20. package/ios/extensions/CLLocationCoordinate2D+Extension.swift +7 -0
  21. package/ios/extensions/RNLatLng+Extension.swift +7 -0
  22. package/ios/extensions/RNMarker+Extension.swift +5 -0
  23. package/ios/extensions/RNPolygon+Extension.swift.swift +16 -1
  24. package/ios/extensions/RNPolyline+Extension.swift.swift +1 -0
  25. package/lib/module/types.js.map +1 -1
  26. package/lib/typescript/src/types.d.ts +8 -0
  27. package/lib/typescript/src/types.d.ts.map +1 -1
  28. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +4 -0
  29. package/nitrogen/generated/android/c++/JRNMarker.hpp +8 -0
  30. package/nitrogen/generated/android/c++/JRNPolygon.hpp +29 -2
  31. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +72 -0
  32. package/nitrogen/generated/android/c++/JRNPolyline.hpp +4 -0
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +6 -0
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +7 -1
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygonHole.kt +29 -0
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +3 -0
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +1 -1
  38. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +16 -16
  39. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +51 -20
  40. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
  41. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +6 -3
  42. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +7 -56
  43. package/nitrogen/generated/ios/swift/RNCamera.swift +1 -8
  44. package/nitrogen/generated/ios/swift/RNHeatmap.swift +1 -8
  45. package/nitrogen/generated/ios/swift/RNHeatmapGradient.swift +11 -15
  46. package/nitrogen/generated/ios/swift/RNInitialProps.swift +1 -8
  47. package/nitrogen/generated/ios/swift/RNLocationConfig.swift +2 -16
  48. package/nitrogen/generated/ios/swift/RNMarker.swift +47 -15
  49. package/nitrogen/generated/ios/swift/RNPolygon.swift +66 -1
  50. package/nitrogen/generated/ios/swift/RNPolygonHole.swift +47 -0
  51. package/nitrogen/generated/ios/swift/RNPolyline.swift +24 -1
  52. package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +1 -8
  53. package/nitrogen/generated/shared/c++/RNAndroidLocationConfig.hpp +8 -0
  54. package/nitrogen/generated/shared/c++/RNCamera.hpp +8 -0
  55. package/nitrogen/generated/shared/c++/RNCircle.hpp +8 -0
  56. package/nitrogen/generated/shared/c++/RNHeatmap.hpp +8 -0
  57. package/nitrogen/generated/shared/c++/RNHeatmapGradient.hpp +8 -0
  58. package/nitrogen/generated/shared/c++/RNHeatmapPoint.hpp +8 -0
  59. package/nitrogen/generated/shared/c++/RNIOSLocationConfig.hpp +8 -0
  60. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +8 -0
  61. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +8 -0
  62. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +8 -0
  63. package/nitrogen/generated/shared/c++/RNKMLayer.hpp +8 -0
  64. package/nitrogen/generated/shared/c++/RNLatLng.hpp +8 -0
  65. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +8 -0
  66. package/nitrogen/generated/shared/c++/RNLocation.hpp +8 -0
  67. package/nitrogen/generated/shared/c++/RNLocationConfig.hpp +8 -0
  68. package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +8 -0
  69. package/nitrogen/generated/shared/c++/RNMapPadding.hpp +8 -0
  70. package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +8 -0
  71. package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +8 -0
  72. package/nitrogen/generated/shared/c++/RNMarker.hpp +17 -1
  73. package/nitrogen/generated/shared/c++/RNMarkerSvg.hpp +8 -0
  74. package/nitrogen/generated/shared/c++/RNPolygon.hpp +21 -2
  75. package/nitrogen/generated/shared/c++/RNPolygonHole.hpp +77 -0
  76. package/nitrogen/generated/shared/c++/RNPolyline.hpp +13 -1
  77. package/nitrogen/generated/shared/c++/RNPosition.hpp +8 -0
  78. package/nitrogen/generated/shared/c++/RNRegion.hpp +8 -0
  79. package/nitrogen/generated/shared/c++/RNSize.hpp +8 -0
  80. package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +8 -0
  81. package/package.json +4 -4
  82. package/src/types.ts +9 -0
@@ -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
 
@@ -89,6 +94,9 @@ namespace margelo::nitro {
89
94
  return false;
90
95
  }
91
96
  jsi::Object obj = value.getObject(runtime);
97
+ if (!nitro::isPlainObject(runtime, obj)) {
98
+ return false;
99
+ }
92
100
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "allGesturesEnabled"))) return false;
93
101
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "compassEnabled"))) return false;
94
102
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "indoorLevelPickerEnabled"))) 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<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "min"))) return false;
66
74
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "max"))) 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; }
@@ -48,11 +53,13 @@ namespace margelo::nitro::rngooglemapsplus {
48
53
  std::optional<double> opacity SWIFT_PRIVATE;
49
54
  std::optional<bool> flat SWIFT_PRIVATE;
50
55
  std::optional<bool> draggable SWIFT_PRIVATE;
56
+ std::optional<double> rotation SWIFT_PRIVATE;
57
+ std::optional<RNPosition> infoWindowAnchor SWIFT_PRIVATE;
51
58
  std::optional<RNMarkerSvg> iconSvg SWIFT_PRIVATE;
52
59
 
53
60
  public:
54
61
  RNMarker() = default;
55
- explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<bool> showInfoWindow, std::optional<std::string> title, std::optional<std::string> snippet, std::optional<double> opacity, std::optional<bool> flat, std::optional<bool> draggable, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), showInfoWindow(showInfoWindow), title(title), snippet(snippet), opacity(opacity), flat(flat), draggable(draggable), iconSvg(iconSvg) {}
62
+ explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<bool> showInfoWindow, std::optional<std::string> title, std::optional<std::string> snippet, std::optional<double> opacity, std::optional<bool> flat, std::optional<bool> draggable, std::optional<double> rotation, std::optional<RNPosition> infoWindowAnchor, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), showInfoWindow(showInfoWindow), title(title), snippet(snippet), opacity(opacity), flat(flat), draggable(draggable), rotation(rotation), infoWindowAnchor(infoWindowAnchor), iconSvg(iconSvg) {}
56
63
  };
57
64
 
58
65
  } // namespace margelo::nitro::rngooglemapsplus
@@ -75,6 +82,8 @@ namespace margelo::nitro {
75
82
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "opacity")),
76
83
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "flat")),
77
84
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "draggable")),
85
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "rotation")),
86
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "infoWindowAnchor")),
78
87
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
79
88
  );
80
89
  }
@@ -90,6 +99,8 @@ namespace margelo::nitro {
90
99
  obj.setProperty(runtime, "opacity", JSIConverter<std::optional<double>>::toJSI(runtime, arg.opacity));
91
100
  obj.setProperty(runtime, "flat", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.flat));
92
101
  obj.setProperty(runtime, "draggable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.draggable));
102
+ obj.setProperty(runtime, "rotation", JSIConverter<std::optional<double>>::toJSI(runtime, arg.rotation));
103
+ obj.setProperty(runtime, "infoWindowAnchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.infoWindowAnchor));
93
104
  obj.setProperty(runtime, "iconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.iconSvg));
94
105
  return obj;
95
106
  }
@@ -98,6 +109,9 @@ namespace margelo::nitro {
98
109
  return false;
99
110
  }
100
111
  jsi::Object obj = value.getObject(runtime);
112
+ if (!nitro::isPlainObject(runtime, obj)) {
113
+ return false;
114
+ }
101
115
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
102
116
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
103
117
  if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
@@ -108,6 +122,8 @@ namespace margelo::nitro {
108
122
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "opacity"))) return false;
109
123
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "flat"))) return false;
110
124
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "draggable"))) return false;
125
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "rotation"))) return false;
126
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "infoWindowAnchor"))) return false;
111
127
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
112
128
  return true;
113
129
  }
@@ -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
 
@@ -65,6 +70,9 @@ namespace margelo::nitro {
65
70
  return false;
66
71
  }
67
72
  jsi::Object obj = value.getObject(runtime);
73
+ if (!nitro::isPlainObject(runtime, obj)) {
74
+ return false;
75
+ }
68
76
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
69
77
  if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
70
78
  if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "svgString"))) return false;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.3.0-dev.4",
3
+ "version": "1.3.0-dev.6",
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",
@@ -84,7 +84,7 @@
84
84
  "@semantic-release/npm": "13.0.0-beta.1",
85
85
  "@types/jest": "30.0.0",
86
86
  "@types/react": "19.2.2",
87
- "clang-format-node": "2.0.1",
87
+ "clang-format-node": "2.0.2",
88
88
  "conventional-changelog-conventionalcommits": "9.1.0",
89
89
  "del-cli": "7.0.0",
90
90
  "eslint": "9.37.0",
@@ -93,12 +93,12 @@
93
93
  "eslint-plugin-prettier": "5.5.4",
94
94
  "jest": "30.2.0",
95
95
  "lefthook": "1.13.6",
96
- "nitrogen": "0.29.6",
96
+ "nitrogen": "0.30.0",
97
97
  "prettier": "3.6.2",
98
98
  "react": "19.2.0",
99
99
  "react-native": "0.82.0",
100
100
  "react-native-builder-bob": "0.40.13",
101
- "react-native-nitro-modules": "0.29.8",
101
+ "react-native-nitro-modules": "0.30.0",
102
102
  "semantic-release": "25.0.0-beta.6",
103
103
  "typescript": "5.9.3"
104
104
  },
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
  };