react-native-google-maps-plus 1.7.0-dev.1 → 1.7.0-dev.10
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 +457 -451
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -8
- package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapHeatmapBuilder.kt +1 -1
- package/android/src/main/java/com/rngooglemapsplus/MapHelper.kt +22 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +103 -2
- package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapUrlTileOverlayBuilder.kt +40 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +84 -34
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/MapObjectTagExtensions.kt +84 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNMapTypeExtension.kt +13 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
- package/ios/GoogleMapViewImpl.swift +164 -48
- package/ios/MapCircleBuilder.swift +2 -0
- package/ios/MapHeatmapBuilder.swift +2 -1
- package/ios/MapMarkerBuilder.swift +54 -1
- package/ios/MapPolygonBuilder.swift +2 -0
- package/ios/MapPolylineBuilder.swift +2 -0
- package/ios/MapUrlTileOverlayBuilder.swift +24 -0
- package/ios/RNGoogleMapsPlusView.swift +68 -11
- package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
- package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
- package/ios/extensions/MapObjectTag+Extension.swift +93 -0
- package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
- package/ios/extensions/RNMapType+Extension.swift +18 -0
- package/lib/module/types.js.map +1 -1
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +7 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +18 -9
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +18 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +8 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera.hpp +83 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_RNLatLng.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_std__string_RNLatLng.hpp +77 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +237 -83
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +32 -16
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
- package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +11 -3
- package/nitrogen/generated/android/c++/JRNMarker.hpp +7 -3
- package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
- package/nitrogen/generated/android/c++/JRNUrlTileOverlay.hpp +78 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_std__optional_std__string_.kt → Func_void_std__string.kt} +12 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_std__optional_std__string__RNLatLng.kt → Func_void_std__string_RNLatLng.kt} +12 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string_std__string_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +122 -24
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUrlTileOverlay.kt +52 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +32 -8
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +168 -43
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +86 -22
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +35 -0
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +6 -6
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +17 -8
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +340 -138
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
- package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +61 -1
- package/nitrogen/generated/ios/swift/RNMarker.swift +24 -1
- package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
- package/nitrogen/generated/ios/swift/RNUrlTileOverlay.swift +133 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +16 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +41 -22
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
- package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +10 -2
- package/nitrogen/generated/shared/c++/RNMarker.hpp +6 -2
- package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
- package/nitrogen/generated/shared/c++/RNUrlTileOverlay.hpp +96 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +100 -16
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +18 -10
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +7 -0
- package/package.json +4 -2
- package/src/RNGoogleMapsPlusView.nitro.ts +20 -8
- package/src/types.ts +19 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string_.hpp +0 -76
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string__RNLatLng.hpp +0 -78
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string__RNLatLng.swift +0 -54
- /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
package/src/types.ts
CHANGED
|
@@ -21,6 +21,8 @@ export type RNMapUiSettings = {
|
|
|
21
21
|
tiltEnabled?: boolean;
|
|
22
22
|
zoomControlsEnabled?: boolean;
|
|
23
23
|
zoomGesturesEnabled?: boolean;
|
|
24
|
+
consumeOnMarkerPress?: boolean;
|
|
25
|
+
consumeOnMyLocationButtonPress?: boolean;
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
export type RNLatLng = {
|
|
@@ -29,8 +31,8 @@ export type RNLatLng = {
|
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
export type RNLatLngBounds = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
southwest: RNLatLng;
|
|
35
|
+
northeast: RNLatLng;
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
export type RNSnapshotOptions = {
|
|
@@ -135,9 +137,11 @@ export type RNCamera = {
|
|
|
135
137
|
};
|
|
136
138
|
|
|
137
139
|
export type RNRegion = {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
nearLeft: RNLatLng;
|
|
141
|
+
nearRight: RNLatLng;
|
|
142
|
+
farLeft: RNLatLng;
|
|
143
|
+
farRight: RNLatLng;
|
|
144
|
+
latLngBounds: RNLatLngBounds;
|
|
141
145
|
};
|
|
142
146
|
|
|
143
147
|
export type RNPosition = {
|
|
@@ -167,6 +171,7 @@ export type RNMarker = {
|
|
|
167
171
|
rotation?: number;
|
|
168
172
|
infoWindowAnchor?: RNPosition;
|
|
169
173
|
iconSvg?: RNMarkerSvg;
|
|
174
|
+
infoWindowIconSvg?: RNMarkerSvg;
|
|
170
175
|
};
|
|
171
176
|
|
|
172
177
|
export type RNMarkerSvg = {
|
|
@@ -241,6 +246,15 @@ export type RNKMLayer = {
|
|
|
241
246
|
kmlString: string;
|
|
242
247
|
};
|
|
243
248
|
|
|
249
|
+
export type RNUrlTileOverlay = {
|
|
250
|
+
id: string;
|
|
251
|
+
zIndex?: number;
|
|
252
|
+
url: string;
|
|
253
|
+
tileSize: number;
|
|
254
|
+
opacity?: number;
|
|
255
|
+
fadeIn?: boolean;
|
|
256
|
+
};
|
|
257
|
+
|
|
244
258
|
export type RNIndoorBuilding = {
|
|
245
259
|
activeLevelIndex?: number;
|
|
246
260
|
defaultLevelIndex?: number;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
package com.rngooglemapsplus.extensions
|
|
2
|
-
|
|
3
|
-
import com.google.android.gms.maps.model.LatLngBounds
|
|
4
|
-
import com.rngooglemapsplus.RNRegion
|
|
5
|
-
|
|
6
|
-
fun LatLngBounds.toRnRegion(): RNRegion {
|
|
7
|
-
val latDelta = northeast.latitude - southwest.latitude
|
|
8
|
-
val lngDelta = northeast.longitude - southwest.longitude
|
|
9
|
-
|
|
10
|
-
return RNRegion(
|
|
11
|
-
center = center.toRnLatLng(),
|
|
12
|
-
latitudeDelta = latDelta,
|
|
13
|
-
longitudeDelta = lngDelta,
|
|
14
|
-
)
|
|
15
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// JFunc_void_std__optional_std__string_.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 <functional>
|
|
12
|
-
|
|
13
|
-
#include <string>
|
|
14
|
-
#include <optional>
|
|
15
|
-
#include <functional>
|
|
16
|
-
|
|
17
|
-
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
-
|
|
19
|
-
using namespace facebook;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Represents the Java/Kotlin callback `(id: String?) -> Unit`.
|
|
23
|
-
* This can be passed around between C++ and Java/Kotlin.
|
|
24
|
-
*/
|
|
25
|
-
struct JFunc_void_std__optional_std__string_: public jni::JavaClass<JFunc_void_std__optional_std__string_> {
|
|
26
|
-
public:
|
|
27
|
-
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__optional_std__string_;";
|
|
28
|
-
|
|
29
|
-
public:
|
|
30
|
-
/**
|
|
31
|
-
* Invokes the function this `JFunc_void_std__optional_std__string_` instance holds through JNI.
|
|
32
|
-
*/
|
|
33
|
-
void invoke(const std::optional<std::string>& id) const {
|
|
34
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* id */)>("invoke");
|
|
35
|
-
method(self(), id.has_value() ? jni::make_jstring(id.value()) : nullptr);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* An implementation of Func_void_std__optional_std__string_ that is backed by a C++ implementation (using `std::function<...>`)
|
|
41
|
-
*/
|
|
42
|
-
struct JFunc_void_std__optional_std__string__cxx final: public jni::HybridClass<JFunc_void_std__optional_std__string__cxx, JFunc_void_std__optional_std__string_> {
|
|
43
|
-
public:
|
|
44
|
-
static jni::local_ref<JFunc_void_std__optional_std__string_::javaobject> fromCpp(const std::function<void(const std::optional<std::string>& /* id */)>& func) {
|
|
45
|
-
return JFunc_void_std__optional_std__string__cxx::newObjectCxxArgs(func);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public:
|
|
49
|
-
/**
|
|
50
|
-
* Invokes the C++ `std::function<...>` this `JFunc_void_std__optional_std__string__cxx` instance holds.
|
|
51
|
-
*/
|
|
52
|
-
void invoke_cxx(jni::alias_ref<jni::JString> id) {
|
|
53
|
-
_func(id != nullptr ? std::make_optional(id->toStdString()) : std::nullopt);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public:
|
|
57
|
-
[[nodiscard]]
|
|
58
|
-
inline const std::function<void(const std::optional<std::string>& /* id */)>& getFunction() const {
|
|
59
|
-
return _func;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public:
|
|
63
|
-
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__optional_std__string__cxx;";
|
|
64
|
-
static void registerNatives() {
|
|
65
|
-
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__optional_std__string__cxx::invoke_cxx)});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private:
|
|
69
|
-
explicit JFunc_void_std__optional_std__string__cxx(const std::function<void(const std::optional<std::string>& /* id */)>& func): _func(func) { }
|
|
70
|
-
|
|
71
|
-
private:
|
|
72
|
-
friend HybridBase;
|
|
73
|
-
std::function<void(const std::optional<std::string>& /* id */)> _func;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// JFunc_void_std__optional_std__string__RNLatLng.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 <functional>
|
|
12
|
-
|
|
13
|
-
#include <string>
|
|
14
|
-
#include <optional>
|
|
15
|
-
#include "RNLatLng.hpp"
|
|
16
|
-
#include <functional>
|
|
17
|
-
#include "JRNLatLng.hpp"
|
|
18
|
-
|
|
19
|
-
namespace margelo::nitro::rngooglemapsplus {
|
|
20
|
-
|
|
21
|
-
using namespace facebook;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Represents the Java/Kotlin callback `(id: String?, location: RNLatLng) -> Unit`.
|
|
25
|
-
* This can be passed around between C++ and Java/Kotlin.
|
|
26
|
-
*/
|
|
27
|
-
struct JFunc_void_std__optional_std__string__RNLatLng: public jni::JavaClass<JFunc_void_std__optional_std__string__RNLatLng> {
|
|
28
|
-
public:
|
|
29
|
-
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__optional_std__string__RNLatLng;";
|
|
30
|
-
|
|
31
|
-
public:
|
|
32
|
-
/**
|
|
33
|
-
* Invokes the function this `JFunc_void_std__optional_std__string__RNLatLng` instance holds through JNI.
|
|
34
|
-
*/
|
|
35
|
-
void invoke(const std::optional<std::string>& id, const RNLatLng& location) const {
|
|
36
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* id */, jni::alias_ref<JRNLatLng> /* location */)>("invoke");
|
|
37
|
-
method(self(), id.has_value() ? jni::make_jstring(id.value()) : nullptr, JRNLatLng::fromCpp(location));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* An implementation of Func_void_std__optional_std__string__RNLatLng that is backed by a C++ implementation (using `std::function<...>`)
|
|
43
|
-
*/
|
|
44
|
-
struct JFunc_void_std__optional_std__string__RNLatLng_cxx final: public jni::HybridClass<JFunc_void_std__optional_std__string__RNLatLng_cxx, JFunc_void_std__optional_std__string__RNLatLng> {
|
|
45
|
-
public:
|
|
46
|
-
static jni::local_ref<JFunc_void_std__optional_std__string__RNLatLng::javaobject> fromCpp(const std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>& func) {
|
|
47
|
-
return JFunc_void_std__optional_std__string__RNLatLng_cxx::newObjectCxxArgs(func);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public:
|
|
51
|
-
/**
|
|
52
|
-
* Invokes the C++ `std::function<...>` this `JFunc_void_std__optional_std__string__RNLatLng_cxx` instance holds.
|
|
53
|
-
*/
|
|
54
|
-
void invoke_cxx(jni::alias_ref<jni::JString> id, jni::alias_ref<JRNLatLng> location) {
|
|
55
|
-
_func(id != nullptr ? std::make_optional(id->toStdString()) : std::nullopt, location->toCpp());
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
public:
|
|
59
|
-
[[nodiscard]]
|
|
60
|
-
inline const std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>& getFunction() const {
|
|
61
|
-
return _func;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public:
|
|
65
|
-
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__optional_std__string__RNLatLng_cxx;";
|
|
66
|
-
static void registerNatives() {
|
|
67
|
-
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__optional_std__string__RNLatLng_cxx::invoke_cxx)});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
private:
|
|
71
|
-
explicit JFunc_void_std__optional_std__string__RNLatLng_cxx(const std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>& func): _func(func) { }
|
|
72
|
-
|
|
73
|
-
private:
|
|
74
|
-
friend HybridBase;
|
|
75
|
-
std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)> _func;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Func_void_std__optional_std__string__RNLatLng.swift
|
|
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
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Wraps a Swift `(_ id: String?, _ location: RNLatLng) -> Void` as a class.
|
|
13
|
-
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
-
*/
|
|
15
|
-
public final class Func_void_std__optional_std__string__RNLatLng {
|
|
16
|
-
public typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
-
|
|
18
|
-
private let closure: (_ id: String?, _ location: RNLatLng) -> Void
|
|
19
|
-
|
|
20
|
-
public init(_ closure: @escaping (_ id: String?, _ location: RNLatLng) -> Void) {
|
|
21
|
-
self.closure = closure
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@inline(__always)
|
|
25
|
-
public func call(id: bridge.std__optional_std__string_, location: RNLatLng) -> Void {
|
|
26
|
-
self.closure({ () -> String? in
|
|
27
|
-
if bridge.has_value_std__optional_std__string_(id) {
|
|
28
|
-
let __unwrapped = bridge.get_std__optional_std__string_(id)
|
|
29
|
-
return String(__unwrapped)
|
|
30
|
-
} else {
|
|
31
|
-
return nil
|
|
32
|
-
}
|
|
33
|
-
}(), location)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Casts this instance to a retained unsafe raw pointer.
|
|
38
|
-
* This acquires one additional strong reference on the object!
|
|
39
|
-
*/
|
|
40
|
-
@inline(__always)
|
|
41
|
-
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
42
|
-
return Unmanaged.passRetained(self).toOpaque()
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Casts an unsafe pointer to a `Func_void_std__optional_std__string__RNLatLng`.
|
|
47
|
-
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__optional_std__string__RNLatLng>`.
|
|
48
|
-
* This removes one strong reference from the object!
|
|
49
|
-
*/
|
|
50
|
-
@inline(__always)
|
|
51
|
-
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__optional_std__string__RNLatLng {
|
|
52
|
-
return Unmanaged<Func_void_std__optional_std__string__RNLatLng>.fromOpaque(pointer).takeRetainedValue()
|
|
53
|
-
}
|
|
54
|
-
}
|
/package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt}
RENAMED
|
File without changes
|
|
File without changes
|