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

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 (51) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +86 -5
  2. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +0 -1
  3. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +38 -4
  4. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +17 -0
  5. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSize.kt +7 -0
  6. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotFormat.kt +16 -0
  7. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotResultType.kt +9 -0
  8. package/ios/GoogleMapViewImpl.swift +261 -131
  9. package/ios/RNGoogleMapsPlusView.swift +72 -27
  10. package/ios/extensions/RNLatLngBounds+Extension.swift +16 -0
  11. package/ios/extensions/RNSize+Extension.swift +7 -0
  12. package/ios/extensions/RNSnapshotFormat+Extension.swift +28 -0
  13. package/ios/extensions/RNSnapshotResultType+Extension.swift +12 -0
  14. package/lib/module/types.js.map +1 -1
  15. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +6 -3
  16. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  17. package/lib/typescript/src/types.d.ts +13 -1
  18. package/lib/typescript/src/types.d.ts.map +1 -1
  19. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +51 -7
  20. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +5 -2
  21. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +58 -0
  22. package/nitrogen/generated/android/c++/JRNSize.hpp +57 -0
  23. package/nitrogen/generated/android/c++/JRNSnapshotFormat.hpp +62 -0
  24. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +71 -0
  25. package/nitrogen/generated/android/c++/JRNSnapshotResultType.hpp +59 -0
  26. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +14 -2
  27. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +32 -0
  28. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +32 -0
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotFormat.kt +22 -0
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +38 -0
  31. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotResultType.kt +21 -0
  32. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +57 -0
  33. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +15 -0
  34. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +40 -5
  35. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +5 -2
  36. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +58 -4
  37. package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +46 -0
  38. package/nitrogen/generated/ios/swift/RNSize.swift +46 -0
  39. package/nitrogen/generated/ios/swift/RNSnapshotFormat.swift +44 -0
  40. package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +87 -0
  41. package/nitrogen/generated/ios/swift/RNSnapshotResultType.swift +40 -0
  42. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +3 -0
  43. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +12 -3
  44. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +72 -0
  45. package/nitrogen/generated/shared/c++/RNSize.hpp +71 -0
  46. package/nitrogen/generated/shared/c++/RNSnapshotFormat.hpp +80 -0
  47. package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +87 -0
  48. package/nitrogen/generated/shared/c++/RNSnapshotResultType.hpp +76 -0
  49. package/package.json +1 -1
  50. package/src/RNGoogleMapsPlusView.nitro.ts +15 -2
  51. package/src/types.ts +24 -2
