react-native-google-maps-plus 1.3.0-dev.3 → 1.3.0-dev.5

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 (43) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +21 -26
  2. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +4 -3
  3. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +10 -6
  4. package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -10
  5. package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +6 -4
  6. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +17 -5
  7. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngExtension.kt +6 -0
  8. package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +1 -2
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngExtension.kt +6 -0
  10. package/ios/GoogleMapViewImpl.swift +42 -63
  11. package/ios/MapCircleBuilder.swift +2 -10
  12. package/ios/MapMarkerBuilder.swift +11 -9
  13. package/ios/MapPolygonBuilder.swift +17 -2
  14. package/ios/MapPolylineBuilder.swift +4 -2
  15. package/ios/RNGoogleMapsPlusView.swift +16 -11
  16. package/ios/extensions/CLLocationCoordinate2D+Extension.swift +7 -0
  17. package/ios/extensions/RNLatLng+Extension.swift +7 -0
  18. package/lib/module/types.js.map +1 -1
  19. package/lib/typescript/src/types.d.ts +8 -0
  20. package/lib/typescript/src/types.d.ts.map +1 -1
  21. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +4 -0
  22. package/nitrogen/generated/android/c++/JRNMarker.hpp +8 -0
  23. package/nitrogen/generated/android/c++/JRNPolygon.hpp +29 -2
  24. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +72 -0
  25. package/nitrogen/generated/android/c++/JRNPolyline.hpp +4 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +6 -0
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +7 -1
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygonHole.kt +29 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +3 -0
  30. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +29 -0
  31. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
  32. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +3 -0
  33. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +7 -0
  34. package/nitrogen/generated/ios/swift/RNMarker.swift +54 -1
  35. package/nitrogen/generated/ios/swift/RNPolygon.swift +66 -1
  36. package/nitrogen/generated/ios/swift/RNPolygonHole.swift +47 -0
  37. package/nitrogen/generated/ios/swift/RNPolyline.swift +24 -1
  38. package/nitrogen/generated/shared/c++/RNMarker.hpp +9 -1
  39. package/nitrogen/generated/shared/c++/RNPolygon.hpp +13 -2
  40. package/nitrogen/generated/shared/c++/RNPolygonHole.hpp +69 -0
  41. package/nitrogen/generated/shared/c++/RNPolyline.hpp +5 -1
  42. package/package.json +1 -1
  43. package/src/types.ts +9 -0
