react-native-google-maps-plus 1.3.0-dev.1 → 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 (74) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +107 -5
  2. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +0 -1
  3. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +48 -4
  4. package/android/src/main/java/com/rngooglemapsplus/extensions/IndoorBuildingExtension.kt +33 -0
  5. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +17 -0
  6. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSize.kt +7 -0
  7. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotFormat.kt +16 -0
  8. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotResultType.kt +9 -0
  9. package/ios/GoogleMapViewImpl.swift +277 -121
  10. package/ios/RNGoogleMapsPlusView.swift +78 -27
  11. package/ios/extensions/IndoorBuilding+Extension.swift +33 -0
  12. package/ios/extensions/RNLatLngBounds+Extension.swift +16 -0
  13. package/ios/extensions/RNSize+Extension.swift +7 -0
  14. package/ios/extensions/RNSnapshotFormat+Extension.swift +28 -0
  15. package/ios/extensions/RNSnapshotResultType+Extension.swift +12 -0
  16. package/lib/module/types.js.map +1 -1
  17. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +8 -3
  18. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  19. package/lib/typescript/src/types.d.ts +25 -1
  20. package/lib/typescript/src/types.d.ts.map +1 -1
  21. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +4 -0
  22. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorBuilding.hpp +81 -0
  23. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorLevel.hpp +78 -0
  24. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +99 -7
  25. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +9 -2
  26. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +86 -0
  27. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +66 -0
  28. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +58 -0
  29. package/nitrogen/generated/android/c++/JRNSize.hpp +57 -0
  30. package/nitrogen/generated/android/c++/JRNSnapshotFormat.hpp +62 -0
  31. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +71 -0
  32. package/nitrogen/generated/android/c++/JRNSnapshotResultType.hpp +59 -0
  33. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +8 -0
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorBuilding.kt +81 -0
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorLevel.kt +81 -0
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +42 -2
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +38 -0
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +38 -0
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +32 -0
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +32 -0
  41. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotFormat.kt +22 -0
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +38 -0
  43. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotResultType.kt +21 -0
  44. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +16 -0
  45. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +148 -0
  46. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +21 -0
  47. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +60 -5
  48. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +10 -0
  49. package/nitrogen/generated/ios/swift/Func_void_RNIndoorBuilding.swift +47 -0
  50. package/nitrogen/generated/ios/swift/Func_void_RNIndoorLevel.swift +47 -0
  51. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +7 -2
  52. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +122 -4
  53. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +116 -0
  54. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +118 -0
  55. package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +46 -0
  56. package/nitrogen/generated/ios/swift/RNSize.swift +46 -0
  57. package/nitrogen/generated/ios/swift/RNSnapshotFormat.swift +44 -0
  58. package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +87 -0
  59. package/nitrogen/generated/ios/swift/RNSnapshotResultType.swift +40 -0
  60. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +7 -0
  61. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +22 -3
  62. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +82 -0
  63. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +80 -0
  64. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +72 -0
  65. package/nitrogen/generated/shared/c++/RNSize.hpp +71 -0
  66. package/nitrogen/generated/shared/c++/RNSnapshotFormat.hpp +80 -0
  67. package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +87 -0
  68. package/nitrogen/generated/shared/c++/RNSnapshotResultType.hpp +76 -0
  69. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +24 -0
  70. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -0
  71. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -0
  72. package/package.json +1 -1
  73. package/src/RNGoogleMapsPlusView.nitro.ts +19 -2
  74. package/src/types.ts +38 -2
@@ -63,6 +63,10 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
63
63
  namespace margelo::nitro::rngooglemapsplus { struct RNLocation; }
64
64
  // Forward declaration of `RNLocationErrorCode` to properly resolve imports.
65
65
  namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
66
+ // Forward declaration of `RNIndoorBuilding` to properly resolve imports.
67
+ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorBuilding; }
68
+ // Forward declaration of `RNIndoorLevel` to properly resolve imports.
69
+ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
66
70
  // Forward declaration of `RNRegion` to properly resolve imports.
67
71
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
68
72
  // Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
@@ -71,6 +75,16 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
71
75
  namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPermissionResult; }
72
76
  // Forward declaration of `RNIOSPermissionResult` to properly resolve imports.
73
77
  namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
