react-native-google-maps-plus 1.7.0-dev.5 → 1.7.0-dev.7
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 +336 -494
- 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/MapHelper.kt +22 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +4 -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/RNGoogleMapsPlusView.kt +10 -21
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
- package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
- package/ios/GoogleMapViewImpl.swift +14 -26
- package/ios/MapCircleBuilder.swift +2 -0
- package/ios/MapHeatmapBuilder.swift +1 -0
- package/ios/MapMarkerBuilder.swift +4 -0
- package/ios/MapPolygonBuilder.swift +2 -0
- package/ios/MapPolylineBuilder.swift +2 -0
- package/ios/MapUrlTileOverlayBuilder.swift +1 -0
- package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
- package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
- package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/types.d.ts +7 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +4 -4
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
- package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
- package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
- package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
- package/package.json +1 -1
- package/src/types.ts +7 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotFormat.kt → RNSnapshotFormatExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotResultType.kt → RNSnapshotResultTypeExtension.kt} +0 -0
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
#include "RNRegion.hpp"
|
|
12
12
|
|
|
13
13
|
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "JRNLatLngBounds.hpp"
|
|
14
15
|
#include "RNLatLng.hpp"
|
|
16
|
+
#include "RNLatLngBounds.hpp"
|
|
15
17
|
|
|
16
18
|
namespace margelo::nitro::rngooglemapsplus {
|
|
17
19
|
|
|
@@ -32,16 +34,22 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
32
34
|
[[nodiscard]]
|
|
33
35
|
RNRegion toCpp() const {
|
|
34
36
|
static const auto clazz = javaClassStatic();
|
|
35
|
-
static const auto
|
|
36
|
-
jni::local_ref<JRNLatLng>
|
|
37
|
-
static const auto
|
|
38
|
-
|
|
39
|
-
static const auto
|
|
40
|
-
|
|
37
|
+
static const auto fieldNearLeft = clazz->getField<JRNLatLng>("nearLeft");
|
|
38
|
+
jni::local_ref<JRNLatLng> nearLeft = this->getFieldValue(fieldNearLeft);
|
|
39
|
+
static const auto fieldNearRight = clazz->getField<JRNLatLng>("nearRight");
|
|
40
|
+
jni::local_ref<JRNLatLng> nearRight = this->getFieldValue(fieldNearRight);
|
|
41
|
+
static const auto fieldFarLeft = clazz->getField<JRNLatLng>("farLeft");
|
|
42
|
+
jni::local_ref<JRNLatLng> farLeft = this->getFieldValue(fieldFarLeft);
|
|
43
|
+
static const auto fieldFarRight = clazz->getField<JRNLatLng>("farRight");
|
|
44
|
+
jni::local_ref<JRNLatLng> farRight = this->getFieldValue(fieldFarRight);
|
|
45
|
+
static const auto fieldLatLngBounds = clazz->getField<JRNLatLngBounds>("latLngBounds");
|
|
46
|
+
jni::local_ref<JRNLatLngBounds> latLngBounds = this->getFieldValue(fieldLatLngBounds);
|
|
41
47
|
return RNRegion(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
nearLeft->toCpp(),
|
|
49
|
+
nearRight->toCpp(),
|
|
50
|
+
farLeft->toCpp(),
|
|
51
|
+
farRight->toCpp(),
|
|
52
|
+
latLngBounds->toCpp()
|
|
45
53
|
);
|
|
46
54
|
}
|
|
47
55
|
|
|
@@ -51,14 +59,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
51
59
|
*/
|
|
52
60
|
[[maybe_unused]]
|
|
53
61
|
static jni::local_ref<JRNRegion::javaobject> fromCpp(const RNRegion& value) {
|
|
54
|
-
using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>,
|
|
62
|
+
using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLngBounds>);
|
|
55
63
|
static const auto clazz = javaClassStatic();
|
|
56
64
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
57
65
|
return create(
|
|
58
66
|
clazz,
|
|
59
|
-
JRNLatLng::fromCpp(value.
|
|
60
|
-
value.
|
|
61
|
-
value.
|
|
67
|
+
JRNLatLng::fromCpp(value.nearLeft),
|
|
68
|
+
JRNLatLng::fromCpp(value.nearRight),
|
|
69
|
+
JRNLatLng::fromCpp(value.farLeft),
|
|
70
|
+
JRNLatLng::fromCpp(value.farRight),
|
|
71
|
+
JRNLatLngBounds::fromCpp(value.latLngBounds)
|
|
62
72
|
);
|
|
63
73
|
}
|
|
64
74
|
};
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt
CHANGED
|
@@ -20,10 +20,10 @@ import com.margelo.nitro.core.*
|
|
|
20
20
|
data class RNLatLngBounds(
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
@Keep
|
|
23
|
-
val
|
|
23
|
+
val southwest: RNLatLng,
|
|
24
24
|
@DoNotStrip
|
|
25
25
|
@Keep
|
|
26
|
-
val
|
|
26
|
+
val northeast: RNLatLng
|
|
27
27
|
) {
|
|
28
28
|
private companion object {
|
|
29
29
|
/**
|
|
@@ -33,8 +33,8 @@ data class RNLatLngBounds(
|
|
|
33
33
|
@Keep
|
|
34
34
|
@Suppress("unused")
|
|
35
35
|
@JvmStatic
|
|
36
|
-
private fun fromCpp(
|
|
37
|
-
return RNLatLngBounds(
|
|
36
|
+
private fun fromCpp(southwest: RNLatLng, northeast: RNLatLng): RNLatLngBounds {
|
|
37
|
+
return RNLatLngBounds(southwest, northeast)
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -20,13 +20,19 @@ import com.margelo.nitro.core.*
|
|
|
20
20
|
data class RNRegion(
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
@Keep
|
|
23
|
-
val
|
|
23
|
+
val nearLeft: RNLatLng,
|
|
24
24
|
@DoNotStrip
|
|
25
25
|
@Keep
|
|
26
|
-
val
|
|
26
|
+
val nearRight: RNLatLng,
|
|
27
27
|
@DoNotStrip
|
|
28
28
|
@Keep
|
|
29
|
-
val
|
|
29
|
+
val farLeft: RNLatLng,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val farRight: RNLatLng,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val latLngBounds: RNLatLngBounds
|
|
30
36
|
) {
|
|
31
37
|
private companion object {
|
|
32
38
|
/**
|
|
@@ -36,8 +42,8 @@ data class RNRegion(
|
|
|
36
42
|
@Keep
|
|
37
43
|
@Suppress("unused")
|
|
38
44
|
@JvmStatic
|
|
39
|
-
private fun fromCpp(
|
|
40
|
-
return RNRegion(
|
|
45
|
+
private fun fromCpp(nearLeft: RNLatLng, nearRight: RNLatLng, farLeft: RNLatLng, farRight: RNLatLng, latLngBounds: RNLatLngBounds): RNRegion {
|
|
46
|
+
return RNRegion(nearLeft, nearRight, farLeft, farRight, latLngBounds)
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
@@ -18,29 +18,29 @@ public extension RNLatLngBounds {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNLatLngBounds`.
|
|
20
20
|
*/
|
|
21
|
-
init(
|
|
22
|
-
self.init(
|
|
21
|
+
init(southwest: RNLatLng, northeast: RNLatLng) {
|
|
22
|
+
self.init(southwest, northeast)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var southwest: RNLatLng {
|
|
26
26
|
@inline(__always)
|
|
27
27
|
get {
|
|
28
|
-
return self.
|
|
28
|
+
return self.__southwest
|
|
29
29
|
}
|
|
30
30
|
@inline(__always)
|
|
31
31
|
set {
|
|
32
|
-
self.
|
|
32
|
+
self.__southwest = newValue
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var northeast: RNLatLng {
|
|
37
37
|
@inline(__always)
|
|
38
38
|
get {
|
|
39
|
-
return self.
|
|
39
|
+
return self.__northeast
|
|
40
40
|
}
|
|
41
41
|
@inline(__always)
|
|
42
42
|
set {
|
|
43
|
-
self.
|
|
43
|
+
self.__northeast = newValue
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -18,40 +18,62 @@ public extension RNRegion {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNRegion`.
|
|
20
20
|
*/
|
|
21
|
-
init(
|
|
22
|
-
self.init(
|
|
21
|
+
init(nearLeft: RNLatLng, nearRight: RNLatLng, farLeft: RNLatLng, farRight: RNLatLng, latLngBounds: RNLatLngBounds) {
|
|
22
|
+
self.init(nearLeft, nearRight, farLeft, farRight, latLngBounds)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var nearLeft: RNLatLng {
|
|
26
26
|
@inline(__always)
|
|
27
27
|
get {
|
|
28
|
-
return self.
|
|
28
|
+
return self.__nearLeft
|
|
29
29
|
}
|
|
30
30
|
@inline(__always)
|
|
31
31
|
set {
|
|
32
|
-
self.
|
|
32
|
+
self.__nearLeft = newValue
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var nearRight: RNLatLng {
|
|
37
37
|
@inline(__always)
|
|
38
38
|
get {
|
|
39
|
-
return self.
|
|
39
|
+
return self.__nearRight
|
|
40
40
|
}
|
|
41
41
|
@inline(__always)
|
|
42
42
|
set {
|
|
43
|
-
self.
|
|
43
|
+
self.__nearRight = newValue
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var farLeft: RNLatLng {
|
|
48
48
|
@inline(__always)
|
|
49
49
|
get {
|
|
50
|
-
return self.
|
|
50
|
+
return self.__farLeft
|
|
51
51
|
}
|
|
52
52
|
@inline(__always)
|
|
53
53
|
set {
|
|
54
|
-
self.
|
|
54
|
+
self.__farLeft = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var farRight: RNLatLng {
|
|
59
|
+
@inline(__always)
|
|
60
|
+
get {
|
|
61
|
+
return self.__farRight
|
|
62
|
+
}
|
|
63
|
+
@inline(__always)
|
|
64
|
+
set {
|
|
65
|
+
self.__farRight = newValue
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var latLngBounds: RNLatLngBounds {
|
|
70
|
+
@inline(__always)
|
|
71
|
+
get {
|
|
72
|
+
return self.__latLngBounds
|
|
73
|
+
}
|
|
74
|
+
@inline(__always)
|
|
75
|
+
set {
|
|
76
|
+
self.__latLngBounds = newValue
|
|
55
77
|
}
|
|
56
78
|
}
|
|
57
79
|
}
|
|
@@ -35,12 +35,12 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
35
35
|
*/
|
|
36
36
|
struct RNLatLngBounds {
|
|
37
37
|
public:
|
|
38
|
-
RNLatLng
|
|
39
|
-
RNLatLng
|
|
38
|
+
RNLatLng southwest SWIFT_PRIVATE;
|
|
39
|
+
RNLatLng northeast SWIFT_PRIVATE;
|
|
40
40
|
|
|
41
41
|
public:
|
|
42
42
|
RNLatLngBounds() = default;
|
|
43
|
-
explicit RNLatLngBounds(RNLatLng
|
|
43
|
+
explicit RNLatLngBounds(RNLatLng southwest, RNLatLng northeast): southwest(southwest), northeast(northeast) {}
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -53,14 +53,14 @@ namespace margelo::nitro {
|
|
|
53
53
|
static inline margelo::nitro::rngooglemapsplus::RNLatLngBounds fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
54
|
jsi::Object obj = arg.asObject(runtime);
|
|
55
55
|
return margelo::nitro::rngooglemapsplus::RNLatLngBounds(
|
|
56
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
57
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
56
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "southwest")),
|
|
57
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "northeast"))
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLatLngBounds& arg) {
|
|
61
61
|
jsi::Object obj(runtime);
|
|
62
|
-
obj.setProperty(runtime, "
|
|
63
|
-
obj.setProperty(runtime, "
|
|
62
|
+
obj.setProperty(runtime, "southwest", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.southwest));
|
|
63
|
+
obj.setProperty(runtime, "northeast", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.northeast));
|
|
64
64
|
return obj;
|
|
65
65
|
}
|
|
66
66
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -71,8 +71,8 @@ namespace margelo::nitro {
|
|
|
71
71
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
74
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
75
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
74
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "southwest"))) return false;
|
|
75
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "northeast"))) return false;
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
|
|
26
26
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
27
27
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
28
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
28
30
|
|
|
29
31
|
#include "RNLatLng.hpp"
|
|
32
|
+
#include "RNLatLngBounds.hpp"
|
|
30
33
|
|
|
31
34
|
namespace margelo::nitro::rngooglemapsplus {
|
|
32
35
|
|
|
@@ -35,13 +38,15 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
35
38
|
*/
|
|
36
39
|
struct RNRegion {
|
|
37
40
|
public:
|
|
38
|
-
RNLatLng
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
RNLatLng nearLeft SWIFT_PRIVATE;
|
|
42
|
+
RNLatLng nearRight SWIFT_PRIVATE;
|
|
43
|
+
RNLatLng farLeft SWIFT_PRIVATE;
|
|
44
|
+
RNLatLng farRight SWIFT_PRIVATE;
|
|
45
|
+
RNLatLngBounds latLngBounds SWIFT_PRIVATE;
|
|
41
46
|
|
|
42
47
|
public:
|
|
43
48
|
RNRegion() = default;
|
|
44
|
-
explicit RNRegion(RNLatLng
|
|
49
|
+
explicit RNRegion(RNLatLng nearLeft, RNLatLng nearRight, RNLatLng farLeft, RNLatLng farRight, RNLatLngBounds latLngBounds): nearLeft(nearLeft), nearRight(nearRight), farLeft(farLeft), farRight(farRight), latLngBounds(latLngBounds) {}
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -54,16 +59,20 @@ namespace margelo::nitro {
|
|
|
54
59
|
static inline margelo::nitro::rngooglemapsplus::RNRegion fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
61
|
return margelo::nitro::rngooglemapsplus::RNRegion(
|
|
57
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
58
|
-
JSIConverter<
|
|
59
|
-
JSIConverter<
|
|
62
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "nearLeft")),
|
|
63
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "nearRight")),
|
|
64
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "farLeft")),
|
|
65
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "farRight")),
|
|
66
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::fromJSI(runtime, obj.getProperty(runtime, "latLngBounds"))
|
|
60
67
|
);
|
|
61
68
|
}
|
|
62
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNRegion& arg) {
|
|
63
70
|
jsi::Object obj(runtime);
|
|
64
|
-
obj.setProperty(runtime, "
|
|
65
|
-
obj.setProperty(runtime, "
|
|
66
|
-
obj.setProperty(runtime, "
|
|
71
|
+
obj.setProperty(runtime, "nearLeft", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.nearLeft));
|
|
72
|
+
obj.setProperty(runtime, "nearRight", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.nearRight));
|
|
73
|
+
obj.setProperty(runtime, "farLeft", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.farLeft));
|
|
74
|
+
obj.setProperty(runtime, "farRight", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.farRight));
|
|
75
|
+
obj.setProperty(runtime, "latLngBounds", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::toJSI(runtime, arg.latLngBounds));
|
|
67
76
|
return obj;
|
|
68
77
|
}
|
|
69
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -74,9 +83,11 @@ namespace margelo::nitro {
|
|
|
74
83
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
75
84
|
return false;
|
|
76
85
|
}
|
|
77
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
78
|
-
if (!JSIConverter<
|
|
79
|
-
if (!JSIConverter<
|
|
86
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "nearLeft"))) return false;
|
|
87
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "nearRight"))) return false;
|
|
88
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "farLeft"))) return false;
|
|
89
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "farRight"))) return false;
|
|
90
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::canConvert(runtime, obj.getProperty(runtime, "latLngBounds"))) return false;
|
|
80
91
|
return true;
|
|
81
92
|
}
|
|
82
93
|
};
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -29,8 +29,8 @@ export type RNLatLng = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type RNLatLngBounds = {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
southwest: RNLatLng;
|
|
33
|
+
northeast: RNLatLng;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export type RNSnapshotOptions = {
|
|
@@ -135,9 +135,11 @@ export type RNCamera = {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export type RNRegion = {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
nearLeft: RNLatLng;
|
|
139
|
+
nearRight: RNLatLng;
|
|
140
|
+
farLeft: RNLatLng;
|
|
141
|
+
farRight: RNLatLng;
|
|
142
|
+
latLngBounds: RNLatLngBounds;
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
export type RNPosition = {
|
|
@@ -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
|
-
}
|
/package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt}
RENAMED
|
File without changes
|
|
File without changes
|