@@ -18,7 +18,7 @@ public extension RNMarker {
18
18
  /**
19
19
  * Create a new instance of `RNMarker`.
20
20
  */
21
- init(id: String, zIndex: Double?, coordinate: RNLatLng, anchor: RNPosition?, showInfoWindow: Bool?, title: String?, snippet: String?, opacity: Double?, flat: Bool?, draggable: Bool?, iconSvg: RNMarkerSvg?) {
21
+ init(id: String, zIndex: Double?, coordinate: RNLatLng, anchor: RNPosition?, showInfoWindow: Bool?, title: String?, snippet: String?, opacity: Double?, flat: Bool?, draggable: Bool?, rotation: Double?, infoWindowAnchor: RNPosition?, iconSvg: RNMarkerSvg?) {
22
22
  self.init(std.string(id), { () -> bridge.std__optional_double_ in
23
23
  if let __unwrappedValue = zIndex {
24
24
  return bridge.create_std__optional_double_(__unwrappedValue)
@@ -67,6 +67,18 @@ public extension RNMarker {
67
67
  } else {
68
68
  return .init()
69
69
  }
70
+ }(), { () -> bridge.std__optional_double_ in
71
+ if let __unwrappedValue = rotation {
72
+ return bridge.create_std__optional_double_(__unwrappedValue)
73
+ } else {
74
+ return .init()
75
+ }
76
+ }(), { () -> bridge.std__optional_RNPosition_ in
77
+ if let __unwrappedValue = infoWindowAnchor {
78
+ return bridge.create_std__optional_RNPosition_(__unwrappedValue)
79
+ } else {
80
+ return .init()
81
+ }
70
82
  }(), { () -> bridge.std__optional_RNMarkerSvg_ in
71
83
  if let __unwrappedValue = iconSvg {
72
84
  return bridge.create_std__optional_RNMarkerSvg_(__unwrappedValue)
@@ -255,6 +267,47 @@ public extension RNMarker {
255
267
  }
256
268
  }
257
269
 
270
+ var rotation: Double? {
271
+ @inline(__always)
272
+ get {
273
+ return self.__rotation.value
274
+ }
275
+ @inline(__always)
276
+ set {
277
+ self.__rotation = { () -> bridge.std__optional_double_ in
278
+ if let __unwrappedValue = newValue {
279
+ return bridge.create_std__optional_double_(__unwrappedValue)
280
+ } else {
281
+ return .init()
282
+ }
283
+ }()
284
+ }
285
+ }
286
+
287
+ var infoWindowAnchor: RNPosition? {
288
+ @inline(__always)
289
+ get {
290
+ return { () -> RNPosition? in
291
+ if bridge.has_value_std__optional_RNPosition_(self.__infoWindowAnchor) {
292
+ let __unwrapped = bridge.get_std__optional_RNPosition_(self.__infoWindowAnchor)
293
+ return __unwrapped
294
+ } else {
295
+ return nil
296
+ }
297
+ }()
298
+ }
299
+ @inline(__always)
300
+ set {
301
+ self.__infoWindowAnchor = { () -> bridge.std__optional_RNPosition_ in
302
+ if let __unwrappedValue = newValue {
303
+ return bridge.create_std__optional_RNPosition_(__unwrappedValue)
304
+ } else {
305
+ return .init()
306
+ }
307
+ }()
308
+ }
309
+ }
310
+
258
311
  var iconSvg: RNMarkerSvg? {
259
312
  @inline(__always)
260
313
  get {
@@ -18,7 +18,7 @@ public extension RNPolygon {
18
18
  /**
19
19
  * Create a new instance of `RNPolygon`.
20
20
  */
21
- init(id: String, zIndex: Double?, pressable: Bool?, coordinates: [RNLatLng], fillColor: String?, strokeColor: String?, strokeWidth: Double?) {
21
+ init(id: String, zIndex: Double?, pressable: Bool?, coordinates: [RNLatLng], fillColor: String?, strokeColor: String?, strokeWidth: Double?, holes: [RNPolygonHole]?, geodesic: Bool?) {
22
22
  self.init(std.string(id), { () -> bridge.std__optional_double_ in
23
23
  if let __unwrappedValue = zIndex {
24
24
  return bridge.create_std__optional_double_(__unwrappedValue)
@@ -55,6 +55,24 @@ public extension RNPolygon {
55
55
  } else {
56
56
  return .init()
57
57
  }
58
+ }(), { () -> bridge.std__optional_std__vector_RNPolygonHole__ in
59
+ if let __unwrappedValue = holes {
60
+ return bridge.create_std__optional_std__vector_RNPolygonHole__({ () -> bridge.std__vector_RNPolygonHole_ in
61
+ var __vector = bridge.create_std__vector_RNPolygonHole_(__unwrappedValue.count)
62
+ for __item in __unwrappedValue {
63
+ __vector.push_back(__item)
64
+ }
65
+ return __vector
66
+ }())
67
+ } else {
68
+ return .init()
69
+ }
70
+ }(), { () -> bridge.std__optional_bool_ in
71
+ if let __unwrappedValue = geodesic {
72
+ return bridge.create_std__optional_bool_(__unwrappedValue)
73
+ } else {
74
+ return .init()
75
+ }
58
76
  }())
59
77
  }
60
78
 
@@ -184,4 +202,51 @@ public extension RNPolygon {
184
202
  }()
185
203
  }
186
204
  }
205
+
206
+ var holes: [RNPolygonHole]? {
207
+ @inline(__always)
208
+ get {
209
+ return { () -> [RNPolygonHole]? in
210
+ if bridge.has_value_std__optional_std__vector_RNPolygonHole__(self.__holes) {
211
+ let __unwrapped = bridge.get_std__optional_std__vector_RNPolygonHole__(self.__holes)
212
+ return __unwrapped.map({ __item in __item })
213
+ } else {
214
+ return nil
215
+ }
216
+ }()
217
+ }
218
+ @inline(__always)
219
+ set {
220
+ self.__holes = { () -> bridge.std__optional_std__vector_RNPolygonHole__ in
221
+ if let __unwrappedValue = newValue {
222
+ return bridge.create_std__optional_std__vector_RNPolygonHole__({ () -> bridge.std__vector_RNPolygonHole_ in
223
+ var __vector = bridge.create_std__vector_RNPolygonHole_(__unwrappedValue.count)
224
+ for __item in __unwrappedValue {
225
+ __vector.push_back(__item)
226
+ }
227
+ return __vector
228
+ }())
229
+ } else {
230
+ return .init()
231
+ }
232
+ }()
233
+ }
234
+ }
235
+
236
+ var geodesic: Bool? {
237
+ @inline(__always)
238
+ get {
239
+ return self.__geodesic.value
240
+ }
241
+ @inline(__always)
242
+ set {
243
+ self.__geodesic = { () -> bridge.std__optional_bool_ in
244
+ if let __unwrappedValue = newValue {
245
+ return bridge.create_std__optional_bool_(__unwrappedValue)
246
+ } else {
247
+ return .init()
248
+ }
249
+ }()
250
+ }
251
+ }
187
252
  }
@@ -0,0 +1,47 @@
1
+ ///
2
+ /// RNPolygonHole.swift
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
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `RNPolygonHole`, backed by a C++ struct.
12
+ */
13
+ public typealias RNPolygonHole = margelo.nitro.rngooglemapsplus.RNPolygonHole
14
+
15
+ public extension RNPolygonHole {
16
+ private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `RNPolygonHole`.
20
+ */
21
+ init(coordinates: [RNLatLng]) {
22
+ self.init({ () -> bridge.std__vector_RNLatLng_ in
23
+ var __vector = bridge.create_std__vector_RNLatLng_(coordinates.count)
24
+ for __item in coordinates {
25
+ __vector.push_back(__item)
26
+ }
27
+ return __vector
28
+ }())
29
+ }
30
+
31
+ var coordinates: [RNLatLng] {
32
+ @inline(__always)
33
+ get {
34
+ return self.__coordinates.map({ __item in __item })
35
+ }
36
+ @inline(__always)
37
+ set {
38
+ self.__coordinates = { () -> bridge.std__vector_RNLatLng_ in
39
+ var __vector = bridge.create_std__vector_RNLatLng_(newValue.count)
40
+ for __item in newValue {
41
+ __vector.push_back(__item)
42
+ }
43
+ return __vector
44
+ }()
45
+ }
46
+ }
47
+ }
@@ -18,7 +18,7 @@ public extension RNPolyline {
18
18
  /**
19
19
  * Create a new instance of `RNPolyline`.
20
20
  */
21
- init(id: String, zIndex: Double?, pressable: Bool?, coordinates: [RNLatLng], lineCap: RNLineCapType?, lineJoin: RNLineJoinType?, color: String?, width: Double?) {
21
+ init(id: String, zIndex: Double?, pressable: Bool?, coordinates: [RNLatLng], lineCap: RNLineCapType?, lineJoin: RNLineJoinType?, geodesic: Bool?, color: String?, width: Double?) {
22
22
  self.init(std.string(id), { () -> bridge.std__optional_double_ in
23
23
  if let __unwrappedValue = zIndex {
24
24
  return bridge.create_std__optional_double_(__unwrappedValue)
@@ -49,6 +49,12 @@ public extension RNPolyline {
49
49
  } else {
50
50
  return .init()
51
51
  }
52
+ }(), { () -> bridge.std__optional_bool_ in
53
+ if let __unwrappedValue = geodesic {
54
+ return bridge.create_std__optional_bool_(__unwrappedValue)
55
+ } else {
56
+ return .init()
57
+ }
52
58
  }(), { () -> bridge.std__optional_std__string_ in
53
59
  if let __unwrappedValue = color {
54
60
  return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
@@ -160,6 +166,23 @@ public extension RNPolyline {
160
166
  }
161
167
  }
162
168
 
169
+ var geodesic: Bool? {
170
+ @inline(__always)
171
+ get {
172
+ return self.__geodesic.value
173
+ }
174
+ @inline(__always)
175
+ set {
176
+ self.__geodesic = { () -> bridge.std__optional_bool_ in
177
+ if let __unwrappedValue = newValue {
178
+ return bridge.create_std__optional_bool_(__unwrappedValue)
179
+ } else {
180
+ return .init()
181
+ }
182
+ }()
183
+ }
184
+ }
185
+
163
186
  var color: String? {
164
187
  @inline(__always)
165
188
  get {
@@ -48,11 +48,13 @@ namespace margelo::nitro::rngooglemapsplus {
48
48
  std::optional<double> opacity SWIFT_PRIVATE;
49
49
  std::optional<bool> flat SWIFT_PRIVATE;
50
50
  std::optional<bool> draggable SWIFT_PRIVATE;
51
+ std::optional<double> rotation SWIFT_PRIVATE;
52
+ std::optional<RNPosition> infoWindowAnchor SWIFT_PRIVATE;
51
53
  std::optional<RNMarkerSvg> iconSvg SWIFT_PRIVATE;
52
54
 
53
55
  public:
54
56
  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) {}
57
+ 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
58
  };
57
59
 
58
60
  } // namespace margelo::nitro::rngooglemapsplus
@@ -75,6 +77,8 @@ namespace margelo::nitro {
75
77
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "opacity")),
76
78
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "flat")),
77
79
  JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "draggable")),
80
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "rotation")),
81
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "infoWindowAnchor")),
78
82
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
79
83
  );
80
84
  }
@@ -90,6 +94,8 @@ namespace margelo::nitro {
90
94
  obj.setProperty(runtime, "opacity", JSIConverter<std::optional<double>>::toJSI(runtime, arg.opacity));
91
95
  obj.setProperty(runtime, "flat", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.flat));
92
96
  obj.setProperty(runtime, "draggable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.draggable));
97
+ obj.setProperty(runtime, "rotation", JSIConverter<std::optional<double>>::toJSI(runtime, arg.rotation));
98
+ obj.setProperty(runtime, "infoWindowAnchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.infoWindowAnchor));
93
99
  obj.setProperty(runtime, "iconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.iconSvg));
94
100
  return obj;
95
101
  }
@@ -108,6 +114,8 @@ namespace margelo::nitro {
108
114
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "opacity"))) return false;
109
115
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "flat"))) return false;
110
116
  if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "draggable"))) return false;