78
+ // Forward declaration of `RNLatLngBounds` to properly resolve imports.
79
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
80
+ // Forward declaration of `RNSnapshotOptions` to properly resolve imports.
81
+ namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
82
+ // Forward declaration of `RNSize` to properly resolve imports.
83
+ namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
84
+ // Forward declaration of `RNSnapshotFormat` to properly resolve imports.
85
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
86
+ // Forward declaration of `RNSnapshotResultType` to properly resolve imports.
87
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
74
88
 
75
89
  #include "RNInitialProps.hpp"
76
90
  #include <optional>
@@ -139,17 +153,33 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
139
153
  #include "JFunc_void_RNLatLng.hpp"
140
154
  #include "JFunc_void_std__optional_std__string_.hpp"
141
155
  #include "JFunc_void_std__optional_std__string__RNLatLng.hpp"
156
+ #include "RNIndoorBuilding.hpp"
157
+ #include "JFunc_void_RNIndoorBuilding.hpp"
158
+ #include "JRNIndoorBuilding.hpp"
159
+ #include "RNIndoorLevel.hpp"
160
+ #include "JRNIndoorLevel.hpp"
161
+ #include "JFunc_void_RNIndoorLevel.hpp"
142
162
  #include "RNRegion.hpp"
143
163
  #include "JFunc_void_RNRegion_RNCamera_bool.hpp"
144
164
  #include "JRNRegion.hpp"
145
- #include "RNLocationPermissionResult.hpp"
146
165
  #include <NitroModules/Promise.hpp>
147
166
  #include <NitroModules/JPromise.hpp>
167
+ #include "RNLocationPermissionResult.hpp"
148
168
  #include "JRNLocationPermissionResult.hpp"
149
169
  #include "RNAndroidLocationPermissionResult.hpp"
150
170
  #include "JRNAndroidLocationPermissionResult.hpp"
151
171
  #include "RNIOSPermissionResult.hpp"
152
172
  #include "JRNIOSPermissionResult.hpp"
173
+ #include "RNLatLngBounds.hpp"
174
+ #include "JRNLatLngBounds.hpp"
175
+ #include "RNSnapshotOptions.hpp"
176
+ #include "JRNSnapshotOptions.hpp"
177
+ #include "RNSize.hpp"
178
+ #include "JRNSize.hpp"
179
+ #include "RNSnapshotFormat.hpp"
180
+ #include "JRNSnapshotFormat.hpp"
181
+ #include "RNSnapshotResultType.hpp"
182
+ #include "JRNSnapshotResultType.hpp"
153
183
 
154
184
  namespace margelo::nitro::rngooglemapsplus {
155
185
 
@@ -666,6 +696,44 @@ namespace margelo::nitro::rngooglemapsplus {
666
696
  static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string__RNLatLng::javaobject> /* onMarkerDragEnd */)>("setOnMarkerDragEnd_cxx");
667
697
  method(_javaPart, onMarkerDragEnd.has_value() ? JFunc_void_std__optional_std__string__RNLatLng_cxx::fromCpp(onMarkerDragEnd.value()) : nullptr);
668
698
  }