@@ -0,0 +1,71 @@
1
+ ///
2
+ /// JRNSnapshotOptions.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 "RNSnapshotOptions.hpp"
12
+
13
+ #include "JRNSize.hpp"
14
+ #include "JRNSnapshotFormat.hpp"
15
+ #include "JRNSnapshotResultType.hpp"
16
+ #include "RNSize.hpp"
17
+ #include "RNSnapshotFormat.hpp"
18
+ #include "RNSnapshotResultType.hpp"
19
+ #include <optional>
20
+
21
+ namespace margelo::nitro::rngooglemapsplus {
22
+
23
+ using namespace facebook;
24
+
25
+ /**
26
+ * The C++ JNI bridge between the C++ struct "RNSnapshotOptions" and the the Kotlin data class "RNSnapshotOptions".
27
+ */
28
+ struct JRNSnapshotOptions final: public jni::JavaClass<JRNSnapshotOptions> {
29
+ public:
30
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotOptions;";
31
+
32
+ public:
33
+ /**
34
+ * Convert this Java/Kotlin-based struct to the C++ struct RNSnapshotOptions by copying all values to C++.
35
+ */
36
+ [[maybe_unused]]
37
+ [[nodiscard]]
38
+ RNSnapshotOptions toCpp() const {
39
+ static const auto clazz = javaClassStatic();
40
+ static const auto fieldSize = clazz->getField<JRNSize>("size");
41
+ jni::local_ref<JRNSize> size = this->getFieldValue(fieldSize);
42
+ static const auto fieldFormat = clazz->getField<JRNSnapshotFormat>("format");
43
+ jni::local_ref<JRNSnapshotFormat> format = this->getFieldValue(fieldFormat);
44
+ static const auto fieldQuality = clazz->getField<double>("quality");
45
+ double quality = this->getFieldValue(fieldQuality);
46
+ static const auto fieldResultType = clazz->getField<JRNSnapshotResultType>("resultType");
47
+ jni::local_ref<JRNSnapshotResultType> resultType = this->getFieldValue(fieldResultType);
48
+ return RNSnapshotOptions(
49
+ size != nullptr ? std::make_optional(size->toCpp()) : std::nullopt,
50
+ format->toCpp(),
51
+ quality,
52
+ resultType->toCpp()
53
+ );
54
+ }
55
+
56
+ public:
57
+ /**
58
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
59
+ */
60
+ [[maybe_unused]]
61
+ static jni::local_ref<JRNSnapshotOptions::javaobject> fromCpp(const RNSnapshotOptions& value) {
62
+ return newInstance(
63
+ value.size.has_value() ? JRNSize::fromCpp(value.size.value()) : nullptr,
64
+ JRNSnapshotFormat::fromCpp(value.format),
65
+ value.quality,
66
+ JRNSnapshotResultType::fromCpp(value.resultType)
67
+ );
68
+ }
69
+ };
70
+
71
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,59 @@
1
+ ///
2
+ /// JRNSnapshotResultType.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 "RNSnapshotResultType.hpp"
12
+
13
+ namespace margelo::nitro::rngooglemapsplus {
14
+
15
+ using namespace facebook;
16
+
17
+ /**
18
+ * The C++ JNI bridge between the C++ enum "RNSnapshotResultType" and the the Kotlin enum "RNSnapshotResultType".
19
+ */
20
+ struct JRNSnapshotResultType final: public jni::JavaClass<JRNSnapshotResultType> {
21
+ public:
22
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotResultType;";
23
+
24
+ public:
25
+ /**
26
+ * Convert this Java/Kotlin-based enum to the C++ enum RNSnapshotResultType.
27
+ */
28
+ [[maybe_unused]]
29
+ [[nodiscard]]
30
+ RNSnapshotResultType toCpp() const {
31
+ static const auto clazz = javaClassStatic();
32
+ static const auto fieldOrdinal = clazz->getField<int>("value");
33
+ int ordinal = this->getFieldValue(fieldOrdinal);
34
+ return static_cast<RNSnapshotResultType>(ordinal);
35
+ }
36
+
37
+ public:
38
+ /**
39
+ * Create a Java/Kotlin-based enum with the given C++ enum's value.
40
+ */
41
+ [[maybe_unused]]
42
+ static jni::alias_ref<JRNSnapshotResultType> fromCpp(RNSnapshotResultType value) {
43
+ static const auto clazz = javaClassStatic();
44
+ static const auto fieldBASE64 = clazz->getStaticField<JRNSnapshotResultType>("BASE64");
45
+ static const auto fieldFILE = clazz->getStaticField<JRNSnapshotResultType>("FILE");
46
+
47
+ switch (value) {
48
+ case RNSnapshotResultType::BASE64:
49
+ return clazz->getStaticFieldValue(fieldBASE64);
50
+ case RNSnapshotResultType::FILE:
51
+ return clazz->getStaticFieldValue(fieldFILE);
52
+ default:
53
+ std::string stringValue = std::to_string(static_cast<int>(value));
54
+ throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
55
+ }
56
+ }
57
+ };
58
+
59
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -387,11 +387,23 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
387
387
  // Methods
388
388
  @DoNotStrip
389
389
  @Keep
390
- abstract fun setCamera(camera: RNCamera, animated: Boolean?, durationMS: Double?): Unit
390
+ abstract fun setCamera(camera: RNCamera, animated: Boolean?, durationMs: Double?): Unit
391
391
 
392
392
  @DoNotStrip
393
393
  @Keep
394
- abstract fun setCameraToCoordinates(coordinates: Array<RNLatLng>, padding: RNMapPadding?, animated: Boolean?, durationMS: Double?): Unit
394
+ abstract fun setCameraToCoordinates(coordinates: Array<RNLatLng>, padding: RNMapPadding?, animated: Boolean?, durationMs: Double?): Unit
395
+
396
+ @DoNotStrip
397
+ @Keep
398
+ abstract fun setCameraBounds(bounds: RNLatLngBounds?): Unit
399
+
400
+ @DoNotStrip
401
+ @Keep
402
+ abstract fun animateToBounds(bounds: RNLatLngBounds, padding: Double?, durationMs: Double?, lockBounds: Boolean?): Unit
403
+
404
+ @DoNotStrip
405
+ @Keep
406
+ abstract fun snapshot(options: RNSnapshotOptions): Promise<String?>
395
407
 
396
408
  @DoNotStrip
397
409
  @Keep
@@ -0,0 +1,32 @@
1
+ ///
2
+ /// RNLatLngBounds.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 "RNLatLngBounds".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class RNLatLngBounds
21
+ @DoNotStrip
22
+ @Keep
23
+ constructor(
24
+ @DoNotStrip
25
+ @Keep
26
+ val northEast: RNLatLng,
27
+ @DoNotStrip
28
+ @Keep
29
+ val southWest: RNLatLng
30
+ ) {
31
+ /* main constructor */
32
+ }
@@ -0,0 +1,32 @@
1
+ ///
2
+ /// RNSize.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 "RNSize".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class RNSize
21
+ @DoNotStrip
22
+ @Keep
23
+ constructor(
24
+ @DoNotStrip
25
+ @Keep
26
+ val width: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val height: Double
30
+ ) {
31
+ /* main constructor */
32
+ }
@@ -0,0 +1,22 @@
1
+ ///
2
+ /// RNSnapshotFormat.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
+
13
+ /**
14
+ * Represents the JavaScript enum/union "RNSnapshotFormat".
15
+ */
16
+ @DoNotStrip
17
+ @Keep
18
+ enum class RNSnapshotFormat(@DoNotStrip @Keep val value: Int) {
19
+ PNG(0),
20
+ JPG(1),
21
+ JPEG(2);
22
+ }
@@ -0,0 +1,38 @@
1
+ ///
2
+ /// RNSnapshotOptions.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 "RNSnapshotOptions".
17
+ */
18
+ @DoNotStrip
19
+ @Keep
20
+ data class RNSnapshotOptions
21
+ @DoNotStrip
22
+ @Keep
23
+ constructor(
24
+ @DoNotStrip
25
+ @Keep
26
+ val size: RNSize?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val format: RNSnapshotFormat,
30
+ @DoNotStrip
31
+ @Keep
32
+ val quality: Double,
33
+ @DoNotStrip
34
+ @Keep
35
+ val resultType: RNSnapshotResultType
36
+ ) {
37
+ /* main constructor */
38
+ }
@@ -0,0 +1,21 @@
1
+ ///
2
+ /// RNSnapshotResultType.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
+
13
+ /**
14
+ * Represents the JavaScript enum/union "RNSnapshotResultType".
15
+ */
16
+ @DoNotStrip
17
+ @Keep
18
+ enum class RNSnapshotResultType(@DoNotStrip @Keep val value: Int) {
19
+ BASE64(0),
20
+ FILE(1);
21
+ }
@@ -42,6 +42,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
42
42
  namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
43
43
  // Forward declaration of `RNKMLayer` to properly resolve imports.
44
44
  namespace margelo::nitro::rngooglemapsplus { struct RNKMLayer; }
45
+ // Forward declaration of `RNLatLngBounds` to properly resolve imports.
46
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
45
47
  // Forward declaration of `RNLatLng` to properly resolve imports.
46
48
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
47
49
  // Forward declaration of `RNLineCapType` to properly resolve imports.
@@ -78,6 +80,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
78
80
  namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
79
81
  // Forward declaration of `RNRegion` to properly resolve imports.
80
82
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
83
+ // Forward declaration of `RNSize` to properly resolve imports.
84
+ namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
81
85
  // Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
82
86
  namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
83
87
 
@@ -106,6 +110,7 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
106
110
  #include "RNInitialProps.hpp"
107
111
  #include "RNKMLayer.hpp"
108
112
  #include "RNLatLng.hpp"
113
+ #include "RNLatLngBounds.hpp"
109
114
  #include "RNLineCapType.hpp"
110
115
  #include "RNLineJoinType.hpp"
111
116
  #include "RNLocation.hpp"
@@ -123,6 +128,7 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
123
128
  #include "RNPolyline.hpp"
124
129
  #include "RNPosition.hpp"
125
130
  #include "RNRegion.hpp"
131
+ #include "RNSize.hpp"
126
132
  #include "RNUserInterfaceStyle.hpp"
127
133
  #include <NitroModules/Promise.hpp>
128
134
  #include <NitroModules/PromiseHolder.hpp>
@@ -1161,6 +1167,48 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
1161
1167
  return *optional;
1162
1168
  }
1163
1169
 
1170
+ // pragma MARK: std::optional<RNLatLngBounds>
1171
+ /**
1172
+ * Specialized version of `std::optional<RNLatLngBounds>`.
1173
+ */
1174
+ using std__optional_RNLatLngBounds_ = std::optional<RNLatLngBounds>;
1175
+ inline std::optional<RNLatLngBounds> create_std__optional_RNLatLngBounds_(const RNLatLngBounds& value) noexcept {
1176
+ return std::optional<RNLatLngBounds>(value);
1177
+ }
1178
+ inline bool has_value_std__optional_RNLatLngBounds_(const std::optional<RNLatLngBounds>& optional) noexcept {
1179
+ return optional.has_value();
1180
+ }
1181
+ inline RNLatLngBounds get_std__optional_RNLatLngBounds_(const std::optional<RNLatLngBounds>& optional) noexcept {
1182
+ return *optional;
1183
+ }
1184
+
1185
+ // pragma MARK: std::shared_ptr<Promise<std::optional<std::string>>>
1186
+ /**
1187
+ * Specialized version of `std::shared_ptr<Promise<std::optional<std::string>>>`.
1188
+ */
1189
+ using std__shared_ptr_Promise_std__optional_std__string___ = std::shared_ptr<Promise<std::optional<std::string>>>;
1190
+ inline std::shared_ptr<Promise<std::optional<std::string>>> create_std__shared_ptr_Promise_std__optional_std__string___() noexcept {
1191
+ return Promise<std::optional<std::string>>::create();
1192
+ }
1193
+ inline PromiseHolder<std::optional<std::string>> wrap_std__shared_ptr_Promise_std__optional_std__string___(std::shared_ptr<Promise<std::optional<std::string>>> promise) noexcept {
1194
+ return PromiseHolder<std::optional<std::string>>(std::move(promise));
1195
+ }
1196
+
1197
+ // pragma MARK: std::optional<RNSize>
1198
+ /**
1199
+ * Specialized version of `std::optional<RNSize>`.
1200
+ */
1201
+ using std__optional_RNSize_ = std::optional<RNSize>;
1202
+ inline std::optional<RNSize> create_std__optional_RNSize_(const RNSize& value) noexcept {
1203
+ return std::optional<RNSize>(value);
1204
+ }
1205
+ inline bool has_value_std__optional_RNSize_(const std::optional<RNSize>& optional) noexcept {
1206
+ return optional.has_value();
1207
+ }
1208
+ inline RNSize get_std__optional_RNSize_(const std::optional<RNSize>& optional) noexcept {
1209
+ return *optional;
1210
+ }
1211
+
1164
1212
  // pragma MARK: std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>
1165
1213
  /**
1166
1214
  * Specialized version of `std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>`.
@@ -1172,5 +1220,14 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
1172
1220
  // pragma MARK: std::weak_ptr<HybridRNGoogleMapsPlusViewSpec>
1173
1221
  using std__weak_ptr_HybridRNGoogleMapsPlusViewSpec_ = std::weak_ptr<HybridRNGoogleMapsPlusViewSpec>;
1174
1222
  inline std__weak_ptr_HybridRNGoogleMapsPlusViewSpec_ weakify_std__shared_ptr_HybridRNGoogleMapsPlusViewSpec_(const std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>& strong) noexcept { return strong; }
1223
+
1224
+ // pragma MARK: Result<std::shared_ptr<Promise<std::optional<std::string>>>>
1225
+ using Result_std__shared_ptr_Promise_std__optional_std__string____ = Result<std::shared_ptr<Promise<std::optional<std::string>>>>;
1226
+ inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::shared_ptr<Promise<std::optional<std::string>>>& value) noexcept {
1227
+ return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withValue(value);
1228
+ }
1229
+ inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::exception_ptr& error) noexcept {
1230
+ return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withError(error);
1231
+ }
1175
1232
 
1176
1233
  } // namespace margelo::nitro::rngooglemapsplus::bridge::swift
@@ -42,6 +42,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
42
42
  namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
43
43
  // Forward declaration of `RNKMLayer` to properly resolve imports.
44
44
  namespace margelo::nitro::rngooglemapsplus { struct RNKMLayer; }
45
+ // Forward declaration of `RNLatLngBounds` to properly resolve imports.
46
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
45
47
  // Forward declaration of `RNLatLng` to properly resolve imports.
46
48
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
47
49
  // Forward declaration of `RNLineCapType` to properly resolve imports.
@@ -78,6 +80,14 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
78
80
  namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
79
81
  // Forward declaration of `RNRegion` to properly resolve imports.
80
82
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
83
+ // Forward declaration of `RNSize` to properly resolve imports.
84
+ namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
85
+ // Forward declaration of `RNSnapshotFormat` to properly resolve imports.
86
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
87
+ // Forward declaration of `RNSnapshotOptions` to properly resolve imports.
88
+ namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
89
+ // Forward declaration of `RNSnapshotResultType` to properly resolve imports.
90
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
81
91
  // Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
82
92
  namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
83
93
 
@@ -100,6 +110,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
100
110
  #include "RNInitialProps.hpp"
101
111
  #include "RNKMLayer.hpp"
102
112
  #include "RNLatLng.hpp"
113
+ #include "RNLatLngBounds.hpp"
103
114
  #include "RNLineCapType.hpp"
104
115
  #include "RNLineJoinType.hpp"
105
116
  #include "RNLocation.hpp"
@@ -117,6 +128,10 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
117
128
  #include "RNPolyline.hpp"
118
129
  #include "RNPosition.hpp"
119
130
  #include "RNRegion.hpp"
131
+ #include "RNSize.hpp"
132
+ #include "RNSnapshotFormat.hpp"
133
+ #include "RNSnapshotOptions.hpp"
134
+ #include "RNSnapshotResultType.hpp"
120
135
  #include "RNUserInterfaceStyle.hpp"
121
136
  #include <NitroModules/Promise.hpp>
122
137
  #include <NitroModules/Result.hpp>
@@ -74,6 +74,16 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorBuilding; }
74
74
  namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
75
75
  // Forward declaration of `RNRegion` to properly resolve imports.
76
76
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
77
+ // Forward declaration of `RNLatLngBounds` to properly resolve imports.
78
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
79
+ // Forward declaration of `RNSnapshotOptions` to properly resolve imports.
80
+ namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
81
+ // Forward declaration of `RNSize` to properly resolve imports.
82
+ namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
83
+ // Forward declaration of `RNSnapshotFormat` to properly resolve imports.
84
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
85
+ // Forward declaration of `RNSnapshotResultType` to properly resolve imports.
86
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
77
87
  // Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
78
88
  namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
79
89
  // Forward declaration of `RNAndroidLocationPermissionResult` to properly resolve imports.
@@ -116,8 +126,13 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
116
126
  #include "RNIndoorBuilding.hpp"
117
127
  #include "RNIndoorLevel.hpp"
118
128
  #include "RNRegion.hpp"
119
- #include "RNLocationPermissionResult.hpp"
129
+ #include "RNLatLngBounds.hpp"
120
130
  #include <NitroModules/Promise.hpp>
131
+ #include "RNSnapshotOptions.hpp"
132
+ #include "RNSize.hpp"
133
+ #include "RNSnapshotFormat.hpp"
134
+ #include "RNSnapshotResultType.hpp"
135
+ #include "RNLocationPermissionResult.hpp"
121
136
  #include "RNAndroidLocationPermissionResult.hpp"
122
137
  #include "RNIOSPermissionResult.hpp"
123
138
 
@@ -406,17 +421,37 @@ namespace margelo::nitro::rngooglemapsplus {
406
421
 
407
422
  public:
408
423
  // Methods
409
- inline void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) override {
410
- auto __result = _swiftPart.setCamera(camera, animated, durationMS);
424
+ inline void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMs) override {
425
+ auto __result = _swiftPart.setCamera(camera, animated, durationMs);
426
+ if (__result.hasError()) [[unlikely]] {
427
+ std::rethrow_exception(__result.error());
428
+ }
429
+ }
430
+ inline void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMs) override {
431
+ auto __result = _swiftPart.setCameraToCoordinates(coordinates, padding, animated, durationMs);
432
+ if (__result.hasError()) [[unlikely]] {
433
+ std::rethrow_exception(__result.error());
434
+ }
435
+ }
436
+ inline void setCameraBounds(const std::optional<RNLatLngBounds>& bounds) override {
437
+ auto __result = _swiftPart.setCameraBounds(bounds);
438
+ if (__result.hasError()) [[unlikely]] {
439
+ std::rethrow_exception(__result.error());
440
+ }
441
+ }
442
+ inline void animateToBounds(const RNLatLngBounds& bounds, std::optional<double> padding, std::optional<double> durationMs, std::optional<bool> lockBounds) override {
443
+ auto __result = _swiftPart.animateToBounds(bounds, padding, durationMs, lockBounds);
411
444
  if (__result.hasError()) [[unlikely]] {
412
445
  std::rethrow_exception(__result.error());
413
446
  }
414
447
  }
415
- inline void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) override {
416
- auto __result = _swiftPart.setCameraToCoordinates(coordinates, padding, animated, durationMS);
448
+ inline std::shared_ptr<Promise<std::optional<std::string>>> snapshot(const RNSnapshotOptions& options) override {
449
+ auto __result = _swiftPart.snapshot(options);
417
450
  if (__result.hasError()) [[unlikely]] {
418
451
  std::rethrow_exception(__result.error());
419
452
  }
453
+ auto __value = std::move(__result.value());
454
+ return __value;
420
455
  }
421
456
  inline void showLocationDialog() override {
422
457
  auto __result = _swiftPart.showLocationDialog();
@@ -48,8 +48,11 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
48
48
  var onCameraChangeComplete: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
49
49
 
50
50
  // Methods
51
- func setCamera(camera: RNCamera, animated: Bool?, durationMS: Double?) throws -> Void
52
- func setCameraToCoordinates(coordinates: [RNLatLng], padding: RNMapPadding?, animated: Bool?, durationMS: Double?) throws -> Void
51
+ func setCamera(camera: RNCamera, animated: Bool?, durationMs: Double?) throws -> Void
52
+ func setCameraToCoordinates(coordinates: [RNLatLng], padding: RNMapPadding?, animated: Bool?, durationMs: Double?) throws -> Void
53
+ func setCameraBounds(bounds: RNLatLngBounds?) throws -> Void
54
+ func animateToBounds(bounds: RNLatLngBounds, padding: Double?, durationMs: Double?, lockBounds: Bool?) throws -> Void
55
+ func snapshot(options: RNSnapshotOptions) throws -> Promise<String?>
53
56
  func showLocationDialog() throws -> Void
54
57
  func openLocationSettings() throws -> Void
55
58
  func requestLocationPermission() throws -> Promise<RNLocationPermissionResult>
@@ -1120,9 +1120,9 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1120
1120
 
1121
1121
  // Methods
1122
1122
  @inline(__always)
1123
- public final func setCamera(camera: RNCamera, animated: bridge.std__optional_bool_, durationMS: bridge.std__optional_double_) -> bridge.Result_void_ {
1123
+ public final func setCamera(camera: RNCamera, animated: bridge.std__optional_bool_, durationMs: bridge.std__optional_double_) -> bridge.Result_void_ {
1124
1124
  do {
1125
- try self.__implementation.setCamera(camera: camera, animated: animated.value, durationMS: durationMS.value)
1125
+ try self.__implementation.setCamera(camera: camera, animated: animated.value, durationMs: durationMs.value)
1126
1126
  return bridge.create_Result_void_()
1127
1127
  } catch (let __error) {
1128
1128
  let __exceptionPtr = __error.toCpp()
@@ -1131,7 +1131,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1131
1131
  }
1132
1132
 
1133
1133
  @inline(__always)
1134
- public final func setCameraToCoordinates(coordinates: bridge.std__vector_RNLatLng_, padding: bridge.std__optional_RNMapPadding_, animated: bridge.std__optional_bool_, durationMS: bridge.std__optional_double_) -> bridge.Result_void_ {
1134
+ public final func setCameraToCoordinates(coordinates: bridge.std__vector_RNLatLng_, padding: bridge.std__optional_RNMapPadding_, animated: bridge.std__optional_bool_, durationMs: bridge.std__optional_double_) -> bridge.Result_void_ {
1135
1135
  do {
1136
1136
  try self.__implementation.setCameraToCoordinates(coordinates: coordinates.map({ __item in __item }), padding: { () -> RNMapPadding? in
1137
1137
  if bridge.has_value_std__optional_RNMapPadding_(padding) {
@@ -1140,7 +1140,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1140
1140
  } else {
1141
1141
  return nil
1142
1142
  }
1143
- }(), animated: animated.value, durationMS: durationMS.value)
1143
+ }(), animated: animated.value, durationMs: durationMs.value)
1144
1144
  return bridge.create_Result_void_()
1145
1145
  } catch (let __error) {
1146
1146
  let __exceptionPtr = __error.toCpp()
@@ -1148,6 +1148,60 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
1148
1148
  }
1149
1149
  }
1150
1150
 
1151
+ @inline(__always)
1152
+ public final func setCameraBounds(bounds: bridge.std__optional_RNLatLngBounds_) -> bridge.Result_void_ {
1153
+ do {
1154
+ try self.__implementation.setCameraBounds(bounds: { () -> RNLatLngBounds? in
1155
+ if bridge.has_value_std__optional_RNLatLngBounds_(bounds) {
1156
+ let __unwrapped = bridge.get_std__optional_RNLatLngBounds_(bounds)
1157
+ return __unwrapped
1158
+ } else {
1159
+ return nil
1160
+ }
1161
+ }())
1162
+ return bridge.create_Result_void_()
1163
+ } catch (let __error) {
1164
+ let __exceptionPtr = __error.toCpp()
1165
+ return bridge.create_Result_void_(__exceptionPtr)
1166
+ }
1167
+ }
1168
+
1169
+ @inline(__always)
1170
+ public final func animateToBounds(bounds: RNLatLngBounds, padding: bridge.std__optional_double_, durationMs: bridge.std__optional_double_, lockBounds: bridge.std__optional_bool_) -> bridge.Result_void_ {
1171
+ do {
1172
+ try self.__implementation.animateToBounds(bounds: bounds, padding: padding.value, durationMs: durationMs.value, lockBounds: lockBounds.value)
1173
+ return bridge.create_Result_void_()
1174
+ } catch (let __error) {
1175
+ let __exceptionPtr = __error.toCpp()
1176
+ return bridge.create_Result_void_(__exceptionPtr)
1177
+ }
1178
+ }
1179
+
1180
+ @inline(__always)
1181
+ public final func snapshot(options: RNSnapshotOptions) -> bridge.Result_std__shared_ptr_Promise_std__optional_std__string____ {
1182
+ do {
1183
+ let __result = try self.__implementation.snapshot(options: options)
1184
+ let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__optional_std__string___ in
1185
+ let __promise = bridge.create_std__shared_ptr_Promise_std__optional_std__string___()
1186
+ let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__optional_std__string___(__promise)
1187
+ __result
1188
+ .then({ __result in __promiseHolder.resolve({ () -> bridge.std__optional_std__string_ in
1189
+ if let __unwrappedValue = __result {
1190
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
1191
+ } else {
1192
+ return .init()
1193
+ }
1194
+ }()) })
1195
+ .catch({ __error in __promiseHolder.reject(__error.toCpp()) })
1196
+ return __promise
1197
+ }()
1198
+ return bridge.create_Result_std__shared_ptr_Promise_std__optional_std__string____(__resultCpp)
1199
+ } catch (let __error) {
1200
+ let __exceptionPtr = __error.toCpp()
1201
+ return bridge.create_Result_std__shared_ptr_Promise_std__optional_std__string____(__exceptionPtr)
1202
+ }
1203
+ }
1204
+
1151
1205
  @inline(__always)
1152
1206
  public final func showLocationDialog() -> bridge.Result_void_ {
1153
1207
  do {