117
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "rotation"))) return false;
118
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "infoWindowAnchor"))) return false;
111
119
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
112
120
  return true;
113
121
  }
@@ -20,11 +20,14 @@
20
20
 
21
21
  // Forward declaration of `RNLatLng` to properly resolve imports.
22
22
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+ // Forward declaration of `RNPolygonHole` to properly resolve imports.
24
+ namespace margelo::nitro::rngooglemapsplus { struct RNPolygonHole; }
23
25
 
24
26
  #include <string>
25
27
  #include <optional>
26
28
  #include "RNLatLng.hpp"
27
29
  #include <vector>
30
+ #include "RNPolygonHole.hpp"
28
31
 
29
32
  namespace margelo::nitro::rngooglemapsplus {
30
33
 
@@ -40,10 +43,12 @@ namespace margelo::nitro::rngooglemapsplus {
40
43
  std::optional<std::string> fillColor SWIFT_PRIVATE;
41
44
  std::optional<std::string> strokeColor SWIFT_PRIVATE;
42
45
  std::optional<double> strokeWidth SWIFT_PRIVATE;
46
+ std::optional<std::vector<RNPolygonHole>> holes SWIFT_PRIVATE;
47
+ std::optional<bool> geodesic SWIFT_PRIVATE;
43
48
 
44
49
  public:
45
50
  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) {}
51
+ 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
52
  };