699
+ std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>> JHybridRNGoogleMapsPlusViewSpec::getOnIndoorBuildingFocused() {
700
+ static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNIndoorBuilding::javaobject>()>("getOnIndoorBuildingFocused_cxx");
701
+ auto __result = method(_javaPart);
702
+ return __result != nullptr ? std::make_optional([&]() -> std::function<void(const RNIndoorBuilding& /* indoorBuilding */)> {
703
+ if (__result->isInstanceOf(JFunc_void_RNIndoorBuilding_cxx::javaClassStatic())) [[likely]] {
704
+ auto downcast = jni::static_ref_cast<JFunc_void_RNIndoorBuilding_cxx::javaobject>(__result);
705
+ return downcast->cthis()->getFunction();
706
+ } else {
707
+ auto __resultRef = jni::make_global(__result);
708
+ return [__resultRef](RNIndoorBuilding indoorBuilding) -> void {
709
+ return __resultRef->invoke(indoorBuilding);
710
+ };
711
+ }
712
+ }()) : std::nullopt;
713
+ }
714
+ void JHybridRNGoogleMapsPlusViewSpec::setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) {
715
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNIndoorBuilding::javaobject> /* onIndoorBuildingFocused */)>("setOnIndoorBuildingFocused_cxx");
716
+ method(_javaPart, onIndoorBuildingFocused.has_value() ? JFunc_void_RNIndoorBuilding_cxx::fromCpp(onIndoorBuildingFocused.value()) : nullptr);
717
+ }
718
+ std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> JHybridRNGoogleMapsPlusViewSpec::getOnIndoorLevelActivated() {
719
+ static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNIndoorLevel::javaobject>()>("getOnIndoorLevelActivated_cxx");
720
+ auto __result = method(_javaPart);
721
+ return __result != nullptr ? std::make_optional([&]() -> std::function<void(const RNIndoorLevel& /* indoorLevel */)> {
722
+ if (__result->isInstanceOf(JFunc_void_RNIndoorLevel_cxx::javaClassStatic())) [[likely]] {
723
+ auto downcast = jni::static_ref_cast<JFunc_void_RNIndoorLevel_cxx::javaobject>(__result);
724
+ return downcast->cthis()->getFunction();
725
+ } else {
726
+ auto __resultRef = jni::make_global(__result);
727
+ return [__resultRef](RNIndoorLevel indoorLevel) -> void {
728
+ return __resultRef->invoke(indoorLevel);
729
+ };
730
+ }
731
+ }()) : std::nullopt;
732
+ }
733
+ void JHybridRNGoogleMapsPlusViewSpec::setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) {
734
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNIndoorLevel::javaobject> /* onIndoorLevelActivated */)>("setOnIndoorLevelActivated_cxx");
735
+ method(_javaPart, onIndoorLevelActivated.has_value() ? JFunc_void_RNIndoorLevel_cxx::fromCpp(onIndoorLevelActivated.value()) : nullptr);
736
+ }
669
737
  std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> JHybridRNGoogleMapsPlusViewSpec::getOnCameraChangeStart() {
670
738
  static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNRegion_RNCamera_bool::javaobject>()>("getOnCameraChangeStart_cxx");
671
739
  auto __result = method(_javaPart);
@@ -725,12 +793,12 @@ namespace margelo::nitro::rngooglemapsplus {
725
793
  }
726
794
 
727
795
  // Methods
728
- void JHybridRNGoogleMapsPlusViewSpec::setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) {
729
- static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNCamera> /* camera */, jni::alias_ref<jni::JBoolean> /* animated */, jni::alias_ref<jni::JDouble> /* durationMS */)>("setCamera");
730
- method(_javaPart, JRNCamera::fromCpp(camera), animated.has_value() ? jni::JBoolean::valueOf(animated.value()) : nullptr, durationMS.has_value() ? jni::JDouble::valueOf(durationMS.value()) : nullptr);
796
+ void JHybridRNGoogleMapsPlusViewSpec::setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMs) {
797
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNCamera> /* camera */, jni::alias_ref<jni::JBoolean> /* animated */, jni::alias_ref<jni::JDouble> /* durationMs */)>("setCamera");
798
+ method(_javaPart, JRNCamera::fromCpp(camera), animated.has_value() ? jni::JBoolean::valueOf(animated.value()) : nullptr, durationMs.has_value() ? jni::JDouble::valueOf(durationMs.value()) : nullptr);
731
799
  }
