react-native-google-maps-plus 1.0.3-dev.1 → 1.1.0-dev.1
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 +122 -29
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +44 -44
- package/android/src/main/java/com/rngooglemapsplus/{MapCircle.kt → MapCircleBuilder.kt} +2 -12
- package/android/src/main/java/com/rngooglemapsplus/{MapMarker.kt → MapMarkerBuilder.kt} +1 -1
- package/android/src/main/java/com/rngooglemapsplus/{MapPolygon.kt → MapPolygonBuilder.kt} +2 -18
- package/android/src/main/java/com/rngooglemapsplus/{MapPolyline.kt → MapPolylineBuilder.kt.kt} +2 -19
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +43 -54
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +19 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLocationPriorityExtension.kt +12 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNMapCircleExtension.kt +14 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolygonExtension.kt +20 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolylineExtension.kt +21 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNUserInterfaceExtension.kt +12 -0
- package/android/src/main/java/com/rngooglemapsplus/{Color.kt → extensions/StringExtension.kt} +1 -1
- package/android/src/main/java/com/rngooglemapsplus/extensions/ThrowableExtension.kt +38 -0
- package/ios/GoogleMapViewImpl.swift +165 -22
- package/ios/LocationHandler.swift +29 -69
- package/ios/MapCircleBuilder.swift +20 -0
- package/ios/{MapMarker.swift → MapMarkerBuilder.swift} +1 -25
- package/ios/MapPolygonBuilder.swift +20 -0
- package/ios/MapPolylineBuilder.swift +24 -0
- package/ios/RNGoogleMapsPlusView.swift +63 -115
- package/ios/extensions/RNCamera+Extension.swift +22 -0
- package/ios/{MapCircle.swift → extensions/RNCircle+Extension.swift} +0 -19
- package/ios/extensions/RNIOSLocationAccuracy+Extensions.swift +19 -0
- package/ios/extensions/RNMarker+Extension.swift +24 -0
- package/ios/{MapPolygon.swift → extensions/RNPolygon+Extension.swift.swift} +0 -19
- package/ios/{MapPolyline.swift → extensions/RNPolyline+Extension.swift.swift} +16 -39
- package/ios/extensions/RNUserInterface+Extension.swift +16 -0
- package/lib/module/types.js +14 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +5 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +39 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +60 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +8 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +63 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPriority.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNIOSLocationAccuracy.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNInitialProps.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +93 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +16 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationConfig.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPriority.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationAccuracy.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +59 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +108 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +46 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +20 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +82 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationConfig.swift +93 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPriority.swift +48 -0
- package/nitrogen/generated/ios/swift/RNIOSLocationAccuracy.swift +48 -0
- package/nitrogen/generated/ios/swift/RNIOSLocationConfig.swift +70 -0
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +6 -6
- package/nitrogen/generated/ios/swift/RNLocationConfig.swift +84 -0
- package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +277 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +8 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +14 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationConfig.hpp +77 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPriority.hpp +64 -0
- package/nitrogen/generated/shared/c++/RNIOSLocationAccuracy.hpp +64 -0
- package/nitrogen/generated/shared/c++/RNIOSLocationConfig.hpp +73 -0
- package/nitrogen/generated/shared/c++/RNInitialProps.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNLocationConfig.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +107 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +48 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +6 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +4 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +6 -0
- package/src/types.ts +44 -1
- /package/ios/{Color.swift → extensions/String+Extensions.swift} +0 -0
|
@@ -13,6 +13,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
|
13
13
|
namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
|
|
14
14
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
15
15
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
16
|
+
// Forward declaration of `RNMapUiSettings` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMapUiSettings; }
|
|
16
18
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
17
19
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
18
20
|
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
@@ -33,6 +35,16 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNLineCapType; }
|
|
|
33
35
|
namespace margelo::nitro::rngooglemapsplus { enum class RNLineJoinType; }
|
|
34
36
|
// Forward declaration of `RNCircle` to properly resolve imports.
|
|
35
37
|
namespace margelo::nitro::rngooglemapsplus { struct RNCircle; }
|
|
38
|
+
// Forward declaration of `RNLocationConfig` to properly resolve imports.
|
|
39
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
|
|
40
|
+
// Forward declaration of `RNAndroidLocationConfig` to properly resolve imports.
|
|
41
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNAndroidLocationConfig; }
|
|
42
|
+
// Forward declaration of `RNAndroidLocationPriority` to properly resolve imports.
|
|
43
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPriority; }
|
|
44
|
+
// Forward declaration of `RNIOSLocationConfig` to properly resolve imports.
|
|
45
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNIOSLocationConfig; }
|
|
46
|
+
// Forward declaration of `RNIOSLocationAccuracy` to properly resolve imports.
|
|
47
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNIOSLocationAccuracy; }
|
|
36
48
|
// Forward declaration of `RNMapErrorCode` to properly resolve imports.
|
|
37
49
|
namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
|
|
38
50
|
// Forward declaration of `RNLocation` to properly resolve imports.
|
|
@@ -56,6 +68,8 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
|
56
68
|
#include "JRNCamera.hpp"
|
|
57
69
|
#include "RNLatLng.hpp"
|
|
58
70
|
#include "JRNLatLng.hpp"
|
|
71
|
+
#include "RNMapUiSettings.hpp"
|
|
72
|
+
#include "JRNMapUiSettings.hpp"
|
|
59
73
|
#include "RNUserInterfaceStyle.hpp"
|
|
60
74
|
#include "JRNUserInterfaceStyle.hpp"
|
|
61
75
|
#include "RNMapPadding.hpp"
|
|
@@ -77,6 +91,16 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
|
77
91
|
#include "JRNLineJoinType.hpp"
|
|
78
92
|
#include "RNCircle.hpp"
|
|
79
93
|
#include "JRNCircle.hpp"
|
|
94
|
+
#include "RNLocationConfig.hpp"
|
|
95
|
+
#include "JRNLocationConfig.hpp"
|
|
96
|
+
#include "RNAndroidLocationConfig.hpp"
|
|
97
|
+
#include "JRNAndroidLocationConfig.hpp"
|
|
98
|
+
#include "RNAndroidLocationPriority.hpp"
|
|
99
|
+
#include "JRNAndroidLocationPriority.hpp"
|
|
100
|
+
#include "RNIOSLocationConfig.hpp"
|
|
101
|
+
#include "JRNIOSLocationConfig.hpp"
|
|
102
|
+
#include "RNIOSLocationAccuracy.hpp"
|
|
103
|
+
#include "JRNIOSLocationAccuracy.hpp"
|
|
80
104
|
#include "RNMapErrorCode.hpp"
|
|
81
105
|
#include <functional>
|
|
82
106
|
#include "JFunc_void_RNMapErrorCode.hpp"
|
|
@@ -134,6 +158,24 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
134
158
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNInitialProps> /* initialProps */)>("setInitialProps");
|
|
135
159
|
method(_javaPart, initialProps.has_value() ? JRNInitialProps::fromCpp(initialProps.value()) : nullptr);
|
|
136
160
|
}
|
|
161
|
+
std::optional<RNMapUiSettings> JHybridRNGoogleMapsPlusViewSpec::getUiSettings() {
|
|
162
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JRNMapUiSettings>()>("getUiSettings");
|
|
163
|
+
auto __result = method(_javaPart);
|
|
164
|
+
return __result != nullptr ? std::make_optional(__result->toCpp()) : std::nullopt;
|
|
165
|
+
}
|
|
166
|
+
void JHybridRNGoogleMapsPlusViewSpec::setUiSettings(const std::optional<RNMapUiSettings>& uiSettings) {
|
|
167
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNMapUiSettings> /* uiSettings */)>("setUiSettings");
|
|
168
|
+
method(_javaPart, uiSettings.has_value() ? JRNMapUiSettings::fromCpp(uiSettings.value()) : nullptr);
|
|
169
|
+
}
|
|
170
|
+
std::optional<bool> JHybridRNGoogleMapsPlusViewSpec::getMyLocationEnabled() {
|
|
171
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getMyLocationEnabled");
|
|
172
|
+
auto __result = method(_javaPart);
|
|
173
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
174
|
+
}
|
|
175
|
+
void JHybridRNGoogleMapsPlusViewSpec::setMyLocationEnabled(std::optional<bool> myLocationEnabled) {
|
|
176
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* myLocationEnabled */)>("setMyLocationEnabled");
|
|
177
|
+
method(_javaPart, myLocationEnabled.has_value() ? jni::JBoolean::valueOf(myLocationEnabled.value()) : nullptr);
|
|
178
|
+
}
|
|
137
179
|
std::optional<bool> JHybridRNGoogleMapsPlusViewSpec::getBuildingEnabled() {
|
|
138
180
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getBuildingEnabled");
|
|
139
181
|
auto __result = method(_javaPart);
|
|
@@ -152,6 +194,15 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
152
194
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* trafficEnabled */)>("setTrafficEnabled");
|
|
153
195
|
method(_javaPart, trafficEnabled.has_value() ? jni::JBoolean::valueOf(trafficEnabled.value()) : nullptr);
|
|
154
196
|
}
|
|
197
|
+
std::optional<bool> JHybridRNGoogleMapsPlusViewSpec::getIndoorEnabled() {
|
|
198
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JBoolean>()>("getIndoorEnabled");
|
|
199
|
+
auto __result = method(_javaPart);
|
|
200
|
+
return __result != nullptr ? std::make_optional(static_cast<bool>(__result->value())) : std::nullopt;
|
|
201
|
+
}
|
|
202
|
+
void JHybridRNGoogleMapsPlusViewSpec::setIndoorEnabled(std::optional<bool> indoorEnabled) {
|
|
203
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JBoolean> /* indoorEnabled */)>("setIndoorEnabled");
|
|
204
|
+
method(_javaPart, indoorEnabled.has_value() ? jni::JBoolean::valueOf(indoorEnabled.value()) : nullptr);
|
|
205
|
+
}
|
|
155
206
|
std::optional<std::string> JHybridRNGoogleMapsPlusViewSpec::getCustomMapStyle() {
|
|
156
207
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getCustomMapStyle");
|
|
157
208
|
auto __result = method(_javaPart);
|
|
@@ -310,6 +361,15 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
310
361
|
return __array;
|
|
311
362
|
}() : nullptr);
|
|
312
363
|
}
|
|
364
|
+
std::optional<RNLocationConfig> JHybridRNGoogleMapsPlusViewSpec::getLocationConfig() {
|
|
365
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JRNLocationConfig>()>("getLocationConfig");
|
|
366
|
+
auto __result = method(_javaPart);
|
|
367
|
+
return __result != nullptr ? std::make_optional(__result->toCpp()) : std::nullopt;
|
|
368
|
+
}
|
|
369
|
+
void JHybridRNGoogleMapsPlusViewSpec::setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) {
|
|
370
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocationConfig> /* locationConfig */)>("setLocationConfig");
|
|
371
|
+
method(_javaPart, locationConfig.has_value() ? JRNLocationConfig::fromCpp(locationConfig.value()) : nullptr);
|
|
372
|
+
}
|
|
313
373
|
std::optional<std::function<void(RNMapErrorCode /* error */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMapError() {
|
|
314
374
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNMapErrorCode::javaobject>()>("getOnMapError_cxx");
|
|
315
375
|
auto __result = method(_javaPart);
|
|
@@ -51,10 +51,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
51
51
|
// Properties
|
|
52
52
|
std::optional<RNInitialProps> getInitialProps() override;
|
|
53
53
|
void setInitialProps(const std::optional<RNInitialProps>& initialProps) override;
|
|
54
|
+
std::optional<RNMapUiSettings> getUiSettings() override;
|
|
55
|
+
void setUiSettings(const std::optional<RNMapUiSettings>& uiSettings) override;
|
|
56
|
+
std::optional<bool> getMyLocationEnabled() override;
|
|
57
|
+
void setMyLocationEnabled(std::optional<bool> myLocationEnabled) override;
|
|
54
58
|
std::optional<bool> getBuildingEnabled() override;
|
|
55
59
|
void setBuildingEnabled(std::optional<bool> buildingEnabled) override;
|
|
56
60
|
std::optional<bool> getTrafficEnabled() override;
|
|
57
61
|
void setTrafficEnabled(std::optional<bool> trafficEnabled) override;
|
|
62
|
+
std::optional<bool> getIndoorEnabled() override;
|
|
63
|
+
void setIndoorEnabled(std::optional<bool> indoorEnabled) override;
|
|
58
64
|
std::optional<std::string> getCustomMapStyle() override;
|
|
59
65
|
void setCustomMapStyle(const std::optional<std::string>& customMapStyle) override;
|
|
60
66
|
std::optional<RNUserInterfaceStyle> getUserInterfaceStyle() override;
|
|
@@ -75,6 +81,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
75
81
|
void setPolylines(const std::optional<std::vector<RNPolyline>>& polylines) override;
|
|
76
82
|
std::optional<std::vector<RNCircle>> getCircles() override;
|
|
77
83
|
void setCircles(const std::optional<std::vector<RNCircle>>& circles) override;
|
|
84
|
+
std::optional<RNLocationConfig> getLocationConfig() override;
|
|
85
|
+
void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) override;
|
|
78
86
|
std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() override;
|
|
79
87
|
void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) override;
|
|
80
88
|
std::optional<std::function<void(bool /* ready */)>> getOnMapReady() override;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNAndroidLocationConfig.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 "RNAndroidLocationConfig.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNAndroidLocationPriority.hpp"
|
|
14
|
+
#include "RNAndroidLocationPriority.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "RNAndroidLocationConfig" and the the Kotlin data class "RNAndroidLocationConfig".
|
|
23
|
+
*/
|
|
24
|
+
struct JRNAndroidLocationConfig final: public jni::JavaClass<JRNAndroidLocationConfig> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNAndroidLocationConfig;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNAndroidLocationConfig by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
RNAndroidLocationConfig toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldPriority = clazz->getField<JRNAndroidLocationPriority>("priority");
|
|
37
|
+
jni::local_ref<JRNAndroidLocationPriority> priority = this->getFieldValue(fieldPriority);
|
|
38
|
+
static const auto fieldInterval = clazz->getField<jni::JDouble>("interval");
|
|
39
|
+
jni::local_ref<jni::JDouble> interval = this->getFieldValue(fieldInterval);
|
|
40
|
+
static const auto fieldMinUpdateInterval = clazz->getField<jni::JDouble>("minUpdateInterval");
|
|
41
|
+
jni::local_ref<jni::JDouble> minUpdateInterval = this->getFieldValue(fieldMinUpdateInterval);
|
|
42
|
+
return RNAndroidLocationConfig(
|
|
43
|
+
priority != nullptr ? std::make_optional(priority->toCpp()) : std::nullopt,
|
|
44
|
+
interval != nullptr ? std::make_optional(interval->value()) : std::nullopt,
|
|
45
|
+
minUpdateInterval != nullptr ? std::make_optional(minUpdateInterval->value()) : std::nullopt
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
52
|
+
*/
|
|
53
|
+
[[maybe_unused]]
|
|
54
|
+
static jni::local_ref<JRNAndroidLocationConfig::javaobject> fromCpp(const RNAndroidLocationConfig& value) {
|
|
55
|
+
return newInstance(
|
|
56
|
+
value.priority.has_value() ? JRNAndroidLocationPriority::fromCpp(value.priority.value()) : nullptr,
|
|
57
|
+
value.interval.has_value() ? jni::JDouble::valueOf(value.interval.value()) : nullptr,
|
|
58
|
+
value.minUpdateInterval.has_value() ? jni::JDouble::valueOf(value.minUpdateInterval.value()) : nullptr
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNAndroidLocationPriority.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 "RNAndroidLocationPriority.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNAndroidLocationPriority" and the the Kotlin enum "RNAndroidLocationPriority".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNAndroidLocationPriority final: public jni::JavaClass<JRNAndroidLocationPriority> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNAndroidLocationPriority;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNAndroidLocationPriority.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNAndroidLocationPriority 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<RNAndroidLocationPriority>(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<JRNAndroidLocationPriority> fromCpp(RNAndroidLocationPriority value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldPRIORITY_HIGH_ACCURACY = clazz->getStaticField<JRNAndroidLocationPriority>("PRIORITY_HIGH_ACCURACY");
|
|
45
|
+
static const auto fieldPRIORITY_BALANCED_POWER_ACCURACY = clazz->getStaticField<JRNAndroidLocationPriority>("PRIORITY_BALANCED_POWER_ACCURACY");
|
|
46
|
+
static const auto fieldPRIORITY_LOW_POWER = clazz->getStaticField<JRNAndroidLocationPriority>("PRIORITY_LOW_POWER");
|
|
47
|
+
static const auto fieldPRIORITY_PASSIVE = clazz->getStaticField<JRNAndroidLocationPriority>("PRIORITY_PASSIVE");
|
|
48
|
+
|
|
49
|
+
switch (value) {
|
|
50
|
+
case RNAndroidLocationPriority::PRIORITY_HIGH_ACCURACY:
|
|
51
|
+
return clazz->getStaticFieldValue(fieldPRIORITY_HIGH_ACCURACY);
|
|
52
|
+
case RNAndroidLocationPriority::PRIORITY_BALANCED_POWER_ACCURACY:
|
|
53
|
+
return clazz->getStaticFieldValue(fieldPRIORITY_BALANCED_POWER_ACCURACY);
|
|
54
|
+
case RNAndroidLocationPriority::PRIORITY_LOW_POWER:
|
|
55
|
+
return clazz->getStaticFieldValue(fieldPRIORITY_LOW_POWER);
|
|
56
|
+
case RNAndroidLocationPriority::PRIORITY_PASSIVE:
|
|
57
|
+
return clazz->getStaticFieldValue(fieldPRIORITY_PASSIVE);
|
|
58
|
+
default:
|
|
59
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
60
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNIOSLocationAccuracy.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 "RNIOSLocationAccuracy.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNIOSLocationAccuracy" and the the Kotlin enum "RNIOSLocationAccuracy".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNIOSLocationAccuracy final: public jni::JavaClass<JRNIOSLocationAccuracy> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNIOSLocationAccuracy;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNIOSLocationAccuracy.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNIOSLocationAccuracy 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<RNIOSLocationAccuracy>(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<JRNIOSLocationAccuracy> fromCpp(RNIOSLocationAccuracy value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldACCURACY_BEST = clazz->getStaticField<JRNIOSLocationAccuracy>("ACCURACY_BEST");
|
|
45
|
+
static const auto fieldACCURACY_NEAREST_TEN_METER = clazz->getStaticField<JRNIOSLocationAccuracy>("ACCURACY_NEAREST_TEN_METER");
|
|
46
|
+
static const auto fieldACCURACY_NEAREST_HUNDRED_METER = clazz->getStaticField<JRNIOSLocationAccuracy>("ACCURACY_NEAREST_HUNDRED_METER");
|
|
47
|
+
static const auto fieldACCURACY_KILOMETER = clazz->getStaticField<JRNIOSLocationAccuracy>("ACCURACY_KILOMETER");
|
|
48
|
+
|
|
49
|
+
switch (value) {
|
|
50
|
+
case RNIOSLocationAccuracy::ACCURACY_BEST:
|
|
51
|
+
return clazz->getStaticFieldValue(fieldACCURACY_BEST);
|
|
52
|
+
case RNIOSLocationAccuracy::ACCURACY_NEAREST_TEN_METER:
|
|
53
|
+
return clazz->getStaticFieldValue(fieldACCURACY_NEAREST_TEN_METER);
|
|
54
|
+
case RNIOSLocationAccuracy::ACCURACY_NEAREST_HUNDRED_METER:
|
|
55
|
+
return clazz->getStaticFieldValue(fieldACCURACY_NEAREST_HUNDRED_METER);
|
|
56
|
+
case RNIOSLocationAccuracy::ACCURACY_KILOMETER:
|
|
57
|
+
return clazz->getStaticFieldValue(fieldACCURACY_KILOMETER);
|
|
58
|
+
default:
|
|
59
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
60
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNIOSLocationConfig.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 "RNIOSLocationConfig.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNIOSLocationAccuracy.hpp"
|
|
14
|
+
#include "RNIOSLocationAccuracy.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "RNIOSLocationConfig" and the the Kotlin data class "RNIOSLocationConfig".
|
|
23
|
+
*/
|
|
24
|
+
struct JRNIOSLocationConfig final: public jni::JavaClass<JRNIOSLocationConfig> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNIOSLocationConfig;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNIOSLocationConfig by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
RNIOSLocationConfig toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldDesiredAccuracy = clazz->getField<JRNIOSLocationAccuracy>("desiredAccuracy");
|
|
37
|
+
jni::local_ref<JRNIOSLocationAccuracy> desiredAccuracy = this->getFieldValue(fieldDesiredAccuracy);
|
|
38
|
+
static const auto fieldDistanceFilterMeters = clazz->getField<jni::JDouble>("distanceFilterMeters");
|
|
39
|
+
jni::local_ref<jni::JDouble> distanceFilterMeters = this->getFieldValue(fieldDistanceFilterMeters);
|
|
40
|
+
return RNIOSLocationConfig(
|
|
41
|
+
desiredAccuracy != nullptr ? std::make_optional(desiredAccuracy->toCpp()) : std::nullopt,
|
|
42
|
+
distanceFilterMeters != nullptr ? std::make_optional(distanceFilterMeters->value()) : std::nullopt
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
/**
|
|
48
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
49
|
+
*/
|
|
50
|
+
[[maybe_unused]]
|
|
51
|
+
static jni::local_ref<JRNIOSLocationConfig::javaobject> fromCpp(const RNIOSLocationConfig& value) {
|
|
52
|
+
return newInstance(
|
|
53
|
+
value.desiredAccuracy.has_value() ? JRNIOSLocationAccuracy::fromCpp(value.desiredAccuracy.value()) : nullptr,
|
|
54
|
+
value.distanceFilterMeters.has_value() ? jni::JDouble::valueOf(value.distanceFilterMeters.value()) : nullptr
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -40,12 +40,12 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
40
40
|
jni::local_ref<jni::JString> mapId = this->getFieldValue(fieldMapId);
|
|
41
41
|
static const auto fieldLiteMode = clazz->getField<jni::JBoolean>("liteMode");
|
|
42
42
|
jni::local_ref<jni::JBoolean> liteMode = this->getFieldValue(fieldLiteMode);
|
|
43
|
-
static const auto
|
|
44
|
-
jni::local_ref<JRNCamera>
|
|
43
|
+
static const auto fieldCamera = clazz->getField<JRNCamera>("camera");
|
|
44
|
+
jni::local_ref<JRNCamera> camera = this->getFieldValue(fieldCamera);
|
|
45
45
|
return RNInitialProps(
|
|
46
46
|
mapId != nullptr ? std::make_optional(mapId->toStdString()) : std::nullopt,
|
|
47
47
|
liteMode != nullptr ? std::make_optional(static_cast<bool>(liteMode->value())) : std::nullopt,
|
|
48
|
-
|
|
48
|
+
camera != nullptr ? std::make_optional(camera->toCpp()) : std::nullopt
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -58,7 +58,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
58
58
|
return newInstance(
|
|
59
59
|
value.mapId.has_value() ? jni::make_jstring(value.mapId.value()) : nullptr,
|
|
60
60
|
value.liteMode.has_value() ? jni::JBoolean::valueOf(value.liteMode.value()) : nullptr,
|
|
61
|
-
value.
|
|
61
|
+
value.camera.has_value() ? JRNCamera::fromCpp(value.camera.value()) : nullptr
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLocationConfig.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 "RNLocationConfig.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNAndroidLocationConfig.hpp"
|
|
14
|
+
#include "JRNAndroidLocationPriority.hpp"
|
|
15
|
+
#include "JRNIOSLocationAccuracy.hpp"
|
|
16
|
+
#include "JRNIOSLocationConfig.hpp"
|
|
17
|
+
#include "RNAndroidLocationConfig.hpp"
|
|
18
|
+
#include "RNAndroidLocationPriority.hpp"
|
|
19
|
+
#include "RNIOSLocationAccuracy.hpp"
|
|
20
|
+
#include "RNIOSLocationConfig.hpp"
|
|
21
|
+
#include <optional>
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The C++ JNI bridge between the C++ struct "RNLocationConfig" and the the Kotlin data class "RNLocationConfig".
|
|
29
|
+
*/
|
|
30
|
+
struct JRNLocationConfig final: public jni::JavaClass<JRNLocationConfig> {
|
|
31
|
+
public:
|
|
32
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLocationConfig;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNLocationConfig by copying all values to C++.
|
|
37
|
+
*/
|
|
38
|
+
[[maybe_unused]]
|
|
39
|
+
[[nodiscard]]
|
|
40
|
+
RNLocationConfig toCpp() const {
|
|
41
|
+
static const auto clazz = javaClassStatic();
|
|
42
|
+
static const auto fieldAndroid = clazz->getField<JRNAndroidLocationConfig>("android");
|
|
43
|
+
jni::local_ref<JRNAndroidLocationConfig> android = this->getFieldValue(fieldAndroid);
|
|
44
|
+
static const auto fieldIos = clazz->getField<JRNIOSLocationConfig>("ios");
|
|
45
|
+
jni::local_ref<JRNIOSLocationConfig> ios = this->getFieldValue(fieldIos);
|
|
46
|
+
return RNLocationConfig(
|
|
47
|
+
android != nullptr ? std::make_optional(android->toCpp()) : std::nullopt,
|
|
48
|
+
ios != nullptr ? std::make_optional(ios->toCpp()) : std::nullopt
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
/**
|
|
54
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
55
|
+
*/
|
|
56
|
+
[[maybe_unused]]
|
|
57
|
+
static jni::local_ref<JRNLocationConfig::javaobject> fromCpp(const RNLocationConfig& value) {
|
|
58
|
+
return newInstance(
|
|
59
|
+
value.android.has_value() ? JRNAndroidLocationConfig::fromCpp(value.android.value()) : nullptr,
|
|
60
|
+
value.ios.has_value() ? JRNIOSLocationConfig::fromCpp(value.ios.value()) : nullptr
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMapUiSettings.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 "RNMapUiSettings.hpp"
|
|
12
|
+
|
|
13
|
+
#include <optional>
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNMapUiSettings" and the the Kotlin data class "RNMapUiSettings".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNMapUiSettings final: public jni::JavaClass<JRNMapUiSettings> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMapUiSettings;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNMapUiSettings by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNMapUiSettings toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldAllGesturesEnabled = clazz->getField<jni::JBoolean>("allGesturesEnabled");
|
|
35
|
+
jni::local_ref<jni::JBoolean> allGesturesEnabled = this->getFieldValue(fieldAllGesturesEnabled);
|
|
36
|
+
static const auto fieldCompassEnabled = clazz->getField<jni::JBoolean>("compassEnabled");
|
|
37
|
+
jni::local_ref<jni::JBoolean> compassEnabled = this->getFieldValue(fieldCompassEnabled);
|
|
38
|
+
static const auto fieldIndoorLevelPickerEnabled = clazz->getField<jni::JBoolean>("indoorLevelPickerEnabled");
|
|
39
|
+
jni::local_ref<jni::JBoolean> indoorLevelPickerEnabled = this->getFieldValue(fieldIndoorLevelPickerEnabled);
|
|
40
|
+
static const auto fieldMapToolbarEnabled = clazz->getField<jni::JBoolean>("mapToolbarEnabled");
|
|
41
|
+
jni::local_ref<jni::JBoolean> mapToolbarEnabled = this->getFieldValue(fieldMapToolbarEnabled);
|
|
42
|
+
static const auto fieldMyLocationButtonEnabled = clazz->getField<jni::JBoolean>("myLocationButtonEnabled");
|
|
43
|
+
jni::local_ref<jni::JBoolean> myLocationButtonEnabled = this->getFieldValue(fieldMyLocationButtonEnabled);
|
|
44
|
+
static const auto fieldRotateEnabled = clazz->getField<jni::JBoolean>("rotateEnabled");
|
|
45
|
+
jni::local_ref<jni::JBoolean> rotateEnabled = this->getFieldValue(fieldRotateEnabled);
|
|
46
|
+
static const auto fieldScrollEnabled = clazz->getField<jni::JBoolean>("scrollEnabled");
|
|
47
|
+
jni::local_ref<jni::JBoolean> scrollEnabled = this->getFieldValue(fieldScrollEnabled);
|
|
48
|
+
static const auto fieldScrollDuringRotateOrZoomEnabled = clazz->getField<jni::JBoolean>("scrollDuringRotateOrZoomEnabled");
|
|
49
|
+
jni::local_ref<jni::JBoolean> scrollDuringRotateOrZoomEnabled = this->getFieldValue(fieldScrollDuringRotateOrZoomEnabled);
|
|
50
|
+
static const auto fieldTiltEnabled = clazz->getField<jni::JBoolean>("tiltEnabled");
|
|
51
|
+
jni::local_ref<jni::JBoolean> tiltEnabled = this->getFieldValue(fieldTiltEnabled);
|
|
52
|
+
static const auto fieldZoomControlsEnabled = clazz->getField<jni::JBoolean>("zoomControlsEnabled");
|
|
53
|
+
jni::local_ref<jni::JBoolean> zoomControlsEnabled = this->getFieldValue(fieldZoomControlsEnabled);
|
|
54
|
+
static const auto fieldZoomGesturesEnabled = clazz->getField<jni::JBoolean>("zoomGesturesEnabled");
|
|
55
|
+
jni::local_ref<jni::JBoolean> zoomGesturesEnabled = this->getFieldValue(fieldZoomGesturesEnabled);
|
|
56
|
+
return RNMapUiSettings(
|
|
57
|
+
allGesturesEnabled != nullptr ? std::make_optional(static_cast<bool>(allGesturesEnabled->value())) : std::nullopt,
|
|
58
|
+
compassEnabled != nullptr ? std::make_optional(static_cast<bool>(compassEnabled->value())) : std::nullopt,
|
|
59
|
+
indoorLevelPickerEnabled != nullptr ? std::make_optional(static_cast<bool>(indoorLevelPickerEnabled->value())) : std::nullopt,
|
|
60
|
+
mapToolbarEnabled != nullptr ? std::make_optional(static_cast<bool>(mapToolbarEnabled->value())) : std::nullopt,
|
|
61
|
+
myLocationButtonEnabled != nullptr ? std::make_optional(static_cast<bool>(myLocationButtonEnabled->value())) : std::nullopt,
|
|
62
|
+
rotateEnabled != nullptr ? std::make_optional(static_cast<bool>(rotateEnabled->value())) : std::nullopt,
|
|
63
|
+
scrollEnabled != nullptr ? std::make_optional(static_cast<bool>(scrollEnabled->value())) : std::nullopt,
|
|
64
|
+
scrollDuringRotateOrZoomEnabled != nullptr ? std::make_optional(static_cast<bool>(scrollDuringRotateOrZoomEnabled->value())) : std::nullopt,
|
|
65
|
+
tiltEnabled != nullptr ? std::make_optional(static_cast<bool>(tiltEnabled->value())) : std::nullopt,
|
|
66
|
+
zoomControlsEnabled != nullptr ? std::make_optional(static_cast<bool>(zoomControlsEnabled->value())) : std::nullopt,
|
|
67
|
+
zoomGesturesEnabled != nullptr ? std::make_optional(static_cast<bool>(zoomGesturesEnabled->value())) : std::nullopt
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public:
|
|
72
|
+
/**
|
|
73
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
74
|
+
*/
|
|
75
|
+
[[maybe_unused]]
|
|
76
|
+
static jni::local_ref<JRNMapUiSettings::javaobject> fromCpp(const RNMapUiSettings& value) {
|
|
77
|
+
return newInstance(
|
|
78
|
+
value.allGesturesEnabled.has_value() ? jni::JBoolean::valueOf(value.allGesturesEnabled.value()) : nullptr,
|
|
79
|
+
value.compassEnabled.has_value() ? jni::JBoolean::valueOf(value.compassEnabled.value()) : nullptr,
|
|
80
|
+
value.indoorLevelPickerEnabled.has_value() ? jni::JBoolean::valueOf(value.indoorLevelPickerEnabled.value()) : nullptr,
|
|
81
|
+
value.mapToolbarEnabled.has_value() ? jni::JBoolean::valueOf(value.mapToolbarEnabled.value()) : nullptr,
|
|
82
|
+
value.myLocationButtonEnabled.has_value() ? jni::JBoolean::valueOf(value.myLocationButtonEnabled.value()) : nullptr,
|
|
83
|
+
value.rotateEnabled.has_value() ? jni::JBoolean::valueOf(value.rotateEnabled.value()) : nullptr,
|
|
84
|
+
value.scrollEnabled.has_value() ? jni::JBoolean::valueOf(value.scrollEnabled.value()) : nullptr,
|
|
85
|
+
value.scrollDuringRotateOrZoomEnabled.has_value() ? jni::JBoolean::valueOf(value.scrollDuringRotateOrZoomEnabled.value()) : nullptr,
|
|
86
|
+
value.tiltEnabled.has_value() ? jni::JBoolean::valueOf(value.tiltEnabled.value()) : nullptr,
|
|
87
|
+
value.zoomControlsEnabled.has_value() ? jni::JBoolean::valueOf(value.zoomControlsEnabled.value()) : nullptr,
|
|
88
|
+
value.zoomGesturesEnabled.has_value() ? jni::JBoolean::valueOf(value.zoomGesturesEnabled.value()) : nullptr
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -40,6 +40,14 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
40
40
|
view->setInitialProps(props.initialProps.value);
|
|
41
41
|
// TODO: Set isDirty = false
|
|
42
42
|
}
|
|
43
|
+
if (props.uiSettings.isDirty) {
|
|
44
|
+
view->setUiSettings(props.uiSettings.value);
|
|
45
|
+
// TODO: Set isDirty = false
|
|
46
|
+
}
|
|
47
|
+
if (props.myLocationEnabled.isDirty) {
|
|
48
|
+
view->setMyLocationEnabled(props.myLocationEnabled.value);
|
|
49
|
+
// TODO: Set isDirty = false
|
|
50
|
+
}
|
|
43
51
|
if (props.buildingEnabled.isDirty) {
|
|
44
52
|
view->setBuildingEnabled(props.buildingEnabled.value);
|
|
45
53
|
// TODO: Set isDirty = false
|
|
@@ -48,6 +56,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
48
56
|
view->setTrafficEnabled(props.trafficEnabled.value);
|
|
49
57
|
// TODO: Set isDirty = false
|
|
50
58
|
}
|
|
59
|
+
if (props.indoorEnabled.isDirty) {
|
|
60
|
+
view->setIndoorEnabled(props.indoorEnabled.value);
|
|
61
|
+
// TODO: Set isDirty = false
|
|
62
|
+
}
|
|
51
63
|
if (props.customMapStyle.isDirty) {
|
|
52
64
|
view->setCustomMapStyle(props.customMapStyle.value);
|
|
53
65
|
// TODO: Set isDirty = false
|
|
@@ -88,6 +100,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
88
100
|
view->setCircles(props.circles.value);
|
|
89
101
|
// TODO: Set isDirty = false
|
|
90
102
|
}
|
|
103
|
+
if (props.locationConfig.isDirty) {
|
|
104
|
+
view->setLocationConfig(props.locationConfig.value);
|
|
105
|
+
// TODO: Set isDirty = false
|
|
106
|
+
}
|
|
91
107
|
if (props.onMapError.isDirty) {
|
|
92
108
|
view->setOnMapError(props.onMapError.value);
|
|
93
109
|
// TODO: Set isDirty = false
|
|
@@ -44,6 +44,18 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
44
44
|
@set:Keep
|
|
45
45
|
abstract var initialProps: RNInitialProps?
|
|
46
46
|
|
|
47
|
+
@get:DoNotStrip
|
|
48
|
+
@get:Keep
|
|
49
|
+
@set:DoNotStrip
|
|
50
|
+
@set:Keep
|
|
51
|
+
abstract var uiSettings: RNMapUiSettings?
|
|
52
|
+
|
|
53
|
+
@get:DoNotStrip
|
|
54
|
+
@get:Keep
|
|
55
|
+
@set:DoNotStrip
|
|
56
|
+
@set:Keep
|
|
57
|
+
abstract var myLocationEnabled: Boolean?
|
|
58
|
+
|
|
47
59
|
@get:DoNotStrip
|
|
48
60
|
@get:Keep
|
|
49
61
|
@set:DoNotStrip
|
|
@@ -56,6 +68,12 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
56
68
|
@set:Keep
|
|
57
69
|
abstract var trafficEnabled: Boolean?
|
|
58
70
|
|
|
71
|
+
@get:DoNotStrip
|
|
72
|
+
@get:Keep
|
|
73
|
+
@set:DoNotStrip
|
|
74
|
+
@set:Keep
|
|
75
|
+
abstract var indoorEnabled: Boolean?
|
|
76
|
+
|
|
59
77
|
@get:DoNotStrip
|
|
60
78
|
@get:Keep
|
|
61
79
|
@set:DoNotStrip
|
|
@@ -116,6 +134,12 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
116
134
|
@set:Keep
|
|
117
135
|
abstract var circles: Array<RNCircle>?
|
|
118
136
|
|
|
137
|
+
@get:DoNotStrip
|
|
138
|
+
@get:Keep
|
|
139
|
+
@set:DoNotStrip
|
|
140
|
+
@set:Keep
|
|
141
|
+
abstract var locationConfig: RNLocationConfig?
|
|
142
|
+
|
|
119
143
|
abstract var onMapError: ((error: RNMapErrorCode) -> Unit)?
|
|
120
144
|
|
|
121
145
|
private var onMapError_cxx: Func_void_RNMapErrorCode?
|