48
53
 
49
54
  } // namespace margelo::nitro::rngooglemapsplus
@@ -62,7 +67,9 @@ namespace margelo::nitro {
62
67
  JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
63
68
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor")),
64
69
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
65
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth"))
70
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth")),
71
+ JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::fromJSI(runtime, obj.getProperty(runtime, "holes")),
72
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "geodesic"))
66
73
  );
67
74
  }
68
75
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolygon& arg) {
@@ -74,6 +81,8 @@ namespace margelo::nitro {
74
81
  obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
75
82
  obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
76
83
  obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
84
+ obj.setProperty(runtime, "holes", JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::toJSI(runtime, arg.holes));
85
+ obj.setProperty(runtime, "geodesic", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.geodesic));
77
86
  return obj;
78
87
  }
79
88
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -88,6 +97,8 @@ namespace margelo::nitro {
88
97
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
89
98
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
90
99
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
100
+ if (!JSIConverter<std::optional<std::vector<margelo::nitro::rngooglemapsplus::RNPolygonHole>>>::canConvert(runtime, obj.getProperty(runtime, "holes"))) return false;
101
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "geodesic"))) return false;
91
102
  return true;
92
103
  }
93
104
  };
@@ -0,0 +1,69 @@
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
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+
24
+ #include "RNLatLng.hpp"
25
+ #include <vector>
26
+
27
+ namespace margelo::nitro::rngooglemapsplus {
28
+
29
+ /**
30
+ * A struct which can be represented as a JavaScript object (RNPolygonHole).
31
+ */
32
+ struct RNPolygonHole {
33
+ public:
34
+ std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
35
+
36
+ public:
37
+ RNPolygonHole() = default;
38
+ explicit RNPolygonHole(std::vector<RNLatLng> coordinates): coordinates(coordinates) {}
39
+ };
40
+
41
+ } // namespace margelo::nitro::rngooglemapsplus
42
+
43
+ namespace margelo::nitro {
44
+
45
+ // C++ RNPolygonHole <> JS RNPolygonHole (object)
46
+ template <>
47
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNPolygonHole> final {
48
+ static inline margelo::nitro::rngooglemapsplus::RNPolygonHole fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
49
+ jsi::Object obj = arg.asObject(runtime);
50
+ return margelo::nitro::rngooglemapsplus::RNPolygonHole(
51
+ JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates"))
52
+ );
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNPolygonHole& arg) {
55
+ jsi::Object obj(runtime);
56
+ obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
57
+ return obj;
58
+ }
59
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
60
+ if (!value.isObject()) {
61
+ return false;
62
+ }
63
+ jsi::Object obj = value.getObject(runtime);
64
+ if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
65
+ return true;
66
+ }
67
+ };
68
+
69
+ } // namespace margelo::nitro
@@ -45,12 +45,13 @@ namespace margelo::nitro::rngooglemapsplus {
45
45
  std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
46
46
  std::optional<RNLineCapType> lineCap SWIFT_PRIVATE;
47
47
  std::optional<RNLineJoinType> lineJoin SWIFT_PRIVATE;
48
+ std::optional<bool> geodesic SWIFT_PRIVATE;
48
49
  std::optional<std::string> color SWIFT_PRIVATE;
49
50
  std::optional<double> width SWIFT_PRIVATE;
50
51
 
51
52
  public:
52
53
  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) {}
