react-native-google-maps-plus 1.8.0 → 1.8.2

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 (40) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +1 -1
  2. package/android/src/main/java/com/rngooglemapsplus/extensions/{RNCameraExtension.kt → RNCameraUpdateExtension.kt} +2 -2
  3. package/ios/GoogleMapViewImpl.swift +4 -1
  4. package/ios/LocationHandler.swift +3 -1
  5. package/ios/MapHelper.swift +3 -5
  6. package/ios/MapMarkerBuilder.swift +98 -98
  7. package/ios/RNGoogleMapsPlusView.swift +25 -22
  8. package/ios/extensions/{RNCamera+Extension.swift → RNCameraUpdate+Extension.swift} +1 -1
  9. package/ios/extensions/SVGKImage+Extension.swift +22 -0
  10. package/lib/module/types.js.map +1 -1
  11. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +2 -2
  12. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  13. package/lib/typescript/src/types.d.ts +7 -1
  14. package/lib/typescript/src/types.d.ts.map +1 -1
  15. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera.hpp +0 -1
  16. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +0 -1
  17. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +11 -7
  18. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +1 -1
  19. package/nitrogen/generated/android/c++/JRNCamera.hpp +15 -16
  20. package/nitrogen/generated/android/c++/JRNCameraUpdate.hpp +71 -0
  21. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +6 -6
  22. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -1
  23. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +5 -5
  24. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCameraUpdate.kt +46 -0
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +2 -2
  26. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +10 -7
  27. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
  28. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +7 -4
  29. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -1
  30. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +1 -1
  31. package/nitrogen/generated/ios/swift/RNCamera.swift +14 -62
  32. package/nitrogen/generated/ios/swift/RNCameraUpdate.swift +116 -0
  33. package/nitrogen/generated/ios/swift/RNInitialProps.swift +6 -6
  34. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +4 -1
  35. package/nitrogen/generated/shared/c++/RNCamera.hpp +17 -18
  36. package/nitrogen/generated/shared/c++/RNCameraUpdate.hpp +89 -0
  37. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +8 -8
  38. package/package.json +1 -1
  39. package/src/RNGoogleMapsPlusView.nitro.ts +6 -1
  40. package/src/types.ts +8 -1
@@ -12,7 +12,6 @@
12
12
 
13
13
  #include "JRNLatLng.hpp"
14
14
  #include "RNLatLng.hpp"
15
- #include <optional>
16
15
 