732
- void JHybridRNGoogleMapsPlusViewSpec::setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) {
733
- static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JArrayClass<JRNLatLng>> /* coordinates */, jni::alias_ref<JRNMapPadding> /* padding */, jni::alias_ref<jni::JBoolean> /* animated */, jni::alias_ref<jni::JDouble> /* durationMS */)>("setCameraToCoordinates");
800
+ void JHybridRNGoogleMapsPlusViewSpec::setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMs) {
801
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JArrayClass<JRNLatLng>> /* coordinates */, jni::alias_ref<JRNMapPadding> /* padding */, jni::alias_ref<jni::JBoolean> /* animated */, jni::alias_ref<jni::JDouble> /* durationMs */)>("setCameraToCoordinates");
734
802
  method(_javaPart, [&]() {
735
803
  size_t __size = coordinates.size();
736
804
  jni::local_ref<jni::JArrayClass<JRNLatLng>> __array = jni::JArrayClass<JRNLatLng>::newArray(__size);
@@ -739,7 +807,31 @@ namespace margelo::nitro::rngooglemapsplus {
739
807
  __array->setElement(__i, *JRNLatLng::fromCpp(__element));
740
808
  }
741
809
  return __array;
742
- }(), padding.has_value() ? JRNMapPadding::fromCpp(padding.value()) : nullptr, animated.has_value() ? jni::JBoolean::valueOf(animated.value()) : nullptr, durationMS.has_value() ? jni::JDouble::valueOf(durationMS.value()) : nullptr);
810
+ }(), padding.has_value() ? JRNMapPadding::fromCpp(padding.value()) : nullptr, animated.has_value() ? jni::JBoolean::valueOf(animated.value()) : nullptr, durationMs.has_value() ? jni::JDouble::valueOf(durationMs.value()) : nullptr);
811
+ }
812
+ void JHybridRNGoogleMapsPlusViewSpec::setCameraBounds(const std::optional<RNLatLngBounds>& bounds) {
813
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLatLngBounds> /* bounds */)>("setCameraBounds");
814
+ method(_javaPart, bounds.has_value() ? JRNLatLngBounds::fromCpp(bounds.value()) : nullptr);
815
+ }
816
+ void JHybridRNGoogleMapsPlusViewSpec::animateToBounds(const RNLatLngBounds& bounds, std::optional<double> padding, std::optional<double> durationMs, std::optional<bool> lockBounds) {
817
+ static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLatLngBounds> /* bounds */, jni::alias_ref<jni::JDouble> /* padding */, jni::alias_ref<jni::JDouble> /* durationMs */, jni::alias_ref<jni::JBoolean> /* lockBounds */)>("animateToBounds");
818
+ method(_javaPart, JRNLatLngBounds::fromCpp(bounds), padding.has_value() ? jni::JDouble::valueOf(padding.value()) : nullptr, durationMs.has_value() ? jni::JDouble::valueOf(durationMs.value()) : nullptr, lockBounds.has_value() ? jni::JBoolean::valueOf(lockBounds.value()) : nullptr);
819
+ }
820
+ std::shared_ptr<Promise<std::optional<std::string>>> JHybridRNGoogleMapsPlusViewSpec::snapshot(const RNSnapshotOptions& options) {
821
+ static const auto method = javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<JRNSnapshotOptions> /* options */)>("snapshot");
822
+ auto __result = method(_javaPart, JRNSnapshotOptions::fromCpp(options));
823
+ return [&]() {
824
+ auto __promise = Promise<std::optional<std::string>>::create();
825
+ __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
826
+ auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
827
+ __promise->resolve(__result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt);
828
+ });
829
+ __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
830
+ jni::JniException __jniError(__throwable);
831
+ __promise->reject(std::make_exception_ptr(__jniError));
832
+ });
833
+ return __promise;
834
+ }();
743
835
  }
744
836
  void JHybridRNGoogleMapsPlusViewSpec::showLocationDialog() {
745
837
  static const auto method = javaClassStatic()->getMethod<void()>("showLocationDialog");
@@ -109,6 +109,10 @@ namespace margelo::nitro::rngooglemapsplus {
109
109
  void setOnMarkerDrag(const std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>& onMarkerDrag) override;
110
110
  std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>> getOnMarkerDragEnd() override;
111
111
  void setOnMarkerDragEnd(const std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>& onMarkerDragEnd) override;
112
+ std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>> getOnIndoorBuildingFocused() override;
113
+ void setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) override;
114
+ std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> getOnIndoorLevelActivated() override;
115
+ void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) override;
112
116
  std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() override;
113
117
  void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) override;
114
118
  std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() override;
@@ -118,8 +122,11 @@ namespace margelo::nitro::rngooglemapsplus {
118
122
 
119
123
  public:
120
124
  // Methods
121
- void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) override;
122
- void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) override;
125
+ void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMs) override;
126
+ void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMs) override;
127
+ void setCameraBounds(const std::optional<RNLatLngBounds>& bounds) override;
128
+ void animateToBounds(const RNLatLngBounds& bounds, std::optional<double> padding, std::optional<double> durationMs, std::optional<bool> lockBounds) override;
129
+ std::shared_ptr<Promise<std::optional<std::string>>> snapshot(const RNSnapshotOptions& options) override;
123
130
  void showLocationDialog() override;
