react-native-google-maps-plus 1.7.0-dev.4 → 1.7.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +54 -23
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -8
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
- package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
- package/ios/GoogleMapViewImpl.swift +59 -27
- package/ios/RNGoogleMapsPlusView.swift +20 -0
- package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
- package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
- package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
- package/lib/module/types.js.map +1 -1
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +5 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +5 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +7 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +99 -4
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +10 -0
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
- package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +20 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +15 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +35 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +25 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +5 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +178 -0
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
- package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +10 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -0
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
- package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +60 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +5 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +5 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +5 -0
- package/src/types.ts +7 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotFormat.kt → RNSnapshotFormatExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotResultType.kt → RNSnapshotResultTypeExtension.kt} +0 -0
|
@@ -77,14 +77,14 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorBuilding; }
|
|
|
77
77
|
namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
|
|
78
78
|
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
79
79
|
namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
|
|
80
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
81
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
80
82
|
// Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
|
|
81
83
|
namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
|
|
82
84
|
// Forward declaration of `RNAndroidLocationPermissionResult` to properly resolve imports.
|
|
83
85
|
namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPermissionResult; }
|
|
84
86
|
// Forward declaration of `RNIOSPermissionResult` to properly resolve imports.
|
|
85
87
|
namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
86
|
-
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
87
|
-
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
88
88
|
// Forward declaration of `RNSnapshotOptions` to properly resolve imports.
|
|
89
89
|
namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
|
|
90
90
|
// Forward declaration of `RNSize` to properly resolve imports.
|
|
@@ -179,6 +179,8 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
|
179
179
|
#include "RNRegion.hpp"
|
|
180
180
|
#include "JFunc_void_RNRegion_RNCamera_bool.hpp"
|
|
181
181
|
#include "JRNRegion.hpp"
|
|
182
|
+
#include "RNLatLngBounds.hpp"
|
|
183
|
+
#include "JRNLatLngBounds.hpp"
|
|
182
184
|
#include <NitroModules/Promise.hpp>
|
|
183
185
|
#include <NitroModules/JPromise.hpp>
|
|
184
186
|
#include "RNLocationPermissionResult.hpp"
|
|
@@ -187,8 +189,6 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
|
187
189
|
#include "JRNAndroidLocationPermissionResult.hpp"
|
|
188
190
|
#include "RNIOSPermissionResult.hpp"
|
|
189
191
|
#include "JRNIOSPermissionResult.hpp"
|
|
190
|
-
#include "RNLatLngBounds.hpp"
|
|
191
|
-
#include "JRNLatLngBounds.hpp"
|
|
192
192
|
#include "RNSnapshotOptions.hpp"
|
|
193
193
|
#include "JRNSnapshotOptions.hpp"
|
|
194
194
|
#include "RNSize.hpp"
|
|
@@ -834,6 +834,101 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
834
834
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNIndoorLevel::javaobject> /* onIndoorLevelActivated */)>("setOnIndoorLevelActivated_cxx");
|
|
835
835
|
method(_javaPart, onIndoorLevelActivated.has_value() ? JFunc_void_RNIndoorLevel_cxx::fromCpp(onIndoorLevelActivated.value()) : nullptr);
|
|
836
836
|
}
|
|
837
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowPress() {
|
|
838
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowPress_cxx");
|
|
839
|
+
auto __result = method(_javaPart);
|
|
840
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
841
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
842
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
843
|
+
return downcast->cthis()->getFunction();
|
|
844
|
+
} else {
|
|
845
|
+
auto __resultRef = jni::make_global(__result);
|
|
846
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
847
|
+
return __resultRef->invoke(id);
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
}()) : std::nullopt;
|
|
851
|
+
}
|
|
852
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) {
|
|
853
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowPress */)>("setOnInfoWindowPress_cxx");
|
|
854
|
+
method(_javaPart, onInfoWindowPress.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowPress.value()) : nullptr);
|
|
855
|
+
}
|
|
856
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowClose() {
|
|
857
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowClose_cxx");
|
|
858
|
+
auto __result = method(_javaPart);
|
|
859
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
860
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
861
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
862
|
+
return downcast->cthis()->getFunction();
|
|
863
|
+
} else {
|
|
864
|
+
auto __resultRef = jni::make_global(__result);
|
|
865
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
866
|
+
return __resultRef->invoke(id);
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
}()) : std::nullopt;
|
|
870
|
+
}
|
|
871
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) {
|
|
872
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowClose */)>("setOnInfoWindowClose_cxx");
|
|
873
|
+
method(_javaPart, onInfoWindowClose.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowClose.value()) : nullptr);
|
|
874
|
+
}
|
|
875
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowLongPress() {
|
|
876
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowLongPress_cxx");
|
|
877
|
+
auto __result = method(_javaPart);
|
|
878
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
879
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
880
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
881
|
+
return downcast->cthis()->getFunction();
|
|
882
|
+
} else {
|
|
883
|
+
auto __resultRef = jni::make_global(__result);
|
|
884
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
885
|
+
return __resultRef->invoke(id);
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
}()) : std::nullopt;
|
|
889
|
+
}
|
|
890
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) {
|
|
891
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowLongPress */)>("setOnInfoWindowLongPress_cxx");
|
|
892
|
+
method(_javaPart, onInfoWindowLongPress.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowLongPress.value()) : nullptr);
|
|
893
|
+
}
|
|
894
|
+
std::optional<std::function<void(const RNLocation& /* location */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMyLocationPress() {
|
|
895
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNLocation::javaobject>()>("getOnMyLocationPress_cxx");
|
|
896
|
+
auto __result = method(_javaPart);
|
|
897
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const RNLocation& /* location */)> {
|
|
898
|
+
if (__result->isInstanceOf(JFunc_void_RNLocation_cxx::javaClassStatic())) [[likely]] {
|
|
899
|
+
auto downcast = jni::static_ref_cast<JFunc_void_RNLocation_cxx::javaobject>(__result);
|
|
900
|
+
return downcast->cthis()->getFunction();
|
|
901
|
+
} else {
|
|
902
|
+
auto __resultRef = jni::make_global(__result);
|
|
903
|
+
return [__resultRef](RNLocation location) -> void {
|
|
904
|
+
return __resultRef->invoke(location);
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
}()) : std::nullopt;
|
|
908
|
+
}
|
|
909
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) {
|
|
910
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNLocation::javaobject> /* onMyLocationPress */)>("setOnMyLocationPress_cxx");
|
|
911
|
+
method(_javaPart, onMyLocationPress.has_value() ? JFunc_void_RNLocation_cxx::fromCpp(onMyLocationPress.value()) : nullptr);
|
|
912
|
+
}
|
|
913
|
+
std::optional<std::function<void(bool /* pressed */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMyLocationButtonPress() {
|
|
914
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_bool::javaobject>()>("getOnMyLocationButtonPress_cxx");
|
|
915
|
+
auto __result = method(_javaPart);
|
|
916
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(bool /* pressed */)> {
|
|
917
|
+
if (__result->isInstanceOf(JFunc_void_bool_cxx::javaClassStatic())) [[likely]] {
|
|
918
|
+
auto downcast = jni::static_ref_cast<JFunc_void_bool_cxx::javaobject>(__result);
|
|
919
|
+
return downcast->cthis()->getFunction();
|
|
920
|
+
} else {
|
|
921
|
+
auto __resultRef = jni::make_global(__result);
|
|
922
|
+
return [__resultRef](bool pressed) -> void {
|
|
923
|
+
return __resultRef->invoke(pressed);
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
}()) : std::nullopt;
|
|
927
|
+
}
|
|
928
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) {
|
|
929
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_bool::javaobject> /* onMyLocationButtonPress */)>("setOnMyLocationButtonPress_cxx");
|
|
930
|
+
method(_javaPart, onMyLocationButtonPress.has_value() ? JFunc_void_bool_cxx::fromCpp(onMyLocationButtonPress.value()) : nullptr);
|
|
931
|
+
}
|
|
837
932
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> JHybridRNGoogleMapsPlusViewSpec::getOnCameraChangeStart() {
|
|
838
933
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNRegion_RNCamera_bool::javaobject>()>("getOnCameraChangeStart_cxx");
|
|
839
934
|
auto __result = method(_javaPart);
|
|
@@ -121,6 +121,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
121
121
|
void setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) override;
|
|
122
122
|
std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> getOnIndoorLevelActivated() override;
|
|
123
123
|
void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) override;
|
|
124
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowPress() override;
|
|
125
|
+
void setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) override;
|
|
126
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowClose() override;
|
|
127
|
+
void setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) override;
|
|
128
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowLongPress() override;
|
|
129
|
+
void setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) override;
|
|
130
|
+
std::optional<std::function<void(const RNLocation& /* location */)>> getOnMyLocationPress() override;
|
|
131
|
+
void setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) override;
|
|
132
|
+
std::optional<std::function<void(bool /* pressed */)>> getOnMyLocationButtonPress() override;
|
|
133
|
+
void setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) override;
|
|
124
134
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() override;
|
|
125
135
|
void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) override;
|
|
126
136
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() override;
|
|
@@ -32,13 +32,13 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
32
32
|
[[nodiscard]]
|
|
33
33
|
RNLatLngBounds toCpp() const {
|
|
34
34
|
static const auto clazz = javaClassStatic();
|
|
35
|
-
static const auto
|
|
36
|
-
jni::local_ref<JRNLatLng>
|
|
37
|
-
static const auto
|
|
38
|
-
jni::local_ref<JRNLatLng>
|
|
35
|
+
static const auto fieldSouthwest = clazz->getField<JRNLatLng>("southwest");
|
|
36
|
+
jni::local_ref<JRNLatLng> southwest = this->getFieldValue(fieldSouthwest);
|
|
37
|
+
static const auto fieldNortheast = clazz->getField<JRNLatLng>("northeast");
|
|
38
|
+
jni::local_ref<JRNLatLng> northeast = this->getFieldValue(fieldNortheast);
|
|
39
39
|
return RNLatLngBounds(
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
southwest->toCpp(),
|
|
41
|
+
northeast->toCpp()
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -53,8 +53,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
53
53
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
54
54
|
return create(
|
|
55
55
|
clazz,
|
|
56
|
-
JRNLatLng::fromCpp(value.
|
|
57
|
-
JRNLatLng::fromCpp(value.
|
|
56
|
+
JRNLatLng::fromCpp(value.southwest),
|
|
57
|
+
JRNLatLng::fromCpp(value.northeast)
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
};
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
#include "RNRegion.hpp"
|
|
12
12
|
|
|
13
13
|
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "JRNLatLngBounds.hpp"
|
|
14
15
|
#include "RNLatLng.hpp"
|
|
16
|
+
#include "RNLatLngBounds.hpp"
|
|
15
17
|
|
|
16
18
|
namespace margelo::nitro::rngooglemapsplus {
|
|
17
19
|
|
|
@@ -32,16 +34,22 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
32
34
|
[[nodiscard]]
|
|
33
35
|
RNRegion toCpp() const {
|
|
34
36
|
static const auto clazz = javaClassStatic();
|
|
35
|
-
static const auto
|
|
36
|
-
jni::local_ref<JRNLatLng>
|
|
37
|
-
static const auto
|
|
38
|
-
|
|
39
|
-
static const auto
|
|
40
|
-
|
|
37
|
+
static const auto fieldNearLeft = clazz->getField<JRNLatLng>("nearLeft");
|
|
38
|
+
jni::local_ref<JRNLatLng> nearLeft = this->getFieldValue(fieldNearLeft);
|
|
39
|
+
static const auto fieldNearRight = clazz->getField<JRNLatLng>("nearRight");
|
|
40
|
+
jni::local_ref<JRNLatLng> nearRight = this->getFieldValue(fieldNearRight);
|
|
41
|
+
static const auto fieldFarLeft = clazz->getField<JRNLatLng>("farLeft");
|
|
42
|
+
jni::local_ref<JRNLatLng> farLeft = this->getFieldValue(fieldFarLeft);
|
|
43
|
+
static const auto fieldFarRight = clazz->getField<JRNLatLng>("farRight");
|
|
44
|
+
jni::local_ref<JRNLatLng> farRight = this->getFieldValue(fieldFarRight);
|
|
45
|
+
static const auto fieldLatLngBounds = clazz->getField<JRNLatLngBounds>("latLngBounds");
|
|
46
|
+
jni::local_ref<JRNLatLngBounds> latLngBounds = this->getFieldValue(fieldLatLngBounds);
|
|
41
47
|
return RNRegion(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
nearLeft->toCpp(),
|
|
49
|
+
nearRight->toCpp(),
|
|
50
|
+
farLeft->toCpp(),
|
|
51
|
+
farRight->toCpp(),
|
|
52
|
+
latLngBounds->toCpp()
|
|
45
53
|
);
|
|
46
54
|
}
|
|
47
55
|
|
|
@@ -51,14 +59,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
51
59
|
*/
|
|
52
60
|
[[maybe_unused]]
|
|
53
61
|
static jni::local_ref<JRNRegion::javaobject> fromCpp(const RNRegion& value) {
|
|
54
|
-
using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>,
|
|
62
|
+
using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLngBounds>);
|
|
55
63
|
static const auto clazz = javaClassStatic();
|
|
56
64
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
57
65
|
return create(
|
|
58
66
|
clazz,
|
|
59
|
-
JRNLatLng::fromCpp(value.
|
|
60
|
-
value.
|
|
61
|
-
value.
|
|
67
|
+
JRNLatLng::fromCpp(value.nearLeft),
|
|
68
|
+
JRNLatLng::fromCpp(value.nearRight),
|
|
69
|
+
JRNLatLng::fromCpp(value.farLeft),
|
|
70
|
+
JRNLatLng::fromCpp(value.farRight),
|
|
71
|
+
JRNLatLngBounds::fromCpp(value.latLngBounds)
|
|
62
72
|
);
|
|
63
73
|
}
|
|
64
74
|
};
|
|
@@ -180,6 +180,26 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
180
180
|
view->setOnIndoorLevelActivated(props.onIndoorLevelActivated.value);
|
|
181
181
|
// TODO: Set isDirty = false
|
|
182
182
|
}
|
|
183
|
+
if (props.onInfoWindowPress.isDirty) {
|
|
184
|
+
view->setOnInfoWindowPress(props.onInfoWindowPress.value);
|
|
185
|
+
// TODO: Set isDirty = false
|
|
186
|
+
}
|
|
187
|
+
if (props.onInfoWindowClose.isDirty) {
|
|
188
|
+
view->setOnInfoWindowClose(props.onInfoWindowClose.value);
|
|
189
|
+
// TODO: Set isDirty = false
|
|
190
|
+
}
|
|
191
|
+
if (props.onInfoWindowLongPress.isDirty) {
|
|
192
|
+
view->setOnInfoWindowLongPress(props.onInfoWindowLongPress.value);
|
|
193
|
+
// TODO: Set isDirty = false
|
|
194
|
+
}
|
|
195
|
+
if (props.onMyLocationPress.isDirty) {
|
|
196
|
+
view->setOnMyLocationPress(props.onMyLocationPress.value);
|
|
197
|
+
// TODO: Set isDirty = false
|
|
198
|
+
}
|
|
199
|
+
if (props.onMyLocationButtonPress.isDirty) {
|
|
200
|
+
view->setOnMyLocationButtonPress(props.onMyLocationButtonPress.value);
|
|
201
|
+
// TODO: Set isDirty = false
|
|
202
|
+
}
|
|
183
203
|
if (props.onCameraChangeStart.isDirty) {
|
|
184
204
|
view->setOnCameraChangeStart(props.onCameraChangeStart.value);
|
|
185
205
|
// TODO: Set isDirty = false
|
|
@@ -390,6 +390,76 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
390
390
|
onIndoorLevelActivated = value?.let { it }
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
+
abstract var onInfoWindowPress: ((id: String?) -> Unit)?
|
|
394
|
+
|
|
395
|
+
private var onInfoWindowPress_cxx: Func_void_std__optional_std__string_?
|
|
396
|
+
@Keep
|
|
397
|
+
@DoNotStrip
|
|
398
|
+
get() {
|
|
399
|
+
return onInfoWindowPress?.let { Func_void_std__optional_std__string__java(it) }
|
|
400
|
+
}
|
|
401
|
+
@Keep
|
|
402
|
+
@DoNotStrip
|
|
403
|
+
set(value) {
|
|
404
|
+
onInfoWindowPress = value?.let { it }
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
abstract var onInfoWindowClose: ((id: String?) -> Unit)?
|
|
408
|
+
|
|
409
|
+
private var onInfoWindowClose_cxx: Func_void_std__optional_std__string_?
|
|
410
|
+
@Keep
|
|
411
|
+
@DoNotStrip
|
|
412
|
+
get() {
|
|
413
|
+
return onInfoWindowClose?.let { Func_void_std__optional_std__string__java(it) }
|
|
414
|
+
}
|
|
415
|
+
@Keep
|
|
416
|
+
@DoNotStrip
|
|
417
|
+
set(value) {
|
|
418
|
+
onInfoWindowClose = value?.let { it }
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
abstract var onInfoWindowLongPress: ((id: String?) -> Unit)?
|
|
422
|
+
|
|
423
|
+
private var onInfoWindowLongPress_cxx: Func_void_std__optional_std__string_?
|
|
424
|
+
@Keep
|
|
425
|
+
@DoNotStrip
|
|
426
|
+
get() {
|
|
427
|
+
return onInfoWindowLongPress?.let { Func_void_std__optional_std__string__java(it) }
|
|
428
|
+
}
|
|
429
|
+
@Keep
|
|
430
|
+
@DoNotStrip
|
|
431
|
+
set(value) {
|
|
432
|
+
onInfoWindowLongPress = value?.let { it }
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
abstract var onMyLocationPress: ((location: RNLocation) -> Unit)?
|
|
436
|
+
|
|
437
|
+
private var onMyLocationPress_cxx: Func_void_RNLocation?
|
|
438
|
+
@Keep
|
|
439
|
+
@DoNotStrip
|
|
440
|
+
get() {
|
|
441
|
+
return onMyLocationPress?.let { Func_void_RNLocation_java(it) }
|
|
442
|
+
}
|
|
443
|
+
@Keep
|
|
444
|
+
@DoNotStrip
|
|
445
|
+
set(value) {
|
|
446
|
+
onMyLocationPress = value?.let { it }
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
abstract var onMyLocationButtonPress: ((pressed: Boolean) -> Unit)?
|
|
450
|
+
|
|
451
|
+
private var onMyLocationButtonPress_cxx: Func_void_bool?
|
|
452
|
+
@Keep
|
|
453
|
+
@DoNotStrip
|
|
454
|
+
get() {
|
|
455
|
+
return onMyLocationButtonPress?.let { Func_void_bool_java(it) }
|
|
456
|
+
}
|
|
457
|
+
@Keep
|
|
458
|
+
@DoNotStrip
|
|
459
|
+
set(value) {
|
|
460
|
+
onMyLocationButtonPress = value?.let { it }
|
|
461
|
+
}
|
|
462
|
+
|
|
393
463
|
abstract var onCameraChangeStart: ((region: RNRegion, camera: RNCamera, isGesture: Boolean) -> Unit)?
|
|
394
464
|
|
|
395
465
|
private var onCameraChangeStart_cxx: Func_void_RNRegion_RNCamera_bool?
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt
CHANGED
|
@@ -20,10 +20,10 @@ import com.margelo.nitro.core.*
|
|
|
20
20
|
data class RNLatLngBounds(
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
@Keep
|
|
23
|
-
val
|
|
23
|
+
val southwest: RNLatLng,
|
|
24
24
|
@DoNotStrip
|
|
25
25
|
@Keep
|
|
26
|
-
val
|
|
26
|
+
val northeast: RNLatLng
|
|
27
27
|
) {
|
|
28
28
|
private companion object {
|
|
29
29
|
/**
|
|
@@ -33,8 +33,8 @@ data class RNLatLngBounds(
|
|
|
33
33
|
@Keep
|
|
34
34
|
@Suppress("unused")
|
|
35
35
|
@JvmStatic
|
|
36
|
-
private fun fromCpp(
|
|
37
|
-
return RNLatLngBounds(
|
|
36
|
+
private fun fromCpp(southwest: RNLatLng, northeast: RNLatLng): RNLatLngBounds {
|
|
37
|
+
return RNLatLngBounds(southwest, northeast)
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -20,13 +20,19 @@ import com.margelo.nitro.core.*
|
|
|
20
20
|
data class RNRegion(
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
@Keep
|
|
23
|
-
val
|
|
23
|
+
val nearLeft: RNLatLng,
|
|
24
24
|
@DoNotStrip
|
|
25
25
|
@Keep
|
|
26
|
-
val
|
|
26
|
+
val nearRight: RNLatLng,
|
|
27
27
|
@DoNotStrip
|
|
28
28
|
@Keep
|
|
29
|
-
val
|
|
29
|
+
val farLeft: RNLatLng,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val farRight: RNLatLng,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val latLngBounds: RNLatLngBounds
|
|
30
36
|
) {
|
|
31
37
|
private companion object {
|
|
32
38
|
/**
|
|
@@ -36,8 +42,8 @@ data class RNRegion(
|
|
|
36
42
|
@Keep
|
|
37
43
|
@Suppress("unused")
|
|
38
44
|
@JvmStatic
|
|
39
|
-
private fun fromCpp(
|
|
40
|
-
return RNRegion(
|
|
45
|
+
private fun fromCpp(nearLeft: RNLatLng, nearRight: RNLatLng, farLeft: RNLatLng, farRight: RNLatLng, latLngBounds: RNLatLngBounds): RNRegion {
|
|
46
|
+
return RNRegion(nearLeft, nearRight, farLeft, farRight, latLngBounds)
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
@@ -1278,6 +1278,21 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
1278
1278
|
return *optional;
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
|
+
// pragma MARK: std::optional<std::function<void(bool /* pressed */)>>
|
|
1282
|
+
/**
|
|
1283
|
+
* Specialized version of `std::optional<std::function<void(bool / * pressed * /)>>`.
|
|
1284
|
+
*/
|
|
1285
|
+
using std__optional_std__function_void_bool____pressed______ = std::optional<std::function<void(bool /* pressed */)>>;
|
|
1286
|
+
inline std::optional<std::function<void(bool /* pressed */)>> create_std__optional_std__function_void_bool____pressed______(const std::function<void(bool /* pressed */)>& value) noexcept {
|
|
1287
|
+
return std::optional<std::function<void(bool /* pressed */)>>(value);
|
|
1288
|
+
}
|
|
1289
|
+
inline bool has_value_std__optional_std__function_void_bool____pressed______(const std::optional<std::function<void(bool /* pressed */)>>& optional) noexcept {
|
|
1290
|
+
return optional.has_value();
|
|
1291
|
+
}
|
|
1292
|
+
inline std::function<void(bool /* pressed */)> get_std__optional_std__function_void_bool____pressed______(const std::optional<std::function<void(bool /* pressed */)>>& optional) noexcept {
|
|
1293
|
+
return *optional;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1281
1296
|
// pragma MARK: std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>
|
|
1282
1297
|
/**
|
|
1283
1298
|
* Specialized version of `std::function<void(const RNRegion&, const RNCamera&, bool)>`.
|
|
@@ -437,6 +437,41 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
437
437
|
inline void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) noexcept override {
|
|
438
438
|
_swiftPart.setOnIndoorLevelActivated(onIndoorLevelActivated);
|
|
439
439
|
}
|
|
440
|
+
inline std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowPress() noexcept override {
|
|
441
|
+
auto __result = _swiftPart.getOnInfoWindowPress();
|
|
442
|
+
return __result;
|
|
443
|
+
}
|
|
444
|
+
inline void setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) noexcept override {
|
|
445
|
+
_swiftPart.setOnInfoWindowPress(onInfoWindowPress);
|
|
446
|
+
}
|
|
447
|
+
inline std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowClose() noexcept override {
|
|
448
|
+
auto __result = _swiftPart.getOnInfoWindowClose();
|
|
449
|
+
return __result;
|
|
450
|
+
}
|
|
451
|
+
inline void setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) noexcept override {
|
|
452
|
+
_swiftPart.setOnInfoWindowClose(onInfoWindowClose);
|
|
453
|
+
}
|
|
454
|
+
inline std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowLongPress() noexcept override {
|
|
455
|
+
auto __result = _swiftPart.getOnInfoWindowLongPress();
|
|
456
|
+
return __result;
|
|
457
|
+
}
|
|
458
|
+
inline void setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) noexcept override {
|
|
459
|
+
_swiftPart.setOnInfoWindowLongPress(onInfoWindowLongPress);
|
|
460
|
+
}
|
|
461
|
+
inline std::optional<std::function<void(const RNLocation& /* location */)>> getOnMyLocationPress() noexcept override {
|
|
462
|
+
auto __result = _swiftPart.getOnMyLocationPress();
|
|
463
|
+
return __result;
|
|
464
|
+
}
|
|
465
|
+
inline void setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) noexcept override {
|
|
466
|
+
_swiftPart.setOnMyLocationPress(onMyLocationPress);
|
|
467
|
+
}
|
|
468
|
+
inline std::optional<std::function<void(bool /* pressed */)>> getOnMyLocationButtonPress() noexcept override {
|
|
469
|
+
auto __result = _swiftPart.getOnMyLocationButtonPress();
|
|
470
|
+
return __result;
|
|
471
|
+
}
|
|
472
|
+
inline void setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) noexcept override {
|
|
473
|
+
_swiftPart.setOnMyLocationButtonPress(onMyLocationButtonPress);
|
|
474
|
+
}
|
|
440
475
|
inline std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() noexcept override {
|
|
441
476
|
auto __result = _swiftPart.getOnCameraChangeStart();
|
|
442
477
|
return __result;
|
|
@@ -266,6 +266,31 @@ using namespace margelo::nitro::rngooglemapsplus::views;
|
|
|
266
266
|
swiftPart.setOnIndoorLevelActivated(newViewProps.onIndoorLevelActivated.value);
|
|
267
267
|
newViewProps.onIndoorLevelActivated.isDirty = false;
|
|
268
268
|
}
|
|
269
|
+
// onInfoWindowPress: optional
|
|
270
|
+
if (newViewProps.onInfoWindowPress.isDirty) {
|
|
271
|
+
swiftPart.setOnInfoWindowPress(newViewProps.onInfoWindowPress.value);
|
|
272
|
+
newViewProps.onInfoWindowPress.isDirty = false;
|
|
273
|
+
}
|
|
274
|
+
// onInfoWindowClose: optional
|
|
275
|
+
if (newViewProps.onInfoWindowClose.isDirty) {
|
|
276
|
+
swiftPart.setOnInfoWindowClose(newViewProps.onInfoWindowClose.value);
|
|
277
|
+
newViewProps.onInfoWindowClose.isDirty = false;
|
|
278
|
+
}
|
|
279
|
+
// onInfoWindowLongPress: optional
|
|
280
|
+
if (newViewProps.onInfoWindowLongPress.isDirty) {
|
|
281
|
+
swiftPart.setOnInfoWindowLongPress(newViewProps.onInfoWindowLongPress.value);
|
|
282
|
+
newViewProps.onInfoWindowLongPress.isDirty = false;
|
|
283
|
+
}
|
|
284
|
+
// onMyLocationPress: optional
|
|
285
|
+
if (newViewProps.onMyLocationPress.isDirty) {
|
|
286
|
+
swiftPart.setOnMyLocationPress(newViewProps.onMyLocationPress.value);
|
|
287
|
+
newViewProps.onMyLocationPress.isDirty = false;
|
|
288
|
+
}
|
|
289
|
+
// onMyLocationButtonPress: optional
|
|
290
|
+
if (newViewProps.onMyLocationButtonPress.isDirty) {
|
|
291
|
+
swiftPart.setOnMyLocationButtonPress(newViewProps.onMyLocationButtonPress.value);
|
|
292
|
+
newViewProps.onMyLocationButtonPress.isDirty = false;
|
|
293
|
+
}
|
|
269
294
|
// onCameraChangeStart: optional
|
|
270
295
|
if (newViewProps.onCameraChangeStart.isDirty) {
|
|
271
296
|
swiftPart.setOnCameraChangeStart(newViewProps.onCameraChangeStart.value);
|
|
@@ -47,6 +47,11 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
|
|
|
47
47
|
var onMarkerDragEnd: ((_ id: String?, _ location: RNLatLng) -> Void)? { get set }
|
|
48
48
|
var onIndoorBuildingFocused: ((_ indoorBuilding: RNIndoorBuilding) -> Void)? { get set }
|
|
49
49
|
var onIndoorLevelActivated: ((_ indoorLevel: RNIndoorLevel) -> Void)? { get set }
|
|
50
|
+
var onInfoWindowPress: ((_ id: String?) -> Void)? { get set }
|
|
51
|
+
var onInfoWindowClose: ((_ id: String?) -> Void)? { get set }
|
|
52
|
+
var onInfoWindowLongPress: ((_ id: String?) -> Void)? { get set }
|
|
53
|
+
var onMyLocationPress: ((_ location: RNLocation) -> Void)? { get set }
|
|
54
|
+
var onMyLocationButtonPress: ((_ pressed: Bool) -> Void)? { get set }
|
|
50
55
|
var onCameraChangeStart: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
|
|
51
56
|
var onCameraChange: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
|
|
52
57
|
var onCameraChangeComplete: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
|