react-native-google-maps-plus 1.0.2 → 1.0.3-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/README.md +127 -11
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +239 -112
- package/android/src/main/java/com/rngooglemapsplus/MapCircle.kt +29 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarker.kt +6 -5
- package/android/src/main/java/com/rngooglemapsplus/MapPolygon.kt +3 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolyline.kt +3 -1
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +115 -88
- package/ios/Color.swift +20 -20
- package/ios/GoogleMapViewImpl.swift +194 -139
- package/ios/MapCircle.swift +43 -0
- package/ios/MapMarker.swift +10 -17
- package/ios/MapPolygon.swift +9 -6
- package/ios/MapPolyline.swift +9 -7
- package/ios/PermissionHandler.swift +1 -1
- package/ios/RNGoogleMapsPlusModule.swift +1 -1
- package/ios/RNGoogleMapsPlusView.swift +148 -105
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +17 -12
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +21 -3
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +173 -69
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +32 -22
- package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
- package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -0
- package/nitrogen/generated/android/c++/JRNMapType.hpp +68 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +8 -4
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +8 -4
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +24 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +65 -11
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +4 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +4 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +7 -1
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +188 -45
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +85 -37
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +41 -16
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +16 -11
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +296 -45
- package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -0
- package/nitrogen/generated/ios/swift/RNMapType.swift +52 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +17 -5
- package/nitrogen/generated/ios/swift/RNPolygon.swift +40 -5
- package/nitrogen/generated/ios/swift/RNPolyline.swift +40 -5
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +12 -2
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +45 -26
- package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -0
- package/nitrogen/generated/shared/c++/RNMapType.hpp +88 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +10 -6
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +10 -6
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +92 -32
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +21 -13
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +6 -1
- package/package.json +5 -5
- package/src/RNGoogleMapsPlusView.nitro.ts +19 -11
- package/src/types.ts +24 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMapType.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 "RNMapType.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNMapType" and the the Kotlin enum "RNMapType".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNMapType final: public jni::JavaClass<JRNMapType> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMapType;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNMapType.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNMapType 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<RNMapType>(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<JRNMapType> fromCpp(RNMapType value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldNONE = clazz->getStaticField<JRNMapType>("NONE");
|
|
45
|
+
static const auto fieldNORMAL = clazz->getStaticField<JRNMapType>("NORMAL");
|
|
46
|
+
static const auto fieldHYBRID = clazz->getStaticField<JRNMapType>("HYBRID");
|
|
47
|
+
static const auto fieldSATELLITE = clazz->getStaticField<JRNMapType>("SATELLITE");
|
|
48
|
+
static const auto fieldTERRAIN = clazz->getStaticField<JRNMapType>("TERRAIN");
|
|
49
|
+
|
|
50
|
+
switch (value) {
|
|
51
|
+
case RNMapType::NONE:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldNONE);
|
|
53
|
+
case RNMapType::NORMAL:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldNORMAL);
|
|
55
|
+
case RNMapType::HYBRID:
|
|
56
|
+
return clazz->getStaticFieldValue(fieldHYBRID);
|
|
57
|
+
case RNMapType::SATELLITE:
|
|
58
|
+
return clazz->getStaticFieldValue(fieldSATELLITE);
|
|
59
|
+
case RNMapType::TERRAIN:
|
|
60
|
+
return clazz->getStaticFieldValue(fieldTERRAIN);
|
|
61
|
+
default:
|
|
62
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
63
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -38,8 +38,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
38
38
|
static const auto clazz = javaClassStatic();
|
|
39
39
|
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
40
40
|
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
41
|
-
static const auto fieldZIndex = clazz->getField<
|
|
42
|
-
|
|
41
|
+
static const auto fieldZIndex = clazz->getField<jni::JDouble>("zIndex");
|
|
42
|
+
jni::local_ref<jni::JDouble> zIndex = this->getFieldValue(fieldZIndex);
|
|
43
43
|
static const auto fieldCoordinate = clazz->getField<JRNLatLng>("coordinate");
|
|
44
44
|
jni::local_ref<JRNLatLng> coordinate = this->getFieldValue(fieldCoordinate);
|
|
45
45
|
static const auto fieldAnchor = clazz->getField<JRNPosition>("anchor");
|
|
@@ -52,7 +52,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
52
52
|
jni::local_ref<jni::JString> iconSvg = this->getFieldValue(fieldIconSvg);
|
|
53
53
|
return RNMarker(
|
|
54
54
|
id->toStdString(),
|
|
55
|
-
zIndex,
|
|
55
|
+
zIndex != nullptr ? std::make_optional(zIndex->value()) : std::nullopt,
|
|
56
56
|
coordinate->toCpp(),
|
|
57
57
|
anchor != nullptr ? std::make_optional(anchor->toCpp()) : std::nullopt,
|
|
58
58
|
width,
|
|
@@ -69,7 +69,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
69
69
|
static jni::local_ref<JRNMarker::javaobject> fromCpp(const RNMarker& value) {
|
|
70
70
|
return newInstance(
|
|
71
71
|
jni::make_jstring(value.id),
|
|
72
|
-
value.zIndex,
|
|
72
|
+
value.zIndex.has_value() ? jni::JDouble::valueOf(value.zIndex.value()) : nullptr,
|
|
73
73
|
JRNLatLng::fromCpp(value.coordinate),
|
|
74
74
|
value.anchor.has_value() ? JRNPosition::fromCpp(value.anchor.value()) : nullptr,
|
|
75
75
|
value.width,
|
|
@@ -37,8 +37,10 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
37
37
|
static const auto clazz = javaClassStatic();
|
|
38
38
|
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
39
39
|
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
40
|
-
static const auto fieldZIndex = clazz->getField<
|
|
41
|
-
|
|
40
|
+
static const auto fieldZIndex = clazz->getField<jni::JDouble>("zIndex");
|
|
41
|
+
jni::local_ref<jni::JDouble> zIndex = this->getFieldValue(fieldZIndex);
|
|
42
|
+
static const auto fieldPressable = clazz->getField<jni::JBoolean>("pressable");
|
|
43
|
+
jni::local_ref<jni::JBoolean> pressable = this->getFieldValue(fieldPressable);
|
|
42
44
|
static const auto fieldCoordinates = clazz->getField<jni::JArrayClass<JRNLatLng>>("coordinates");
|
|
43
45
|
jni::local_ref<jni::JArrayClass<JRNLatLng>> coordinates = this->getFieldValue(fieldCoordinates);
|
|
44
46
|
static const auto fieldFillColor = clazz->getField<jni::JString>("fillColor");
|
|
@@ -49,7 +51,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
49
51
|
jni::local_ref<jni::JDouble> strokeWidth = this->getFieldValue(fieldStrokeWidth);
|
|
50
52
|
return RNPolygon(
|
|
51
53
|
id->toStdString(),
|
|
52
|
-
zIndex,
|
|
54
|
+
zIndex != nullptr ? std::make_optional(zIndex->value()) : std::nullopt,
|
|
55
|
+
pressable != nullptr ? std::make_optional(static_cast<bool>(pressable->value())) : std::nullopt,
|
|
53
56
|
[&]() {
|
|
54
57
|
size_t __size = coordinates->size();
|
|
55
58
|
std::vector<RNLatLng> __vector;
|
|
@@ -74,7 +77,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
74
77
|
static jni::local_ref<JRNPolygon::javaobject> fromCpp(const RNPolygon& value) {
|
|
75
78
|
return newInstance(
|
|
76
79
|
jni::make_jstring(value.id),
|
|
77
|
-
value.zIndex,
|
|
80
|
+
value.zIndex.has_value() ? jni::JDouble::valueOf(value.zIndex.value()) : nullptr,
|
|
81
|
+
value.pressable.has_value() ? jni::JBoolean::valueOf(value.pressable.value()) : nullptr,
|
|
78
82
|
[&]() {
|
|
79
83
|
size_t __size = value.coordinates.size();
|
|
80
84
|
jni::local_ref<jni::JArrayClass<JRNLatLng>> __array = jni::JArrayClass<JRNLatLng>::newArray(__size);
|
|
@@ -41,8 +41,10 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
41
41
|
static const auto clazz = javaClassStatic();
|
|
42
42
|
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
43
43
|
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
44
|
-
static const auto fieldZIndex = clazz->getField<
|
|
45
|
-
|
|
44
|
+
static const auto fieldZIndex = clazz->getField<jni::JDouble>("zIndex");
|
|
45
|
+
jni::local_ref<jni::JDouble> zIndex = this->getFieldValue(fieldZIndex);
|
|
46
|
+
static const auto fieldPressable = clazz->getField<jni::JBoolean>("pressable");
|
|
47
|
+
jni::local_ref<jni::JBoolean> pressable = this->getFieldValue(fieldPressable);
|
|
46
48
|
static const auto fieldCoordinates = clazz->getField<jni::JArrayClass<JRNLatLng>>("coordinates");
|
|
47
49
|
jni::local_ref<jni::JArrayClass<JRNLatLng>> coordinates = this->getFieldValue(fieldCoordinates);
|
|
48
50
|
static const auto fieldLineCap = clazz->getField<JRNLineCapType>("lineCap");
|
|
@@ -55,7 +57,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
55
57
|
jni::local_ref<jni::JDouble> width = this->getFieldValue(fieldWidth);
|
|
56
58
|
return RNPolyline(
|
|
57
59
|
id->toStdString(),
|
|
58
|
-
zIndex,
|
|
60
|
+
zIndex != nullptr ? std::make_optional(zIndex->value()) : std::nullopt,
|
|
61
|
+
pressable != nullptr ? std::make_optional(static_cast<bool>(pressable->value())) : std::nullopt,
|
|
59
62
|
[&]() {
|
|
60
63
|
size_t __size = coordinates->size();
|
|
61
64
|
std::vector<RNLatLng> __vector;
|
|
@@ -81,7 +84,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
81
84
|
static jni::local_ref<JRNPolyline::javaobject> fromCpp(const RNPolyline& value) {
|
|
82
85
|
return newInstance(
|
|
83
86
|
jni::make_jstring(value.id),
|
|
84
|
-
value.zIndex,
|
|
87
|
+
value.zIndex.has_value() ? jni::JDouble::valueOf(value.zIndex.value()) : nullptr,
|
|
88
|
+
value.pressable.has_value() ? jni::JBoolean::valueOf(value.pressable.value()) : nullptr,
|
|
85
89
|
[&]() {
|
|
86
90
|
size_t __size = value.coordinates.size();
|
|
87
91
|
jni::local_ref<jni::JArrayClass<JRNLatLng>> __array = jni::JArrayClass<JRNLatLng>::newArray(__size);
|
|
@@ -36,6 +36,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
36
36
|
throw std::runtime_error("HybridRNGoogleMapsPlusViewState's data doesn't contain any props!");
|
|
37
37
|
}
|
|
38
38
|
const HybridRNGoogleMapsPlusViewProps& props = maybeProps.value();
|
|
39
|
+
if (props.initialProps.isDirty) {
|
|
40
|
+
view->setInitialProps(props.initialProps.value);
|
|
41
|
+
// TODO: Set isDirty = false
|
|
42
|
+
}
|
|
39
43
|
if (props.buildingEnabled.isDirty) {
|
|
40
44
|
view->setBuildingEnabled(props.buildingEnabled.value);
|
|
41
45
|
// TODO: Set isDirty = false
|
|
@@ -48,10 +52,6 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
48
52
|
view->setCustomMapStyle(props.customMapStyle.value);
|
|
49
53
|
// TODO: Set isDirty = false
|
|
50
54
|
}
|
|
51
|
-
if (props.initialCamera.isDirty) {
|
|
52
|
-
view->setInitialCamera(props.initialCamera.value);
|
|
53
|
-
// TODO: Set isDirty = false
|
|
54
|
-
}
|
|
55
55
|
if (props.userInterfaceStyle.isDirty) {
|
|
56
56
|
view->setUserInterfaceStyle(props.userInterfaceStyle.value);
|
|
57
57
|
// TODO: Set isDirty = false
|
|
@@ -68,6 +68,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
68
68
|
view->setMapPadding(props.mapPadding.value);
|
|
69
69
|
// TODO: Set isDirty = false
|
|
70
70
|
}
|
|
71
|
+
if (props.mapType.isDirty) {
|
|
72
|
+
view->setMapType(props.mapType.value);
|
|
73
|
+
// TODO: Set isDirty = false
|
|
74
|
+
}
|
|
71
75
|
if (props.markers.isDirty) {
|
|
72
76
|
view->setMarkers(props.markers.value);
|
|
73
77
|
// TODO: Set isDirty = false
|
|
@@ -80,6 +84,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
80
84
|
view->setPolylines(props.polylines.value);
|
|
81
85
|
// TODO: Set isDirty = false
|
|
82
86
|
}
|
|
87
|
+
if (props.circles.isDirty) {
|
|
88
|
+
view->setCircles(props.circles.value);
|
|
89
|
+
// TODO: Set isDirty = false
|
|
90
|
+
}
|
|
83
91
|
if (props.onMapError.isDirty) {
|
|
84
92
|
view->setOnMapError(props.onMapError.value);
|
|
85
93
|
// TODO: Set isDirty = false
|
|
@@ -104,6 +112,18 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
104
112
|
view->setOnMarkerPress(props.onMarkerPress.value);
|
|
105
113
|
// TODO: Set isDirty = false
|
|
106
114
|
}
|
|
115
|
+
if (props.onPolylinePress.isDirty) {
|
|
116
|
+
view->setOnPolylinePress(props.onPolylinePress.value);
|
|
117
|
+
// TODO: Set isDirty = false
|
|
118
|
+
}
|
|
119
|
+
if (props.onPolygonPress.isDirty) {
|
|
120
|
+
view->setOnPolygonPress(props.onPolygonPress.value);
|
|
121
|
+
// TODO: Set isDirty = false
|
|
122
|
+
}
|
|
123
|
+
if (props.onCirclePress.isDirty) {
|
|
124
|
+
view->setOnCirclePress(props.onCirclePress.value);
|
|
125
|
+
// TODO: Set isDirty = false
|
|
126
|
+
}
|
|
107
127
|
if (props.onCameraChangeStart.isDirty) {
|
|
108
128
|
view->setOnCameraChangeStart(props.onCameraChangeStart.value);
|
|
109
129
|
// TODO: Set isDirty = false
|
|
@@ -42,67 +42,79 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
42
42
|
@get:Keep
|
|
43
43
|
@set:DoNotStrip
|
|
44
44
|
@set:Keep
|
|
45
|
-
abstract var
|
|
45
|
+
abstract var initialProps: RNInitialProps?
|
|
46
46
|
|
|
47
47
|
@get:DoNotStrip
|
|
48
48
|
@get:Keep
|
|
49
49
|
@set:DoNotStrip
|
|
50
50
|
@set:Keep
|
|
51
|
-
abstract var
|
|
51
|
+
abstract var buildingEnabled: Boolean?
|
|
52
52
|
|
|
53
53
|
@get:DoNotStrip
|
|
54
54
|
@get:Keep
|
|
55
55
|
@set:DoNotStrip
|
|
56
56
|
@set:Keep
|
|
57
|
-
abstract var
|
|
57
|
+
abstract var trafficEnabled: Boolean?
|
|
58
58
|
|
|
59
59
|
@get:DoNotStrip
|
|
60
60
|
@get:Keep
|
|
61
61
|
@set:DoNotStrip
|
|
62
62
|
@set:Keep
|
|
63
|
-
abstract var
|
|
63
|
+
abstract var customMapStyle: String?
|
|
64
64
|
|
|
65
65
|
@get:DoNotStrip
|
|
66
66
|
@get:Keep
|
|
67
67
|
@set:DoNotStrip
|
|
68
68
|
@set:Keep
|
|
69
|
-
abstract var userInterfaceStyle: RNUserInterfaceStyle
|
|
69
|
+
abstract var userInterfaceStyle: RNUserInterfaceStyle?
|
|
70
70
|
|
|
71
71
|
@get:DoNotStrip
|
|
72
72
|
@get:Keep
|
|
73
73
|
@set:DoNotStrip
|
|
74
74
|
@set:Keep
|
|
75
|
-
abstract var minZoomLevel: Double
|
|
75
|
+
abstract var minZoomLevel: Double?
|
|
76
76
|
|
|
77
77
|
@get:DoNotStrip
|
|
78
78
|
@get:Keep
|
|
79
79
|
@set:DoNotStrip
|
|
80
80
|
@set:Keep
|
|
81
|
-
abstract var maxZoomLevel: Double
|
|
81
|
+
abstract var maxZoomLevel: Double?
|
|
82
82
|
|
|
83
83
|
@get:DoNotStrip
|
|
84
84
|
@get:Keep
|
|
85
85
|
@set:DoNotStrip
|
|
86
86
|
@set:Keep
|
|
87
|
-
abstract var mapPadding: RNMapPadding
|
|
87
|
+
abstract var mapPadding: RNMapPadding?
|
|
88
88
|
|
|
89
89
|
@get:DoNotStrip
|
|
90
90
|
@get:Keep
|
|
91
91
|
@set:DoNotStrip
|
|
92
92
|
@set:Keep
|
|
93
|
-
abstract var
|
|
93
|
+
abstract var mapType: RNMapType?
|
|
94
94
|
|
|
95
95
|
@get:DoNotStrip
|
|
96
96
|
@get:Keep
|
|
97
97
|
@set:DoNotStrip
|
|
98
98
|
@set:Keep
|
|
99
|
-
abstract var
|
|
99
|
+
abstract var markers: Array<RNMarker>?
|
|
100
100
|
|
|
101
101
|
@get:DoNotStrip
|
|
102
102
|
@get:Keep
|
|
103
103
|
@set:DoNotStrip
|
|
104
104
|
@set:Keep
|
|
105
|
-
abstract var
|
|
105
|
+
abstract var polygons: Array<RNPolygon>?
|
|
106
|
+
|
|
107
|
+
@get:DoNotStrip
|
|
108
|
+
@get:Keep
|
|
109
|
+
@set:DoNotStrip
|
|
110
|
+
@set:Keep
|
|
111
|
+
abstract var polylines: Array<RNPolyline>?
|
|
112
|
+
|
|
113
|
+
@get:DoNotStrip
|
|
114
|
+
@get:Keep
|
|
115
|
+
@set:DoNotStrip
|
|
116
|
+
@set:Keep
|
|
117
|
+
abstract var circles: Array<RNCircle>?
|
|
106
118
|
|
|
107
119
|
abstract var onMapError: ((error: RNMapErrorCode) -> Unit)?
|
|
108
120
|
|
|
@@ -188,6 +200,48 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
188
200
|
onMarkerPress = value?.let { it }
|
|
189
201
|
}
|
|
190
202
|
|
|
203
|
+
abstract var onPolylinePress: ((id: String) -> Unit)?
|
|
204
|
+
|
|
205
|
+
private var onPolylinePress_cxx: Func_void_std__string?
|
|
206
|
+
@Keep
|
|
207
|
+
@DoNotStrip
|
|
208
|
+
get() {
|
|
209
|
+
return onPolylinePress?.let { Func_void_std__string_java(it) }
|
|
210
|
+
}
|
|
211
|
+
@Keep
|
|
212
|
+
@DoNotStrip
|
|
213
|
+
set(value) {
|
|
214
|
+
onPolylinePress = value?.let { it }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
abstract var onPolygonPress: ((id: String) -> Unit)?
|
|
218
|
+
|
|
219
|
+
private var onPolygonPress_cxx: Func_void_std__string?
|
|
220
|
+
@Keep
|
|
221
|
+
@DoNotStrip
|
|
222
|
+
get() {
|
|
223
|
+
return onPolygonPress?.let { Func_void_std__string_java(it) }
|
|
224
|
+
}
|
|
225
|
+
@Keep
|
|
226
|
+
@DoNotStrip
|
|
227
|
+
set(value) {
|
|
228
|
+
onPolygonPress = value?.let { it }
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
abstract var onCirclePress: ((id: String) -> Unit)?
|
|
232
|
+
|
|
233
|
+
private var onCirclePress_cxx: Func_void_std__string?
|
|
234
|
+
@Keep
|
|
235
|
+
@DoNotStrip
|
|
236
|
+
get() {
|
|
237
|
+
return onCirclePress?.let { Func_void_std__string_java(it) }
|
|
238
|
+
}
|
|
239
|
+
@Keep
|
|
240
|
+
@DoNotStrip
|
|
241
|
+
set(value) {
|
|
242
|
+
onCirclePress = value?.let { it }
|
|
243
|
+
}
|
|
244
|
+
|
|
191
245
|
abstract var onCameraChangeStart: ((region: RNRegion, camera: RNCamera, isGesture: Boolean) -> Unit)?
|
|
192
246
|
|
|
193
247
|
private var onCameraChangeStart_cxx: Func_void_RNRegion_RNCamera_bool?
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNCircle.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RNCircle".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNCircle
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val id: String,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val pressable: Boolean?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val zIndex: Double?,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val center: RNLatLng,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val radius: Double?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val strokeWidth: Double?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val strokeColor: String?,
|
|
45
|
+
@DoNotStrip
|
|
46
|
+
@Keep
|
|
47
|
+
val fillColor: String?
|
|
48
|
+
) {
|
|
49
|
+
/* main constructor */
|
|
50
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNInitialProps.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RNInitialProps".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNInitialProps
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val mapId: String?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val liteMode: Boolean?,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val initialCamera: RNCamera?
|
|
33
|
+
) {
|
|
34
|
+
/* main constructor */
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapType.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "RNMapType".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class RNMapType(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
NONE(0),
|
|
20
|
+
NORMAL(1),
|
|
21
|
+
HYBRID(2),
|
|
22
|
+
SATELLITE(3),
|
|
23
|
+
TERRAIN(4);
|
|
24
|
+
}
|
|
@@ -36,7 +36,13 @@ class HybridRNGoogleMapsPlusViewManager: SimpleViewManager<View>() {
|
|
|
36
36
|
views.remove(view)
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
/// added by nitrogen-patch.js
|
|
41
|
+
override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View? {
|
|
42
|
+
return null
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
|
|
40
46
|
val hybridView = views[view] ?: throw Error("Couldn't find view $view in local views table!")
|
|
41
47
|
|
|
42
48
|
// 1. Update each prop individually
|