124
131
  void openLocationSettings() override;
125
132
  std::shared_ptr<Promise<RNLocationPermissionResult>> requestLocationPermission() override;
@@ -0,0 +1,86 @@
1
+ ///
2
+ /// JRNIndoorBuilding.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 "RNIndoorBuilding.hpp"
12
+
13
+ #include "JRNIndoorLevel.hpp"
14
+ #include "RNIndoorLevel.hpp"
15
+ #include <optional>
16
+ #include <string>
17
+ #include <vector>
18
+
19
+ namespace margelo::nitro::rngooglemapsplus {
20
+
21
+ using namespace facebook;
22
+
23
+ /**
24
+ * The C++ JNI bridge between the C++ struct "RNIndoorBuilding" and the the Kotlin data class "RNIndoorBuilding".
25
+ */
26
+ struct JRNIndoorBuilding final: public jni::JavaClass<JRNIndoorBuilding> {
27
+ public:
28
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNIndoorBuilding;";
29
+
30
+ public:
31
+ /**
32
+ * Convert this Java/Kotlin-based struct to the C++ struct RNIndoorBuilding by copying all values to C++.
33
+ */
34
+ [[maybe_unused]]
35
+ [[nodiscard]]
36
+ RNIndoorBuilding toCpp() const {
37
+ static const auto clazz = javaClassStatic();
38
+ static const auto fieldActiveLevelIndex = clazz->getField<jni::JDouble>("activeLevelIndex");
39
+ jni::local_ref<jni::JDouble> activeLevelIndex = this->getFieldValue(fieldActiveLevelIndex);
40
+ static const auto fieldDefaultLevelIndex = clazz->getField<jni::JDouble>("defaultLevelIndex");
41
+ jni::local_ref<jni::JDouble> defaultLevelIndex = this->getFieldValue(fieldDefaultLevelIndex);
42
+ static const auto fieldLevels = clazz->getField<jni::JArrayClass<JRNIndoorLevel>>("levels");
43
+ jni::local_ref<jni::JArrayClass<JRNIndoorLevel>> levels = this->getFieldValue(fieldLevels);
44
+ static const auto fieldUnderground = clazz->getField<jni::JBoolean>("underground");
45
+ jni::local_ref<jni::JBoolean> underground = this->getFieldValue(fieldUnderground);
46
+ return RNIndoorBuilding(
47
+ activeLevelIndex != nullptr ? std::make_optional(activeLevelIndex->value()) : std::nullopt,
48
+ defaultLevelIndex != nullptr ? std::make_optional(defaultLevelIndex->value()) : std::nullopt,
49
+ [&]() {
50
+ size_t __size = levels->size();
51
+ std::vector<RNIndoorLevel> __vector;
52
+ __vector.reserve(__size);
53
+ for (size_t __i = 0; __i < __size; __i++) {
54
+ auto __element = levels->getElement(__i);
55
+ __vector.push_back(__element->toCpp());
56
+ }
57
+ return __vector;
58
+ }(),
59
+ underground != nullptr ? std::make_optional(static_cast<bool>(underground->value())) : std::nullopt
60
+ );
61
+ }
62
+
63
+ public:
64
+ /**
65
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
66
+ */
67
+ [[maybe_unused]]
68
+ static jni::local_ref<JRNIndoorBuilding::javaobject> fromCpp(const RNIndoorBuilding& value) {
69
+ return newInstance(
70
+ value.activeLevelIndex.has_value() ? jni::JDouble::valueOf(value.activeLevelIndex.value()) : nullptr,
71
+ value.defaultLevelIndex.has_value() ? jni::JDouble::valueOf(value.defaultLevelIndex.value()) : nullptr,
72
+ [&]() {
73
+ size_t __size = value.levels.size();
74
+ jni::local_ref<jni::JArrayClass<JRNIndoorLevel>> __array = jni::JArrayClass<JRNIndoorLevel>::newArray(__size);
75
+ for (size_t __i = 0; __i < __size; __i++) {
76
+ const auto& __element = value.levels[__i];
77
+ __array->setElement(__i, *JRNIndoorLevel::fromCpp(__element));
78
+ }
79
+ return __array;
80
+ }(),
81
+ value.underground.has_value() ? jni::JBoolean::valueOf(value.underground.value()) : nullptr
82
+ );
83
+ }
84
+ };
85
+
86
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,66 @@
1
+ ///
2
+ /// JRNIndoorLevel.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 "RNIndoorLevel.hpp"
12
+
13
+ #include <optional>
14
+ #include <string>
15
+
16
+ namespace margelo::nitro::rngooglemapsplus {
17
+
18
+ using namespace facebook;
19
+
20
+ /**
21
+ * The C++ JNI bridge between the C++ struct "RNIndoorLevel" and the the Kotlin data class "RNIndoorLevel".
22
+ */
23
+ struct JRNIndoorLevel final: public jni::JavaClass<JRNIndoorLevel> {
24
+ public:
25
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNIndoorLevel;";
26
+
27
+ public:
28
+ /**
29
+ * Convert this Java/Kotlin-based struct to the C++ struct RNIndoorLevel by copying all values to C++.
30
+ */
31
+ [[maybe_unused]]
32
+ [[nodiscard]]
33
+ RNIndoorLevel toCpp() const {
34
+ static const auto clazz = javaClassStatic();
35
+ static const auto fieldIndex = clazz->getField<double>("index");
36
+ double index = this->getFieldValue(fieldIndex);
37
+ static const auto fieldName = clazz->getField<jni::JString>("name");
38
+ jni::local_ref<jni::JString> name = this->getFieldValue(fieldName);
39
+ static const auto fieldShortName = clazz->getField<jni::JString>("shortName");
40
+ jni::local_ref<jni::JString> shortName = this->getFieldValue(fieldShortName);
41
+ static const auto fieldActive = clazz->getField<jni::JBoolean>("active");
42
+ jni::local_ref<jni::JBoolean> active = this->getFieldValue(fieldActive);
43
+ return RNIndoorLevel(
44
+ index,
45
+ name != nullptr ? std::make_optional(name->toStdString()) : std::nullopt,
46
+ shortName != nullptr ? std::make_optional(shortName->toStdString()) : std::nullopt,
47
+ active != nullptr ? std::make_optional(static_cast<bool>(active->value())) : std::nullopt
48
+ );
49
+ }
50
+
51
+ public:
52
+ /**
53
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
54
+ */
55
+ [[maybe_unused]]
56
+ static jni::local_ref<JRNIndoorLevel::javaobject> fromCpp(const RNIndoorLevel& value) {
57
+ return newInstance(
58
+ value.index,
59
+ value.name.has_value() ? jni::make_jstring(value.name.value()) : nullptr,
60
+ value.shortName.has_value() ? jni::make_jstring(value.shortName.value()) : nullptr,
61
+ value.active.has_value() ? jni::JBoolean::valueOf(value.active.value()) : nullptr
62
+ );
63
+ }
64
+ };
65
+
66
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,58 @@
1
+ ///
2
+ /// JRNLatLngBounds.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 "RNLatLngBounds.hpp"
12
+
13
+ #include "JRNLatLng.hpp"
14
+ #include "RNLatLng.hpp"
15
+
16
+ namespace margelo::nitro::rngooglemapsplus {
17
+
18
+ using namespace facebook;
19
+
20
+ /**
21
+ * The C++ JNI bridge between the C++ struct "RNLatLngBounds" and the the Kotlin data class "RNLatLngBounds".
22
+ */
23
+ struct JRNLatLngBounds final: public jni::JavaClass<JRNLatLngBounds> {
24
+ public:
25
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLatLngBounds;";
26
+
27
+ public:
28
+ /**
29
+ * Convert this Java/Kotlin-based struct to the C++ struct RNLatLngBounds by copying all values to C++.
30
+ */
31
+ [[maybe_unused]]
32
+ [[nodiscard]]
33
+ RNLatLngBounds toCpp() const {
34
+ static const auto clazz = javaClassStatic();
35
+ static const auto fieldNorthEast = clazz->getField<JRNLatLng>("northEast");
36
+ jni::local_ref<JRNLatLng> northEast = this->getFieldValue(fieldNorthEast);
37
+ static const auto fieldSouthWest = clazz->getField<JRNLatLng>("southWest");
38
+ jni::local_ref<JRNLatLng> southWest = this->getFieldValue(fieldSouthWest);
39
+ return RNLatLngBounds(
40
+ northEast->toCpp(),
41
+ southWest->toCpp()
42
+ );
43
+ }
44
+
45
+ public:
46
+ /**
47
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
48
+ */
49
+ [[maybe_unused]]
50
+ static jni::local_ref<JRNLatLngBounds::javaobject> fromCpp(const RNLatLngBounds& value) {
51
+ return newInstance(
52
+ JRNLatLng::fromCpp(value.northEast),
53
+ JRNLatLng::fromCpp(value.southWest)
54
+ );
55
+ }
56
+ };
57
+
58
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,57 @@
1
+ ///
2
+ /// JRNSize.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 "RNSize.hpp"
12
+
13
+
14
+
15
+ namespace margelo::nitro::rngooglemapsplus {
16
+
17
+ using namespace facebook;
18
+
19
+ /**
20
+ * The C++ JNI bridge between the C++ struct "RNSize" and the the Kotlin data class "RNSize".
21
+ */
22
+ struct JRNSize final: public jni::JavaClass<JRNSize> {
23
+ public:
24
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSize;";
25
+
26
+ public:
27
+ /**
28
+ * Convert this Java/Kotlin-based struct to the C++ struct RNSize by copying all values to C++.
29
+ */
30
+ [[maybe_unused]]
31
+ [[nodiscard]]
32
+ RNSize toCpp() const {
33
+ static const auto clazz = javaClassStatic();
34
+ static const auto fieldWidth = clazz->getField<double>("width");
35
+ double width = this->getFieldValue(fieldWidth);
36
+ static const auto fieldHeight = clazz->getField<double>("height");
37
+ double height = this->getFieldValue(fieldHeight);
38
+ return RNSize(
39
+ width,
40
+ height
41
+ );
42
+ }
43
+
44
+ public:
45
+ /**
46
+ * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
47
+ */
48
+ [[maybe_unused]]
49
+ static jni::local_ref<JRNSize::javaobject> fromCpp(const RNSize& value) {
50
+ return newInstance(
51
+ value.width,
52
+ value.height
53
+ );
54
+ }
55
+ };
56
+
57
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -0,0 +1,62 @@
1
+ ///
2
+ /// JRNSnapshotFormat.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 "RNSnapshotFormat.hpp"
12
+
13
+ namespace margelo::nitro::rngooglemapsplus {
14
+
15
+ using namespace facebook;
16
+
17
+ /**
18
+ * The C++ JNI bridge between the C++ enum "RNSnapshotFormat" and the the Kotlin enum "RNSnapshotFormat".
19
+ */
20
+ struct JRNSnapshotFormat final: public jni::JavaClass<JRNSnapshotFormat> {
21
+ public:
22
+ static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotFormat;";
23
+
24
+ public:
25
+ /**
26
+ * Convert this Java/Kotlin-based enum to the C++ enum RNSnapshotFormat.
27
+ */
28
+ [[maybe_unused]]
29
+ [[nodiscard]]
30
+ RNSnapshotFormat 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<RNSnapshotFormat>(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<JRNSnapshotFormat> fromCpp(RNSnapshotFormat value) {
43
+ static const auto clazz = javaClassStatic();
44
+ static const auto fieldPNG = clazz->getStaticField<JRNSnapshotFormat>("PNG");
45
+ static const auto fieldJPG = clazz->getStaticField<JRNSnapshotFormat>("JPG");
46
+ static const auto fieldJPEG = clazz->getStaticField<JRNSnapshotFormat>("JPEG");
47
+
48
+ switch (value) {
49
+ case RNSnapshotFormat::PNG:
50
+ return clazz->getStaticFieldValue(fieldPNG);
51
+ case RNSnapshotFormat::JPG:
52
+ return clazz->getStaticFieldValue(fieldJPG);
53
+ case RNSnapshotFormat::JPEG:
54
+ return clazz->getStaticFieldValue(fieldJPEG);
55
+ default:
56
+ std::string stringValue = std::to_string(static_cast<int>(value));
57
+ throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
58
+ }
59
+ }
60
+ };
61
+
62
+ } // namespace margelo::nitro::rngooglemapsplus
@@ -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