react-native-google-maps-plus 1.11.1-dev.1 → 1.12.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 +4 -4
- package/android/src/main/java/com/rngooglemapsplus/MapErrorHandler.kt +24 -0
- package/android/src/main/java/com/rngooglemapsplus/MapHelper.kt +0 -13
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +10 -9
- package/android/src/main/java/com/rngooglemapsplus/MapUrlTileOverlayBuilder.kt +4 -2
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +8 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/BitmapExtension.kt +4 -2
- package/ios/GoogleMapViewImpl.swift +5 -1
- package/ios/MapErrorHandler.swift +21 -0
- package/ios/MapHelper.swift +0 -14
- package/ios/MapMarkerBuilder.swift +11 -9
- package/ios/RNGoogleMapsPlusView.swift +7 -3
- package/ios/extensions/UIImage+Extension.swift +3 -2
- package/lib/module/types.js +19 -7
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +2 -2
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +20 -8
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode_std__string.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +10 -10
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -2
- package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +18 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_RNMapErrorCode.kt → Func_void_RNMapErrorCode_std__string.kt} +14 -14
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt +7 -1
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +5 -5
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +19 -19
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/swift/{Func_void_RNMapErrorCode.swift → Func_void_RNMapErrorCode_std__string.swift} +11 -11
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +12 -12
- package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +24 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +7 -1
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +2 -2
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +1 -1
- package/package.json +2 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +2 -2
- package/src/types.ts +25 -7
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +0 -77
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
#include "JHybridRNGoogleMapsPlusModuleSpec.hpp"
|
|
19
19
|
#include "JHybridRNGoogleMapsPlusViewSpec.hpp"
|
|
20
|
-
#include "
|
|
20
|
+
#include "JFunc_void_RNMapErrorCode_std__string.hpp"
|
|
21
21
|
#include "JFunc_void_bool.hpp"
|
|
22
22
|
#include "JFunc_void_RNRegion_RNCamera.hpp"
|
|
23
23
|
#include "JFunc_void_RNLocation.hpp"
|
|
@@ -43,7 +43,7 @@ int initialize(JavaVM* vm) {
|
|
|
43
43
|
// Register native JNI methods
|
|
44
44
|
margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusModuleSpec::registerNatives();
|
|
45
45
|
margelo::nitro::rngooglemapsplus::JHybridRNGoogleMapsPlusViewSpec::registerNatives();
|
|
46
|
-
margelo::nitro::rngooglemapsplus::
|
|
46
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_RNMapErrorCode_std__string_cxx::registerNatives();
|
|
47
47
|
margelo::nitro::rngooglemapsplus::JFunc_void_bool_cxx::registerNatives();
|
|
48
48
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNRegion_RNCamera_cxx::registerNatives();
|
|
49
49
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNLocation_cxx::registerNatives();
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RNMapErrorCode_std__string.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RNMapErrorCode.hpp"
|
|
14
|
+
#include <string>
|
|
15
|
+
#include <functional>
|
|
16
|
+
#include <NitroModules/JNICallable.hpp>
|
|
17
|
+
#include "JRNMapErrorCode.hpp"
|
|
18
|
+
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
20
|
+
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Represents the Java/Kotlin callback `(error: RNMapErrorCode, msg: String) -> Unit`.
|
|
25
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
26
|
+
*/
|
|
27
|
+
struct JFunc_void_RNMapErrorCode_std__string: public jni::JavaClass<JFunc_void_RNMapErrorCode_std__string> {
|
|
28
|
+
public:
|
|
29
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNMapErrorCode_std__string;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
/**
|
|
33
|
+
* Invokes the function this `JFunc_void_RNMapErrorCode_std__string` instance holds through JNI.
|
|
34
|
+
*/
|
|
35
|
+
void invoke(RNMapErrorCode error, const std::string& msg) const {
|
|
36
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNMapErrorCode> /* error */, jni::alias_ref<jni::JString> /* msg */)>("invoke");
|
|
37
|
+
method(self(), JRNMapErrorCode::fromCpp(error), jni::make_jstring(msg));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An implementation of Func_void_RNMapErrorCode_std__string that is backed by a C++ implementation (using `std::function<...>`)
|
|
43
|
+
*/
|
|
44
|
+
class JFunc_void_RNMapErrorCode_std__string_cxx final: public jni::HybridClass<JFunc_void_RNMapErrorCode_std__string_cxx, JFunc_void_RNMapErrorCode_std__string> {
|
|
45
|
+
public:
|
|
46
|
+
static jni::local_ref<JFunc_void_RNMapErrorCode_std__string::javaobject> fromCpp(const std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>& func) {
|
|
47
|
+
return JFunc_void_RNMapErrorCode_std__string_cxx::newObjectCxxArgs(func);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RNMapErrorCode_std__string_cxx` instance holds.
|
|
53
|
+
*/
|
|
54
|
+
void invoke_cxx(jni::alias_ref<JRNMapErrorCode> error, jni::alias_ref<jni::JString> msg) {
|
|
55
|
+
_func(error->toCpp(), msg->toStdString());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
[[nodiscard]]
|
|
60
|
+
inline const std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>& getFunction() const {
|
|
61
|
+
return _func;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public:
|
|
65
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_RNMapErrorCode_std__string_cxx;";
|
|
66
|
+
static void registerNatives() {
|
|
67
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RNMapErrorCode_std__string_cxx::invoke_cxx)});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
explicit JFunc_void_RNMapErrorCode_std__string_cxx(const std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>& func): _func(func) { }
|
|
72
|
+
|
|
73
|
+
private:
|
|
74
|
+
friend HybridBase;
|
|
75
|
+
std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)> _func;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -159,7 +159,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
|
159
159
|
#include "JRNIOSLocationActivityType.hpp"
|
|
160
160
|
#include "RNMapErrorCode.hpp"
|
|
161
161
|
#include <functional>
|
|
162
|
-
#include "
|
|
162
|
+
#include "JFunc_void_RNMapErrorCode_std__string.hpp"
|
|
163
163
|
#include <NitroModules/JNICallable.hpp>
|
|
164
164
|
#include "JRNMapErrorCode.hpp"
|
|
165
165
|
#include "JFunc_void_bool.hpp"
|
|
@@ -543,22 +543,22 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
543
543
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNLocationConfig> /* locationConfig */)>("setLocationConfig");
|
|
544
544
|
method(_javaPart, locationConfig.has_value() ? JRNLocationConfig::fromCpp(locationConfig.value()) : nullptr);
|
|
545
545
|
}
|
|
546
|
-
std::optional<std::function<void(RNMapErrorCode /* error */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMapError() {
|
|
547
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<
|
|
546
|
+
std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMapError() {
|
|
547
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNMapErrorCode_std__string::javaobject>()>("getOnMapError_cxx");
|
|
548
548
|
auto __result = method(_javaPart);
|
|
549
|
-
return __result != nullptr ? std::make_optional([&]() -> std::function<void(RNMapErrorCode /* error */)> {
|
|
550
|
-
if (__result->isInstanceOf(
|
|
551
|
-
auto downcast = jni::static_ref_cast<
|
|
549
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)> {
|
|
550
|
+
if (__result->isInstanceOf(JFunc_void_RNMapErrorCode_std__string_cxx::javaClassStatic())) [[likely]] {
|
|
551
|
+
auto downcast = jni::static_ref_cast<JFunc_void_RNMapErrorCode_std__string_cxx::javaobject>(__result);
|
|
552
552
|
return downcast->cthis()->getFunction();
|
|
553
553
|
} else {
|
|
554
554
|
auto __resultRef = jni::make_global(__result);
|
|
555
|
-
return JNICallable<
|
|
555
|
+
return JNICallable<JFunc_void_RNMapErrorCode_std__string, void(RNMapErrorCode, std::string)>(std::move(__resultRef));
|
|
556
556
|
}
|
|
557
557
|
}()) : std::nullopt;
|
|
558
558
|
}
|
|
559
|
-
void JHybridRNGoogleMapsPlusViewSpec::setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) {
|
|
560
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<
|
|
561
|
-
method(_javaPart, onMapError.has_value() ?
|
|
559
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& onMapError) {
|
|
560
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNMapErrorCode_std__string::javaobject> /* onMapError */)>("setOnMapError_cxx");
|
|
561
|
+
method(_javaPart, onMapError.has_value() ? JFunc_void_RNMapErrorCode_std__string_cxx::fromCpp(onMapError.value()) : nullptr);
|
|
562
562
|
}
|
|
563
563
|
std::optional<std::function<void(bool /* ready */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMapReady() {
|
|
564
564
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_bool::javaobject>()>("getOnMapReady_cxx");
|
|
@@ -90,8 +90,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
90
90
|
void setUrlTileOverlays(const std::optional<std::vector<RNUrlTileOverlay>>& urlTileOverlays) override;
|
|
91
91
|
std::optional<RNLocationConfig> getLocationConfig() override;
|
|
92
92
|
void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) override;
|
|
93
|
-
std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() override;
|
|
94
|
-
void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) override;
|
|
93
|
+
std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> getOnMapError() override;
|
|
94
|
+
void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& onMapError) override;
|
|
95
95
|
std::optional<std::function<void(bool /* ready */)>> getOnMapReady() override;
|
|
96
96
|
void setOnMapReady(const std::optional<std::function<void(bool /* ready */)>>& onMapReady) override;
|
|
97
97
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>> getOnMapLoaded() override;
|
|
@@ -63,6 +63,24 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
63
63
|
case RNMapErrorCode::UNKNOWN:
|
|
64
64
|
static const auto fieldUNKNOWN = clazz->getStaticField<JRNMapErrorCode>("UNKNOWN");
|
|
65
65
|
return clazz->getStaticFieldValue(fieldUNKNOWN);
|
|
66
|
+
case RNMapErrorCode::SNAPSHOT_EXPORT_FAILED:
|
|
67
|
+
static const auto fieldSNAPSHOT_EXPORT_FAILED = clazz->getStaticField<JRNMapErrorCode>("SNAPSHOT_EXPORT_FAILED");
|
|
68
|
+
return clazz->getStaticFieldValue(fieldSNAPSHOT_EXPORT_FAILED);
|
|
69
|
+
case RNMapErrorCode::MARKER_ICON_BUILD_FAILED:
|
|
70
|
+
static const auto fieldMARKER_ICON_BUILD_FAILED = clazz->getStaticField<JRNMapErrorCode>("MARKER_ICON_BUILD_FAILED");
|
|
71
|
+
return clazz->getStaticFieldValue(fieldMARKER_ICON_BUILD_FAILED);
|
|
72
|
+
case RNMapErrorCode::TILE_OVERLAY_FAILED:
|
|
73
|
+
static const auto fieldTILE_OVERLAY_FAILED = clazz->getStaticField<JRNMapErrorCode>("TILE_OVERLAY_FAILED");
|
|
74
|
+
return clazz->getStaticFieldValue(fieldTILE_OVERLAY_FAILED);
|
|
75
|
+
case RNMapErrorCode::INVALID_ARGUMENT:
|
|
76
|
+
static const auto fieldINVALID_ARGUMENT = clazz->getStaticField<JRNMapErrorCode>("INVALID_ARGUMENT");
|
|
77
|
+
return clazz->getStaticFieldValue(fieldINVALID_ARGUMENT);
|
|
78
|
+
case RNMapErrorCode::INTERNAL_EXCEPTION:
|
|
79
|
+
static const auto fieldINTERNAL_EXCEPTION = clazz->getStaticField<JRNMapErrorCode>("INTERNAL_EXCEPTION");
|
|
80
|
+
return clazz->getStaticFieldValue(fieldINTERNAL_EXCEPTION);
|
|
81
|
+
case RNMapErrorCode::KML_LAYER_FAILED:
|
|
82
|
+
static const auto fieldKML_LAYER_FAILED = clazz->getStaticField<JRNMapErrorCode>("KML_LAYER_FAILED");
|
|
83
|
+
return clazz->getStaticFieldValue(fieldKML_LAYER_FAILED);
|
|
66
84
|
default:
|
|
67
85
|
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
68
86
|
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Func_void_RNMapErrorCode_std__string.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
@@ -14,25 +14,25 @@ import dalvik.annotation.optimization.FastNative
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Represents the JavaScript callback `(error: enum) => void`.
|
|
17
|
+
* Represents the JavaScript callback `(error: enum, msg: string) => void`.
|
|
18
18
|
* This can be either implemented in C++ (in which case it might be a callback coming from JS),
|
|
19
19
|
* or in Kotlin/Java (in which case it is a native callback).
|
|
20
20
|
*/
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
@Keep
|
|
23
23
|
@Suppress("ClassName", "RedundantUnitReturnType")
|
|
24
|
-
fun interface
|
|
24
|
+
fun interface Func_void_RNMapErrorCode_std__string: (RNMapErrorCode, String) -> Unit {
|
|
25
25
|
/**
|
|
26
26
|
* Call the given JS callback.
|
|
27
27
|
* @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
|
|
28
28
|
*/
|
|
29
29
|
@DoNotStrip
|
|
30
30
|
@Keep
|
|
31
|
-
override fun invoke(error: RNMapErrorCode): Unit
|
|
31
|
+
override fun invoke(error: RNMapErrorCode, msg: String): Unit
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Represents the JavaScript callback `(error: enum) => void`.
|
|
35
|
+
* Represents the JavaScript callback `(error: enum, msg: string) => void`.
|
|
36
36
|
* This is implemented in C++, via a `std::function<...>`.
|
|
37
37
|
* The callback might be coming from JS.
|
|
38
38
|
*/
|
|
@@ -43,7 +43,7 @@ fun interface Func_void_RNMapErrorCode: (RNMapErrorCode) -> Unit {
|
|
|
43
43
|
"RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
|
|
44
44
|
"ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
|
|
45
45
|
)
|
|
46
|
-
class
|
|
46
|
+
class Func_void_RNMapErrorCode_std__string_cxx: Func_void_RNMapErrorCode_std__string {
|
|
47
47
|
@DoNotStrip
|
|
48
48
|
@Keep
|
|
49
49
|
private val mHybridData: HybridData
|
|
@@ -56,25 +56,25 @@ class Func_void_RNMapErrorCode_cxx: Func_void_RNMapErrorCode {
|
|
|
56
56
|
|
|
57
57
|
@DoNotStrip
|
|
58
58
|
@Keep
|
|
59
|
-
override fun invoke(error: RNMapErrorCode): Unit
|
|
60
|
-
= invoke_cxx(error)
|
|
59
|
+
override fun invoke(error: RNMapErrorCode, msg: String): Unit
|
|
60
|
+
= invoke_cxx(error,msg)
|
|
61
61
|
|
|
62
62
|
@FastNative
|
|
63
|
-
private external fun invoke_cxx(error: RNMapErrorCode): Unit
|
|
63
|
+
private external fun invoke_cxx(error: RNMapErrorCode, msg: String): Unit
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Represents the JavaScript callback `(error: enum) => void`.
|
|
68
|
-
* This is implemented in Java/Kotlin, via a `(RNMapErrorCode) -> Unit`.
|
|
67
|
+
* Represents the JavaScript callback `(error: enum, msg: string) => void`.
|
|
68
|
+
* This is implemented in Java/Kotlin, via a `(RNMapErrorCode, String) -> Unit`.
|
|
69
69
|
* The callback is always coming from native.
|
|
70
70
|
*/
|
|
71
71
|
@DoNotStrip
|
|
72
72
|
@Keep
|
|
73
73
|
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
74
|
-
class
|
|
74
|
+
class Func_void_RNMapErrorCode_std__string_java(private val function: (RNMapErrorCode, String) -> Unit): Func_void_RNMapErrorCode_std__string {
|
|
75
75
|
@DoNotStrip
|
|
76
76
|
@Keep
|
|
77
|
-
override fun invoke(error: RNMapErrorCode): Unit {
|
|
78
|
-
return this.function(error)
|
|
77
|
+
override fun invoke(error: RNMapErrorCode, msg: String): Unit {
|
|
78
|
+
return this.function(error, msg)
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -163,13 +163,13 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
163
163
|
@set:Keep
|
|
164
164
|
abstract var locationConfig: RNLocationConfig?
|
|
165
165
|
|
|
166
|
-
abstract var onMapError: ((error: RNMapErrorCode) -> Unit)?
|
|
166
|
+
abstract var onMapError: ((error: RNMapErrorCode, msg: String) -> Unit)?
|
|
167
167
|
|
|
168
|
-
private var onMapError_cxx:
|
|
168
|
+
private var onMapError_cxx: Func_void_RNMapErrorCode_std__string?
|
|
169
169
|
@Keep
|
|
170
170
|
@DoNotStrip
|
|
171
171
|
get() {
|
|
172
|
-
return onMapError?.let {
|
|
172
|
+
return onMapError?.let { Func_void_RNMapErrorCode_std__string_java(it) }
|
|
173
173
|
}
|
|
174
174
|
@Keep
|
|
175
175
|
@DoNotStrip
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt
CHANGED
|
@@ -22,7 +22,13 @@ enum class RNMapErrorCode(@DoNotStrip @Keep val value: Int) {
|
|
|
22
22
|
PLAY_SERVICES_OUTDATED(3),
|
|
23
23
|
PLAY_SERVICE_UPDATE_AVAILABLE(4),
|
|
24
24
|
PLAY_SERVICE_UPDATING(5),
|
|
25
|
-
UNKNOWN(6)
|
|
25
|
+
UNKNOWN(6),
|
|
26
|
+
SNAPSHOT_EXPORT_FAILED(7),
|
|
27
|
+
MARKER_ICON_BUILD_FAILED(8),
|
|
28
|
+
TILE_OVERLAY_FAILED(9),
|
|
29
|
+
INVALID_ARGUMENT(10),
|
|
30
|
+
INTERNAL_EXCEPTION(11),
|
|
31
|
+
KML_LAYER_FAILED(12);
|
|
26
32
|
|
|
27
33
|
companion object
|
|
28
34
|
}
|
|
@@ -47,11 +47,11 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
47
47
|
return swiftPart.toUnsafe();
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// pragma MARK: std::function<void(RNMapErrorCode /* error */)>
|
|
51
|
-
|
|
52
|
-
auto swiftClosure = RNGoogleMapsPlus::
|
|
53
|
-
return [swiftClosure = std::move(swiftClosure)](RNMapErrorCode error) mutable -> void {
|
|
54
|
-
swiftClosure.call(static_cast<int>(error));
|
|
50
|
+
// pragma MARK: std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>
|
|
51
|
+
Func_void_RNMapErrorCode_std__string create_Func_void_RNMapErrorCode_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
52
|
+
auto swiftClosure = RNGoogleMapsPlus::Func_void_RNMapErrorCode_std__string::fromUnsafe(swiftClosureWrapper);
|
|
53
|
+
return [swiftClosure = std::move(swiftClosure)](RNMapErrorCode error, const std::string& msg) mutable -> void {
|
|
54
|
+
swiftClosure.call(static_cast<int>(error), msg);
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -871,40 +871,40 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
871
871
|
return *optional;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
|
-
// pragma MARK: std::function<void(RNMapErrorCode /* error */)>
|
|
874
|
+
// pragma MARK: std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>
|
|
875
875
|
/**
|
|
876
|
-
* Specialized version of `std::function<void(RNMapErrorCode)>`.
|
|
876
|
+
* Specialized version of `std::function<void(RNMapErrorCode, const std::string&)>`.
|
|
877
877
|
*/
|
|
878
|
-
using
|
|
878
|
+
using Func_void_RNMapErrorCode_std__string = std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>;
|
|
879
879
|
/**
|
|
880
|
-
* Wrapper class for a `std::function<void(RNMapErrorCode / * error * /)>`, this can be used from Swift.
|
|
880
|
+
* Wrapper class for a `std::function<void(RNMapErrorCode / * error * /, const std::string& / * msg * /)>`, this can be used from Swift.
|
|
881
881
|
*/
|
|
882
|
-
class
|
|
882
|
+
class Func_void_RNMapErrorCode_std__string_Wrapper final {
|
|
883
883
|
public:
|
|
884
|
-
explicit
|
|
885
|
-
inline void call(int error) const noexcept {
|
|
886
|
-
_function->operator()(static_cast<RNMapErrorCode>(error));
|
|
884
|
+
explicit Func_void_RNMapErrorCode_std__string_Wrapper(std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>&& func): _function(std::make_unique<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>(std::move(func))) {}
|
|
885
|
+
inline void call(int error, std::string msg) const noexcept {
|
|
886
|
+
_function->operator()(static_cast<RNMapErrorCode>(error), msg);
|
|
887
887
|
}
|
|
888
888
|
private:
|
|
889
|
-
std::unique_ptr<std::function<void(RNMapErrorCode /* error */)>> _function;
|
|
889
|
+
std::unique_ptr<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> _function;
|
|
890
890
|
} SWIFT_NONCOPYABLE;
|
|
891
|
-
|
|
892
|
-
inline
|
|
893
|
-
return
|
|
891
|
+
Func_void_RNMapErrorCode_std__string create_Func_void_RNMapErrorCode_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
892
|
+
inline Func_void_RNMapErrorCode_std__string_Wrapper wrap_Func_void_RNMapErrorCode_std__string(Func_void_RNMapErrorCode_std__string value) noexcept {
|
|
893
|
+
return Func_void_RNMapErrorCode_std__string_Wrapper(std::move(value));
|
|
894
894
|
}
|
|
895
895
|
|
|
896
|
-
// pragma MARK: std::optional<std::function<void(RNMapErrorCode /* error */)>>
|
|
896
|
+
// pragma MARK: std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>
|
|
897
897
|
/**
|
|
898
|
-
* Specialized version of `std::optional<std::function<void(RNMapErrorCode / * error * /)>>`.
|
|
898
|
+
* Specialized version of `std::optional<std::function<void(RNMapErrorCode / * error * /, const std::string& / * msg * /)>>`.
|
|
899
899
|
*/
|
|
900
|
-
using
|
|
901
|
-
inline std::optional<std::function<void(RNMapErrorCode /* error */)>>
|
|
902
|
-
return std::optional<std::function<void(RNMapErrorCode /* error */)>>(value);
|
|
900
|
+
using std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______ = std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>;
|
|
901
|
+
inline std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> create_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______(const std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>& value) noexcept {
|
|
902
|
+
return std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>(value);
|
|
903
903
|
}
|
|
904
|
-
inline bool
|
|
904
|
+
inline bool has_value_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& optional) noexcept {
|
|
905
905
|
return optional.has_value();
|
|
906
906
|
}
|
|
907
|
-
inline std::function<void(RNMapErrorCode /* error */)>
|
|
907
|
+
inline std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)> get_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& optional) noexcept {
|
|
908
908
|
return *optional;
|
|
909
909
|
}
|
|
910
910
|
|
|
@@ -334,11 +334,11 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
334
334
|
inline void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) noexcept override {
|
|
335
335
|
_swiftPart.setLocationConfig(locationConfig);
|
|
336
336
|
}
|
|
337
|
-
inline std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() noexcept override {
|
|
337
|
+
inline std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> getOnMapError() noexcept override {
|
|
338
338
|
auto __result = _swiftPart.getOnMapError();
|
|
339
339
|
return __result;
|
|
340
340
|
}
|
|
341
|
-
inline void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) noexcept override {
|
|
341
|
+
inline void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& onMapError) noexcept override {
|
|
342
342
|
_swiftPart.setOnMapError(onMapError);
|
|
343
343
|
}
|
|
344
344
|
inline std::optional<std::function<void(bool /* ready */)>> getOnMapReady() noexcept override {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Func_void_RNMapErrorCode_std__string.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
@@ -9,21 +9,21 @@ import Foundation
|
|
|
9
9
|
import NitroModules
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Wraps a Swift `(_ error: RNMapErrorCode) -> Void` as a class.
|
|
12
|
+
* Wraps a Swift `(_ error: RNMapErrorCode, _ msg: String) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
14
|
*/
|
|
15
|
-
public final class
|
|
15
|
+
public final class Func_void_RNMapErrorCode_std__string {
|
|
16
16
|
public typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
17
|
|
|
18
|
-
private let closure: (_ error: RNMapErrorCode) -> Void
|
|
18
|
+
private let closure: (_ error: RNMapErrorCode, _ msg: String) -> Void
|
|
19
19
|
|
|
20
|
-
public init(_ closure: @escaping (_ error: RNMapErrorCode) -> Void) {
|
|
20
|
+
public init(_ closure: @escaping (_ error: RNMapErrorCode, _ msg: String) -> Void) {
|
|
21
21
|
self.closure = closure
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@inline(__always)
|
|
25
|
-
public func call(error: Int32) -> Void {
|
|
26
|
-
self.closure(margelo.nitro.rngooglemapsplus.RNMapErrorCode(rawValue: error)
|
|
25
|
+
public func call(error: Int32, msg: std.string) -> Void {
|
|
26
|
+
self.closure(margelo.nitro.rngooglemapsplus.RNMapErrorCode(rawValue: error)!, String(msg))
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -36,12 +36,12 @@ public final class Func_void_RNMapErrorCode {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Casts an unsafe pointer to a `
|
|
40
|
-
* The pointer has to be a retained opaque `Unmanaged<
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_RNMapErrorCode_std__string`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_RNMapErrorCode_std__string>`.
|
|
41
41
|
* This removes one strong reference from the object!
|
|
42
42
|
*/
|
|
43
43
|
@inline(__always)
|
|
44
|
-
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) ->
|
|
45
|
-
return Unmanaged<
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_RNMapErrorCode_std__string {
|
|
45
|
+
return Unmanaged<Func_void_RNMapErrorCode_std__string>.fromOpaque(pointer).takeRetainedValue()
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -31,7 +31,7 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
|
|
|
31
31
|
var kmlLayers: [RNKMLayer]? { get set }
|
|
32
32
|
var urlTileOverlays: [RNUrlTileOverlay]? { get set }
|
|
33
33
|
var locationConfig: RNLocationConfig? { get set }
|
|
34
|
-
var onMapError: ((_ error: RNMapErrorCode) -> Void)? { get set }
|
|
34
|
+
var onMapError: ((_ error: RNMapErrorCode, _ msg: String) -> Void)? { get set }
|
|
35
35
|
var onMapReady: ((_ ready: Bool) -> Void)? { get set }
|
|
36
36
|
var onMapLoaded: ((_ region: RNRegion, _ camera: RNCamera) -> Void)? { get set }
|
|
37
37
|
var onLocationUpdate: ((_ location: RNLocation) -> Void)? { get set }
|
|
@@ -587,14 +587,14 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
public final var onMapError: bridge.
|
|
590
|
+
public final var onMapError: bridge.std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______ {
|
|
591
591
|
@inline(__always)
|
|
592
592
|
get {
|
|
593
|
-
return { () -> bridge.
|
|
593
|
+
return { () -> bridge.std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______ in
|
|
594
594
|
if let __unwrappedValue = self.__implementation.onMapError {
|
|
595
|
-
return bridge.
|
|
596
|
-
let __closureWrapper =
|
|
597
|
-
return bridge.
|
|
595
|
+
return bridge.create_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______({ () -> bridge.Func_void_RNMapErrorCode_std__string in
|
|
596
|
+
let __closureWrapper = Func_void_RNMapErrorCode_std__string(__unwrappedValue)
|
|
597
|
+
return bridge.create_Func_void_RNMapErrorCode_std__string(__closureWrapper.toUnsafe())
|
|
598
598
|
}())
|
|
599
599
|
} else {
|
|
600
600
|
return .init()
|
|
@@ -603,13 +603,13 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
603
603
|
}
|
|
604
604
|
@inline(__always)
|
|
605
605
|
set {
|
|
606
|
-
self.__implementation.onMapError = { () -> ((_ error: RNMapErrorCode) -> Void)? in
|
|
607
|
-
if bridge.
|
|
608
|
-
let __unwrapped = bridge.
|
|
609
|
-
return { () -> (RNMapErrorCode) -> Void in
|
|
610
|
-
let __wrappedFunction = bridge.
|
|
611
|
-
return { (__error: RNMapErrorCode) -> Void in
|
|
612
|
-
__wrappedFunction.call(__error.rawValue)
|
|
606
|
+
self.__implementation.onMapError = { () -> ((_ error: RNMapErrorCode, _ msg: String) -> Void)? in
|
|
607
|
+
if bridge.has_value_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______(newValue) {
|
|
608
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_RNMapErrorCode____error_____const_std__string_____msg______(newValue)
|
|
609
|
+
return { () -> (RNMapErrorCode, String) -> Void in
|
|
610
|
+
let __wrappedFunction = bridge.wrap_Func_void_RNMapErrorCode_std__string(__unwrapped)
|
|
611
|
+
return { (__error: RNMapErrorCode, __msg: String) -> Void in
|
|
612
|
+
__wrappedFunction.call(__error.rawValue, std.string(__msg))
|
|
613
613
|
}
|
|
614
614
|
}()
|
|
615
615
|
} else {
|
|
@@ -31,6 +31,18 @@ public extension RNMapErrorCode {
|
|
|
31
31
|
self = .playServiceUpdating
|
|
32
32
|
case "UNKNOWN":
|
|
33
33
|
self = .unknown
|
|
34
|
+
case "SNAPSHOT_EXPORT_FAILED":
|
|
35
|
+
self = .snapshotExportFailed
|
|
36
|
+
case "MARKER_ICON_BUILD_FAILED":
|
|
37
|
+
self = .markerIconBuildFailed
|
|
38
|
+
case "TILE_OVERLAY_FAILED":
|
|
39
|
+
self = .tileOverlayFailed
|
|
40
|
+
case "INVALID_ARGUMENT":
|
|
41
|
+
self = .invalidArgument
|
|
42
|
+
case "INTERNAL_EXCEPTION":
|
|
43
|
+
self = .internalException
|
|
44
|
+
case "KML_LAYER_FAILED":
|
|
45
|
+
self = .kmlLayerFailed
|
|
34
46
|
default:
|
|
35
47
|
return nil
|
|
36
48
|
}
|
|
@@ -55,6 +67,18 @@ public extension RNMapErrorCode {
|
|
|
55
67
|
return "PLAY_SERVICE_UPDATING"
|
|
56
68
|
case .unknown:
|
|
57
69
|
return "UNKNOWN"
|
|
70
|
+
case .snapshotExportFailed:
|
|
71
|
+
return "SNAPSHOT_EXPORT_FAILED"
|
|
72
|
+
case .markerIconBuildFailed:
|
|
73
|
+
return "MARKER_ICON_BUILD_FAILED"
|
|
74
|
+
case .tileOverlayFailed:
|
|
75
|
+
return "TILE_OVERLAY_FAILED"
|
|
76
|
+
case .invalidArgument:
|
|
77
|
+
return "INVALID_ARGUMENT"
|
|
78
|
+
case .internalException:
|
|
79
|
+
return "INTERNAL_EXCEPTION"
|
|
80
|
+
case .kmlLayerFailed:
|
|
81
|
+
return "KML_LAYER_FAILED"
|
|
58
82
|
}
|
|
59
83
|
}
|
|
60
84
|
}
|
|
@@ -165,8 +165,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
165
165
|
virtual void setUrlTileOverlays(const std::optional<std::vector<RNUrlTileOverlay>>& urlTileOverlays) = 0;
|
|
166
166
|
virtual std::optional<RNLocationConfig> getLocationConfig() = 0;
|
|
167
167
|
virtual void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) = 0;
|
|
168
|
-
virtual std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() = 0;
|
|
169
|
-
virtual void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) = 0;
|
|
168
|
+
virtual std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>> getOnMapError() = 0;
|
|
169
|
+
virtual void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>& onMapError) = 0;
|
|
170
170
|
virtual std::optional<std::function<void(bool /* ready */)>> getOnMapReady() = 0;
|
|
171
171
|
virtual void setOnMapReady(const std::optional<std::function<void(bool /* ready */)>>& onMapReady) = 0;
|
|
172
172
|
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>> getOnMapLoaded() = 0;
|
|
@@ -31,6 +31,12 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
31
31
|
PLAY_SERVICE_UPDATE_AVAILABLE SWIFT_NAME(playServiceUpdateAvailable) = 4,
|
|
32
32
|
PLAY_SERVICE_UPDATING SWIFT_NAME(playServiceUpdating) = 5,
|
|
33
33
|
UNKNOWN SWIFT_NAME(unknown) = 6,
|
|
34
|
+
SNAPSHOT_EXPORT_FAILED SWIFT_NAME(snapshotExportFailed) = 7,
|
|
35
|
+
MARKER_ICON_BUILD_FAILED SWIFT_NAME(markerIconBuildFailed) = 8,
|
|
36
|
+
TILE_OVERLAY_FAILED SWIFT_NAME(tileOverlayFailed) = 9,
|
|
37
|
+
INVALID_ARGUMENT SWIFT_NAME(invalidArgument) = 10,
|
|
38
|
+
INTERNAL_EXCEPTION SWIFT_NAME(internalException) = 11,
|
|
39
|
+
KML_LAYER_FAILED SWIFT_NAME(kmlLayerFailed) = 12,
|
|
34
40
|
} CLOSED_ENUM;
|
|
35
41
|
|
|
36
42
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -60,7 +66,7 @@ namespace margelo::nitro {
|
|
|
60
66
|
return false;
|
|
61
67
|
}
|
|
62
68
|
// Check if we are within the bounds of the enum.
|
|
63
|
-
return integer >= 0 && integer <=
|
|
69
|
+
return integer >= 0 && integer <= 12;
|
|
64
70
|
}
|
|
65
71
|
};
|
|
66
72
|
|
|
@@ -226,12 +226,12 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
226
226
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.locationConfig: ") + exc.what());
|
|
227
227
|
}
|
|
228
228
|
}()),
|
|
229
|
-
onMapError([&]() -> CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>> {
|
|
229
|
+
onMapError([&]() -> CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>> {
|
|
230
230
|
try {
|
|
231
231
|
const react::RawValue* rawValue = rawProps.at("onMapError", nullptr, nullptr);
|
|
232
232
|
if (rawValue == nullptr) return sourceProps.onMapError;
|
|
233
233
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
234
|
-
return CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, PropNameIDCache::get(*runtime, "f")), sourceProps.onMapError);
|
|
234
|
+
return CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, PropNameIDCache::get(*runtime, "f")), sourceProps.onMapError);
|
|
235
235
|
} catch (const std::exception& exc) {
|
|
236
236
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapError: ") + exc.what());
|
|
237
237
|
}
|
|
@@ -86,7 +86,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
86
86
|
CachedProp<std::optional<std::vector<RNKMLayer>>> kmlLayers;
|
|
87
87
|
CachedProp<std::optional<std::vector<RNUrlTileOverlay>>> urlTileOverlays;
|
|
88
88
|
CachedProp<std::optional<RNLocationConfig>> locationConfig;
|
|
89
|
-
CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>> onMapError;
|
|
89
|
+
CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */, const std::string& /* msg */)>>> onMapError;
|
|
90
90
|
CachedProp<std::optional<std::function<void(bool /* ready */)>>> onMapReady;
|
|
91
91
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>> onMapLoaded;
|
|
92
92
|
CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onLocationUpdate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-maps-plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0-dev.1",
|
|
4
4
|
"description": "React Native wrapper for Android & iOS Google Maps SDK",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"source": "src/index",
|
|
9
9
|
"react-native": "src/index",
|
|
10
10
|
"scripts": {
|
|
11
|
+
"commitlint": "commitlint",
|
|
11
12
|
"typecheck:lib": "tsc --noEmit -p tsconfig.json",
|
|
12
13
|
"typecheck:example": "tsc --noEmit -p example/tsconfig.json",
|
|
13
14
|
"typecheck": "yarn typecheck:lib && yarn typecheck:example",
|
|
@@ -101,8 +101,8 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
101
101
|
/** Location subsystem config. See {@link RNLocationConfig}. */
|
|
102
102
|
locationConfig?: RNLocationConfig;
|
|
103
103
|
|
|
104
|
-
/** Map
|
|
105
|
-
onMapError?: (error: RNMapErrorCode) => void;
|
|
104
|
+
/** Map errors. */
|
|
105
|
+
onMapError?: (error: RNMapErrorCode, msg: string) => void;
|
|
106
106
|
|
|
107
107
|
/** Native map instance created. */
|
|
108
108
|
onMapReady?: (ready: boolean) => void;
|