17
16
  namespace margelo::nitro::rngooglemapsplus {
18
17
 
@@ -35,17 +34,17 @@ namespace margelo::nitro::rngooglemapsplus {
35
34
  static const auto clazz = javaClassStatic();
36
35
  static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
37
36
  jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
38
- static const auto fieldZoom = clazz->getField<jni::JDouble>("zoom");
39
- jni::local_ref<jni::JDouble> zoom = this->getFieldValue(fieldZoom);
40
- static const auto fieldBearing = clazz->getField<jni::JDouble>("bearing");
41
- jni::local_ref<jni::JDouble> bearing = this->getFieldValue(fieldBearing);
42
- static const auto fieldTilt = clazz->getField<jni::JDouble>("tilt");
43
- jni::local_ref<jni::JDouble> tilt = this->getFieldValue(fieldTilt);
37
+ static const auto fieldZoom = clazz->getField<double>("zoom");
38
+ double zoom = this->getFieldValue(fieldZoom);
39
+ static const auto fieldBearing = clazz->getField<double>("bearing");
40
+ double bearing = this->getFieldValue(fieldBearing);
41
+ static const auto fieldTilt = clazz->getField<double>("tilt");
42
+ double tilt = this->getFieldValue(fieldTilt);
44
43
  return RNCamera(
45
- center != nullptr ? std::make_optional(center->toCpp()) : std::nullopt,
46
- zoom != nullptr ? std::make_optional(zoom->value()) : std::nullopt,
47
- bearing != nullptr ? std::make_optional(bearing->value()) : std::nullopt,
48
- tilt != nullptr ? std::make_optional(tilt->value()) : std::nullopt
44
+ center->toCpp(),
45
+ zoom,
46
+ bearing,
47
+ tilt
49
48
  );
50
49
  }
51
50
 
@@ -55,15 +54,15 @@ namespace margelo::nitro::rngooglemapsplus {
55
54
  */
56
55
  [[maybe_unused]]
57
56
  static jni::local_ref<JRNCamera::javaobject> fromCpp(const RNCamera& value) {
58
- using JSignature = JRNCamera(jni::alias_ref<JRNLatLng>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>);
57
+ using JSignature = JRNCamera(jni::alias_ref<JRNLatLng>, double, double, double);
59
58
  static const auto clazz = javaClassStatic();
60
59
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
61
60
  return create(
62
61
  clazz,
63
- value.center.has_value() ? JRNLatLng::fromCpp(value.center.value()) : nullptr,
64
- value.zoom.has_value() ? jni::JDouble::valueOf(value.zoom.value()) : nullptr,
65
- value.bearing.has_value() ? jni::JDouble::valueOf(value.bearing.value()) : nullptr,
66
- value.tilt.has_value() ? jni::JDouble::valueOf(value.tilt.value()) : nullptr
62
+ JRNLatLng::fromCpp(value.center),
63
+ value.zoom,
64
+ value.bearing,
65
+ value.tilt
67
66
  );
68
67
  }
69
68
  };
@@ -0,0 +1,71 @@
1
+ ///
2
+ /// JRNCameraUpdate.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <fbjni/fbjni.h>
11
+ #include "RNCameraUpdate.hpp"
12
+
13
+ #include "JRNLatLng.hpp"
14
+ #include "RNLatLng.hpp"
15
+ #include <optional>
16
+
17
+ namespace margelo::nitro::rngooglemapsplus {
18
+
19
+ using namespace facebook;
20
+
21
+ /**
22
+ * The C++ JNI bridge between the C++ struct "RNCameraUpdate" and the the Kotlin data class "RNCameraUpdate".
23
+ */
24
+ struct JRNCameraUpdate final: public jni::JavaClass<JRNCameraUpdate> {
25
+ public:
26
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNCameraUpdate;";
27
+
28
+ public:
29
+ /**
30
+ * Convert this Java/Kotlin-based struct to the C++ struct RNCameraUpdate by copying all values to C++.
31
+ */
32
+ [[maybe_unused]]
33
+ [[nodiscard]]
34
+ RNCameraUpdate toCpp() const {
35
+ static const auto clazz = javaClassStatic();
36
+ static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
37
+ jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
38
+ static const auto fieldZoom = clazz->getField<jni::JDouble>("zoom");
39
+ jni::local_ref<jni::JDouble> zoom = this->getFieldValue(fieldZoom);
40
+ static const auto fieldBearing = clazz->getField<jni::JDouble>("bearing");
41
+ jni::local_ref<jni::JDouble> bearing = this->getFieldValue(fieldBearing);
42
+ static const auto fieldTilt = clazz->getField<jni::JDouble>("tilt");
43
+ jni::local_ref<jni::JDouble> tilt = this->getFieldValue(fieldTilt);
44
+ return RNCameraUpdate(
45
+ center != nullptr ? std::make_optional(center->toCpp()) : std::nullopt,
46
+ zoom != nullptr ? std::make_optional(zoom->value()) : std::nullopt,
47
+ bearing != nullptr ? std::make_optional(bearing->value()) : std::nullopt,
48
+ tilt != nullptr ? std::make_optional(tilt->value()) : std::nullopt
49
+ );
50
+ }
51
+
52
+ public:
53
+ /**
54
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
55
+ */
56
+ [[maybe_unused]]
57
+ static jni::local_ref<JRNCameraUpdate::javaobject> fromCpp(const RNCameraUpdate& value) {
58
+ using JSignature = JRNCameraUpdate(jni::alias_ref<JRNLatLng>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>);
59
+ static const auto clazz = javaClassStatic();
60
+ static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
61
+ return create(
62
+ clazz,
63
+ value.center.has_value() ? JRNLatLng::fromCpp(value.center.value()) : nullptr,
64
+ value.zoom.has_value() ? jni::JDouble::valueOf(value.zoom.value()) : nullptr,
65
+ value.bearing.has_value() ? jni::JDouble::valueOf(value.bearing.value()) : nullptr,
66
+ value.tilt.has_value() ? jni::JDouble::valueOf(value.tilt.value()) : nullptr
67
+ );
68
+ }
69
+ };
70
+
71
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -10,9 +10,9 @@
10
10
  #include <fbjni/fbjni.h>
11
11
  #include "RNInitialProps.hpp"
12
12
 
13
- #include "JRNCamera.hpp"
13
+ #include "JRNCameraUpdate.hpp"
14
14
  #include "JRNLatLng.hpp"
15
- #include "RNCamera.hpp"
15
+ #include "RNCameraUpdate.hpp"
16
16
  #include "RNLatLng.hpp"
17
17
  #include <optional>
18
18
  #include <string>
@@ -40,8 +40,8 @@ namespace margelo::nitro::rngooglemapsplus {
40
40
  jni::local_ref<jni::JString> mapId = this->getFieldValue(fieldMapId);
41
41
  static const auto fieldLiteMode = clazz->getField<jni::JBoolean>("liteMode");
42
42
  jni::local_ref<jni::JBoolean> liteMode = this->getFieldValue(fieldLiteMode);
43
- static const auto fieldCamera = clazz->getField<JRNCamera>("camera");
44
- jni::local_ref<JRNCamera> camera = this->getFieldValue(fieldCamera);
43
+ static const auto fieldCamera = clazz->getField<JRNCameraUpdate>("camera");
44
+ jni::local_ref<JRNCameraUpdate> camera = this->getFieldValue(fieldCamera);
45
45
  static const auto fieldBackgroundColor = clazz->getField<jni::JString>("backgroundColor");
46
46
  jni::local_ref<jni::JString> backgroundColor = this->getFieldValue(fieldBackgroundColor);
47
47
  return RNInitialProps(
@@ -58,14 +58,14 @@ namespace margelo::nitro::rngooglemapsplus {
58
58
  */
59
59
  [[maybe_unused]]
60
60
  static jni::local_ref<JRNInitialProps::javaobject> fromCpp(const RNInitialProps& value) {
61
- using JSignature = JRNInitialProps(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JRNCamera>, jni::alias_ref<jni::JString>);
61
+ using JSignature = JRNInitialProps(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JRNCameraUpdate>, jni::alias_ref<jni::JString>);
62
62
  static const auto clazz = javaClassStatic();
63
63
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
64
64
  return create(
65
65
  clazz,
66
66
  value.mapId.has_value() ? jni::make_jstring(value.mapId.value()) : nullptr,
67
67
  value.liteMode.has_value() ? jni::JBoolean::valueOf(value.liteMode.value()) : nullptr,
68
- value.camera.has_value() ? JRNCamera::fromCpp(value.camera.value()) : nullptr,
68
+ value.camera.has_value() ? JRNCameraUpdate::fromCpp(value.camera.value()) : nullptr,
69
69
  value.backgroundColor.has_value() ? jni::make_jstring(value.backgroundColor.value()) : nullptr
70
70
  );
71
71
  }
@@ -513,7 +513,7 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
513
513
 
514
514
  @DoNotStrip
515
515
  @Keep
516
- abstract fun setCamera(camera: RNCamera, animated: Boolean?, durationMs: Double?): Unit
516
+ abstract fun setCamera(camera: RNCameraUpdate, animated: Boolean?, durationMs: Double?): Unit
517
517
 
518
518
  @DoNotStrip
519
519
  @Keep
@@ -20,16 +20,16 @@ import com.margelo.nitro.core.*
20
20
  data class RNCamera(
21
21
  @DoNotStrip
22
22
  @Keep
23
- val center: RNLatLng?,
23
+ val center: RNLatLng,
24
24
  @DoNotStrip
25
25
  @Keep
26
- val zoom: Double?,
26
+ val zoom: Double,
27
27
  @DoNotStrip
28
28
  @Keep
29
- val bearing: Double?,
29
+ val bearing: Double,
30
30
  @DoNotStrip
31
31
  @Keep
32
- val tilt: Double?
32
+ val tilt: Double
33
33
  ) {
34
34
  private companion object {
35
35
  /**
@@ -39,7 +39,7 @@ data class RNCamera(
39
39
  @Keep
40
40
  @Suppress("unused")
41
41
  @JvmStatic
42
- private fun fromCpp(center: RNLatLng?, zoom: Double?, bearing: Double?, tilt: Double?): RNCamera {
42
+ private fun fromCpp(center: RNLatLng, zoom: Double, bearing: Double, tilt: Double): RNCamera {
43
43
  return RNCamera(center, zoom, bearing, tilt)
44
44
  }
45
45
  }
@@ -0,0 +1,46 @@
1
+ ///
2
+ /// RNCameraUpdate.kt
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
+ package com.rngooglemapsplus
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.proguard.annotations.DoNotStrip
12
+ import com.margelo.nitro.core.*
13
+
14
+
15
+ /**
16
+ * Represents the JavaScript object/struct "RNCameraUpdate".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class RNCameraUpdate(
21
+ @DoNotStrip
22
+ @Keep
23
+ val center: RNLatLng?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val zoom: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val bearing: Double?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val tilt: Double?
33
+ ) {
34
+ private companion object {
35
+ /**
36
+ * Constructor called from C++
37
+ */
38
+ @DoNotStrip
39
+ @Keep
40
+ @Suppress("unused")
41
+ @JvmStatic
42
+ private fun fromCpp(center: RNLatLng?, zoom: Double?, bearing: Double?, tilt: Double?): RNCameraUpdate {
43
+ return RNCameraUpdate(center, zoom, bearing, tilt)
44
+ }
45
+ }
46
+ }
@@ -26,7 +26,7 @@ data class RNInitialProps(
26
26
  val liteMode: Boolean?,
27
27
  @DoNotStrip
28
28
  @Keep
29
- val camera: RNCamera?,
29
+ val camera: RNCameraUpdate?,
30
30
  @DoNotStrip
31
31
  @Keep
32
32
  val backgroundColor: String?
@@ -39,7 +39,7 @@ data class RNInitialProps(
39
39
  @Keep
40
40
  @Suppress("unused")
41
41
  @JvmStatic
42
- private fun fromCpp(mapId: String?, liteMode: Boolean?, camera: RNCamera?, backgroundColor: String?): RNInitialProps {
42
+ private fun fromCpp(mapId: String?, liteMode: Boolean?, camera: RNCameraUpdate?, backgroundColor: String?): RNInitialProps {
43
43
  return RNInitialProps(mapId, liteMode, camera, backgroundColor)
44
44
  }
45
45
  }
@@ -18,6 +18,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNAndroidLocationConfig; }
18
18
  namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPermissionResult; }
19
19
  // Forward declaration of `RNAndroidLocationPriority` to properly resolve imports.
20
20
  namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPriority; }
21
+ // Forward declaration of `RNCameraUpdate` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNCameraUpdate; }
21
23
  // Forward declaration of `RNCamera` to properly resolve imports.
22
24
  namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
23
25
  // Forward declaration of `RNCircle` to properly resolve imports.
@@ -106,6 +108,7 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
106
108
  #include "RNAndroidLocationPermissionResult.hpp"
107
109
  #include "RNAndroidLocationPriority.hpp"
108
110
  #include "RNCamera.hpp"
111
+ #include "RNCameraUpdate.hpp"
109
112
  #include "RNCircle.hpp"
110
113
  #include "RNHeatmap.hpp"
111
114
  #include "RNHeatmapGradient.hpp"
@@ -344,18 +347,18 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
344
347
  return *optional;
345
348
  }
346
349
 
347
- // pragma MARK: std::optional<RNCamera>
350
+ // pragma MARK: std::optional<RNCameraUpdate>
348
351
  /**
349
- * Specialized version of `std::optional<RNCamera>`.
352
+ * Specialized version of `std::optional<RNCameraUpdate>`.
350
353
  */
351
- using std__optional_RNCamera_ = std::optional<RNCamera>;
352
- inline std::optional<RNCamera> create_std__optional_RNCamera_(const RNCamera& value) noexcept {
353
- return std::optional<RNCamera>(value);
354
+ using std__optional_RNCameraUpdate_ = std::optional<RNCameraUpdate>;
355
+ inline std::optional<RNCameraUpdate> create_std__optional_RNCameraUpdate_(const RNCameraUpdate& value) noexcept {
356
+ return std::optional<RNCameraUpdate>(value);
354
357
  }
355
- inline bool has_value_std__optional_RNCamera_(const std::optional<RNCamera>& optional) noexcept {
358
+ inline bool has_value_std__optional_RNCameraUpdate_(const std::optional<RNCameraUpdate>& optional) noexcept {
356
359
  return optional.has_value();
357
360
  }
358
- inline RNCamera get_std__optional_RNCamera_(const std::optional<RNCamera>& optional) noexcept {
361
+ inline RNCameraUpdate get_std__optional_RNCameraUpdate_(const std::optional<RNCameraUpdate>& optional) noexcept {
359
362
  return *optional;
360
363
  }
361
364
 
@@ -18,6 +18,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNAndroidLocationConfig; }
18
18
  namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPermissionResult; }
19
19
  // Forward declaration of `RNAndroidLocationPriority` to properly resolve imports.
20
20
  namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPriority; }
21
+ // Forward declaration of `RNCameraUpdate` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNCameraUpdate; }
21
23
  // Forward declaration of `RNCamera` to properly resolve imports.
22
24
  namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
23
25
  // Forward declaration of `RNCircle` to properly resolve imports.
@@ -106,6 +108,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
106
108
  #include "RNAndroidLocationPermissionResult.hpp"
107
109
  #include "RNAndroidLocationPriority.hpp"
108
110
  #include "RNCamera.hpp"
111
+ #include "RNCameraUpdate.hpp"
109
112
  #include "RNCircle.hpp"
110
113
  #include "RNHeatmap.hpp"
111
114
  #include "RNHeatmapGradient.hpp"
@@ -14,8 +14,8 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
14
14
 
15
15
  // Forward declaration of `RNInitialProps` to properly resolve imports.
16
16
  namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
17
- // Forward declaration of `RNCamera` to properly resolve imports.
18
- namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
17
+ // Forward declaration of `RNCameraUpdate` to properly resolve imports.
18
+ namespace margelo::nitro::rngooglemapsplus { struct RNCameraUpdate; }
19
19
  // Forward declaration of `RNLatLng` to properly resolve imports.
20
20
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
21
21
  // Forward declaration of `RNMapUiSettings` to properly resolve imports.
@@ -70,6 +70,8 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSLocationAccuracy; }
70
70
  namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
71
71
  // Forward declaration of `RNRegion` to properly resolve imports.
72
72
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
73
+ // Forward declaration of `RNCamera` to properly resolve imports.
74
+ namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
73
75
  // Forward declaration of `RNLatLngBounds` to properly resolve imports.
74
76
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
75
77
  // Forward declaration of `RNLocation` to properly resolve imports.
@@ -102,7 +104,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
102
104
  #include "RNInitialProps.hpp"
103
105
  #include <optional>
104
106
  #include <string>
105
- #include "RNCamera.hpp"
107
+ #include "RNCameraUpdate.hpp"
106
108
  #include "RNLatLng.hpp"
107
109
  #include "RNMapUiSettings.hpp"
108
110
  #include "RNUserInterfaceStyle.hpp"
@@ -132,6 +134,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
132
134
  #include "RNMapErrorCode.hpp"
133
135
  #include <functional>
134
136
  #include "RNRegion.hpp"
137
+ #include "RNCamera.hpp"
135
138
  #include "RNLatLngBounds.hpp"
136
139
  #include "RNLocation.hpp"
137
140
  #include "RNLocationAndroid.hpp"
@@ -508,7 +511,7 @@ namespace margelo::nitro::rngooglemapsplus {
508
511
  std::rethrow_exception(__result.error());
509
512
  }
510
513
  }
511
- inline void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMs) override {
514
+ inline void setCamera(const RNCameraUpdate& camera, std::optional<bool> animated, std::optional<double> durationMs) override {
512
515
  auto __result = _swiftPart.setCamera(std::forward<decltype(camera)>(camera), animated, durationMs);
513
516
  if (__result.hasError()) [[unlikely]] {
514
517
  std::rethrow_exception(__result.error());
@@ -59,7 +59,7 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
59
59
  // Methods
60
60
  func showMarkerInfoWindow(id: String) throws -> Void
61
61
  func hideMarkerInfoWindow(id: String) throws -> Void
62
- func setCamera(camera: RNCamera, animated: Bool?, durationMs: Double?) throws -> Void
62
+ func setCamera(camera: RNCameraUpdate, animated: Bool?, durationMs: Double?) throws -> Void
63
63
  func setCameraToCoordinates(coordinates: [RNLatLng], padding: RNMapPadding?, animated: Bool?, durationMs: Double?) throws -> Void
64
64
  func setCameraBounds(bounds: RNLatLngBounds?) throws -> Void
65
65
  func animateToBounds(bounds: RNLatLngBounds, padding: Double?, durationMs: Double?, lockBounds: Bool?) throws -> Void
@@ -1379,7 +1379,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1379
1379
  }
1380
1380
 
1381
1381
  @inline(__always)
1382
- public final func setCamera(camera: RNCamera, animated: bridge.std__optional_bool_, durationMs: bridge.std__optional_double_) -> bridge.Result_void_ {
1382
+ public final func setCamera(camera: RNCameraUpdate, animated: bridge.std__optional_bool_, durationMs: bridge.std__optional_double_) -> bridge.Result_void_ {
1383
1383
  do {
1384
1384
  try self.__implementation.setCamera(camera: camera, animated: { () -> Bool? in
1385
1385
  if bridge.has_value_std__optional_bool_(animated) {
@@ -18,99 +18,51 @@ public extension RNCamera {
18
18
  /**
19
19
  * Create a new instance of `RNCamera`.
20
20
  */
21
- init(center: RNLatLng?, zoom: Double?, bearing: Double?, tilt: Double?) {
22
- self.init({ () -> bridge.std__optional_RNLatLng_ in
23
- if let __unwrappedValue = center {
24
- return bridge.create_std__optional_RNLatLng_(__unwrappedValue)
25
- } else {
26
- return .init()
27
- }
28
- }(), { () -> bridge.std__optional_double_ in
29
- if let __unwrappedValue = zoom {
30
- return bridge.create_std__optional_double_(__unwrappedValue)
31
- } else {
32
- return .init()
33
- }
34
- }(), { () -> bridge.std__optional_double_ in
35
- if let __unwrappedValue = bearing {
36
- return bridge.create_std__optional_double_(__unwrappedValue)
37
- } else {
38
- return .init()
39
- }
40
- }(), { () -> bridge.std__optional_double_ in
41
- if let __unwrappedValue = tilt {
42
- return bridge.create_std__optional_double_(__unwrappedValue)
43
- } else {
44
- return .init()
45
- }
46
- }())
21
+ init(center: RNLatLng, zoom: Double, bearing: Double, tilt: Double) {
22
+ self.init(center, zoom, bearing, tilt)
47
23
  }
48
24
 
49
- var center: RNLatLng? {
25
+ var center: RNLatLng {
50
26
  @inline(__always)
51
27
  get {
52
- return self.__center.value
28
+ return self.__center
53
29
  }
54
30
  @inline(__always)
55
31
  set {
56
- self.__center = { () -> bridge.std__optional_RNLatLng_ in
57
- if let __unwrappedValue = newValue {
58
- return bridge.create_std__optional_RNLatLng_(__unwrappedValue)
59
- } else {
60
- return .init()
61
- }
62
- }()
32
+ self.__center = newValue
63
33
  }
64
34
  }
65
35
 
66
- var zoom: Double? {
36
+ var zoom: Double {
67
37
  @inline(__always)
68
38
  get {
69
- return self.__zoom.value
39
+ return self.__zoom
70
40
  }
71
41
  @inline(__always)
72
42
  set {
73
- self.__zoom = { () -> bridge.std__optional_double_ in
74
- if let __unwrappedValue = newValue {
75
- return bridge.create_std__optional_double_(__unwrappedValue)
76
- } else {
77
- return .init()
78
- }
79
- }()
43
+ self.__zoom = newValue
80
44
  }
81
45
  }
82
46
 
83
- var bearing: Double? {
47
+ var bearing: Double {
84
48
  @inline(__always)
85
49
  get {
86
- return self.__bearing.value
50
+ return self.__bearing
87
51
  }
88
52
  @inline(__always)
89
53
  set {
90
- self.__bearing = { () -> bridge.std__optional_double_ in
91
- if let __unwrappedValue = newValue {
92
- return bridge.create_std__optional_double_(__unwrappedValue)
93
- } else {
94
- return .init()
95
- }
96
- }()
54
+ self.__bearing = newValue
97
55
  }
98
56
  }
99
57
 
100
- var tilt: Double? {
58
+ var tilt: Double {
101
59
  @inline(__always)
102
60
  get {
103
- return self.__tilt.value
61
+ return self.__tilt
104
62
  }
105
63
  @inline(__always)
106
64
  set {
107
- self.__tilt = { () -> bridge.std__optional_double_ in
108
- if let __unwrappedValue = newValue {
109
- return bridge.create_std__optional_double_(__unwrappedValue)
110
- } else {
111
- return .init()
112
- }
113
- }()
65
+ self.__tilt = newValue
114
66
  }
115
67
  }
116
68
  }
@@ -0,0 +1,116 @@
1
+ ///
2
+ /// RNCameraUpdate.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 `RNCameraUpdate`, backed by a C++ struct.
12
+ */
13
+ public typealias RNCameraUpdate = margelo.nitro.rngooglemapsplus.RNCameraUpdate
14
+
15
+ public extension RNCameraUpdate {
16
+ private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `RNCameraUpdate`.
20
+ */
21
+ init(center: RNLatLng?, zoom: Double?, bearing: Double?, tilt: Double?) {
22
+ self.init({ () -> bridge.std__optional_RNLatLng_ in
23
+ if let __unwrappedValue = center {
24
+ return bridge.create_std__optional_RNLatLng_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_double_ in
29
+ if let __unwrappedValue = zoom {
30
+ return bridge.create_std__optional_double_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), { () -> bridge.std__optional_double_ in
35
+ if let __unwrappedValue = bearing {
36
+ return bridge.create_std__optional_double_(__unwrappedValue)
37
+ } else {
38
+ return .init()
39
+ }
40
+ }(), { () -> bridge.std__optional_double_ in
41
+ if let __unwrappedValue = tilt {
42
+ return bridge.create_std__optional_double_(__unwrappedValue)
43
+ } else {
44
+ return .init()
45
+ }
46
+ }())
47
+ }
48
+
49
+ var center: RNLatLng? {
50
+ @inline(__always)
51
+ get {
52
+ return self.__center.value
53
+ }
54
+ @inline(__always)
55
+ set {
56
+ self.__center = { () -> bridge.std__optional_RNLatLng_ in
57
+ if let __unwrappedValue = newValue {
58
+ return bridge.create_std__optional_RNLatLng_(__unwrappedValue)
59
+ } else {
60
+ return .init()
61
+ }
62
+ }()
63
+ }
64
+ }
65
+
66
+ var zoom: Double? {
67
+ @inline(__always)
68
+ get {
69
+ return self.__zoom.value
70
+ }
71
+ @inline(__always)
72
+ set {
73
+ self.__zoom = { () -> bridge.std__optional_double_ in
74
+ if let __unwrappedValue = newValue {
75
+ return bridge.create_std__optional_double_(__unwrappedValue)
76
+ } else {
77
+ return .init()
78
+ }
79
+ }()
80
+ }
81
+ }
82
+
83
+ var bearing: Double? {
84
+ @inline(__always)
85
+ get {
86
+ return self.__bearing.value
87
+ }
88
+ @inline(__always)
89
+ set {
90
+ self.__bearing = { () -> bridge.std__optional_double_ in
91
+ if let __unwrappedValue = newValue {
92
+ return bridge.create_std__optional_double_(__unwrappedValue)
93
+ } else {
94
+ return .init()
95
+ }
96
+ }()
97
+ }
98
+ }
99
+
100
+ var tilt: Double? {
101
+ @inline(__always)
102
+ get {
103
+ return self.__tilt.value
104
+ }
105
+ @inline(__always)
106
+ set {
107
+ self.__tilt = { () -> bridge.std__optional_double_ in
108
+ if let __unwrappedValue = newValue {
109
+ return bridge.create_std__optional_double_(__unwrappedValue)
110
+ } else {
111
+ return .init()
112
+ }
113
+ }()
114
+ }
115
+ }
116
+ }
@@ -18,7 +18,7 @@ public extension RNInitialProps {
18
18
  /**
19
19
  * Create a new instance of `RNInitialProps`.
20
20
  */
21
- init(mapId: String?, liteMode: Bool?, camera: RNCamera?, backgroundColor: String?) {
21
+ init(mapId: String?, liteMode: Bool?, camera: RNCameraUpdate?, backgroundColor: String?) {
22
22
  self.init({ () -> bridge.std__optional_std__string_ in
23
23
  if let __unwrappedValue = mapId {
24
24
  return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
@@ -31,9 +31,9 @@ public extension RNInitialProps {
31
31
  } else {
32
32
  return .init()
33
33
  }
34
- }(), { () -> bridge.std__optional_RNCamera_ in
34
+ }(), { () -> bridge.std__optional_RNCameraUpdate_ in
35
35
  if let __unwrappedValue = camera {
36
- return bridge.create_std__optional_RNCamera_(__unwrappedValue)
36
+ return bridge.create_std__optional_RNCameraUpdate_(__unwrappedValue)
37
37
  } else {
38
38
  return .init()
39
39
  }
@@ -94,16 +94,16 @@ public extension RNInitialProps {
94
94
  }
95
95
  }
96
96
 
97
- var camera: RNCamera? {
97
+ var camera: RNCameraUpdate? {
98
98
  @inline(__always)
99
99
  get {
100
100
  return self.__camera.value
101
101
  }
102
102
  @inline(__always)
103
103
  set {
104
- self.__camera = { () -> bridge.std__optional_RNCamera_ in
104
+ self.__camera = { () -> bridge.std__optional_RNCameraUpdate_ in
105
105
  if let __unwrappedValue = newValue {
106
- return bridge.create_std__optional_RNCamera_(__unwrappedValue)
106
+ return bridge.create_std__optional_RNCameraUpdate_(__unwrappedValue)
107
107
  } else {
108
108
  return .init()
109
109
  }