54
+ 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
55
  };
55
56
 
56
57
  } // namespace margelo::nitro::rngooglemapsplus
@@ -69,6 +70,7 @@ namespace margelo::nitro {
69
70
  JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
70
71
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::fromJSI(runtime, obj.getProperty(runtime, "lineCap")),
71
72
  JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::fromJSI(runtime, obj.getProperty(runtime, "lineJoin")),
73
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "geodesic")),
72
74
  JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "color")),
73
75
  JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "width"))
74
76
  );
@@ -81,6 +83,7 @@ namespace margelo::nitro {
81
83
  obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.coordinates));
82
84
  obj.setProperty(runtime, "lineCap", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::toJSI(runtime, arg.lineCap));
83
85
  obj.setProperty(runtime, "lineJoin", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::toJSI(runtime, arg.lineJoin));
86
+ obj.setProperty(runtime, "geodesic", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.geodesic));
84
87
  obj.setProperty(runtime, "color", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.color));
85
88
  obj.setProperty(runtime, "width", JSIConverter<std::optional<double>>::toJSI(runtime, arg.width));
86
89
  return obj;
@@ -96,6 +99,7 @@ namespace margelo::nitro {
96
99
  if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
97
100
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineCapType>>::canConvert(runtime, obj.getProperty(runtime, "lineCap"))) return false;
98
101
  if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLineJoinType>>::canConvert(runtime, obj.getProperty(runtime, "lineJoin"))) return false;
102
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "geodesic"))) return false;
99
103
  if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "color"))) return false;
100
104
  if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
101
105
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.3.0-dev.3",
3
+ "version": "1.3.0-dev.5",
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",
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
  };