react-native-google-maps-plus 1.1.0-dev.2 → 1.1.0-dev.4
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 +7 -5
- package/RNGoogleMapsPlus.podspec +2 -1
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +91 -102
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -3
- package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +16 -2
- package/android/src/main/java/com/rngooglemapsplus/MapHeatmapBuilder.kt +31 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +26 -9
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +61 -71
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNHeatmapPointExtension.kt +9 -0
- package/ios/GoogleMapViewImpl.swift +129 -213
- package/ios/LocationHandler.swift +2 -10
- package/ios/MapCircleBuilder.swift +23 -8
- package/ios/MapHeatmapBuilder.swift +27 -0
- package/ios/MapHelper.swift +6 -4
- package/ios/MapMarkerBuilder.swift +39 -41
- package/ios/MapPolygonBuilder.swift +25 -7
- package/ios/MapPolylineBuilder.swift +27 -11
- package/ios/RNGoogleMapsPlusView.swift +31 -14
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- package/ios/extensions/RNHeatmap+Extension.swift +16 -0
- package/ios/extensions/RNPolygon+Extension.swift.swift +2 -19
- package/ios/extensions/RNPolyline+Extension.swift.swift +1 -26
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +3 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +24 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +48 -15
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNHeatmap.hpp +100 -0
- package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +89 -0
- package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +57 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +7 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmap.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +32 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +101 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +12 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +23 -11
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +9 -9
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +39 -19
- package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
- package/nitrogen/generated/ios/swift/RNHeatmap.swift +180 -0
- package/nitrogen/generated/ios/swift/RNHeatmapGradient.swift +81 -0
- package/nitrogen/generated/ios/swift/RNHeatmapPoint.swift +57 -0
- package/nitrogen/generated/ios/swift/RNMapZoomConfig.swift +70 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +4 -4
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -4
- package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNHeatmap.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNHeatmapGradient.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNHeatmapPoint.hpp +75 -0
- package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +71 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +19 -19
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -2
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -2
- package/package.json +12 -12
- package/src/RNGoogleMapsPlusView.nitro.ts +4 -2
- package/src/types.ts +28 -1
|
@@ -65,10 +65,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
65
65
|
void setCustomMapStyle(const std::optional<std::string>& customMapStyle) override;
|
|
66
66
|
std::optional<RNUserInterfaceStyle> getUserInterfaceStyle() override;
|
|
67
67
|
void setUserInterfaceStyle(std::optional<RNUserInterfaceStyle> userInterfaceStyle) override;
|
|
68
|
-
std::optional<
|
|
69
|
-
void
|
|
70
|
-
std::optional<double> getMaxZoomLevel() override;
|
|
71
|
-
void setMaxZoomLevel(std::optional<double> maxZoomLevel) override;
|
|
68
|
+
std::optional<RNMapZoomConfig> getMapZoomConfig() override;
|
|
69
|
+
void setMapZoomConfig(const std::optional<RNMapZoomConfig>& mapZoomConfig) override;
|
|
72
70
|
std::optional<RNMapPadding> getMapPadding() override;
|
|
73
71
|
void setMapPadding(const std::optional<RNMapPadding>& mapPadding) override;
|
|
74
72
|
std::optional<RNMapType> getMapType() override;
|
|
@@ -81,6 +79,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
81
79
|
void setPolylines(const std::optional<std::vector<RNPolyline>>& polylines) override;
|
|
82
80
|
std::optional<std::vector<RNCircle>> getCircles() override;
|
|
83
81
|
void setCircles(const std::optional<std::vector<RNCircle>>& circles) override;
|
|
82
|
+
std::optional<std::vector<RNHeatmap>> getHeatmaps() override;
|
|
83
|
+
void setHeatmaps(const std::optional<std::vector<RNHeatmap>>& heatmaps) override;
|
|
84
84
|
std::optional<RNLocationConfig> getLocationConfig() override;
|
|
85
85
|
void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) override;
|
|
86
86
|
std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() override;
|
|
@@ -42,8 +42,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
42
42
|
jni::local_ref<jni::JDouble> zIndex = this->getFieldValue(fieldZIndex);
|
|
43
43
|
static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
|
|
44
44
|
jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
|
|
45
|
-
static const auto fieldRadius = clazz->getField<
|
|
46
|
-
|
|
45
|
+
static const auto fieldRadius = clazz->getField<double>("radius");
|
|
46
|
+
double radius = this->getFieldValue(fieldRadius);
|
|
47
47
|
static const auto fieldStrokeWidth = clazz->getField<jni::JDouble>("strokeWidth");
|
|
48
48
|
jni::local_ref<jni::JDouble> strokeWidth = this->getFieldValue(fieldStrokeWidth);
|
|
49
49
|
static const auto fieldStrokeColor = clazz->getField<jni::JString>("strokeColor");
|
|
@@ -55,7 +55,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
55
55
|
pressable != nullptr ? std::make_optional(static_cast<bool>(pressable->value())) : std::nullopt,
|
|
56
56
|
zIndex != nullptr ? std::make_optional(zIndex->value()) : std::nullopt,
|
|
57
57
|
center->toCpp(),
|
|
58
|
-
radius
|
|
58
|
+
radius,
|
|
59
59
|
strokeWidth != nullptr ? std::make_optional(strokeWidth->value()) : std::nullopt,
|
|
60
60
|
strokeColor != nullptr ? std::make_optional(strokeColor->toStdString()) : std::nullopt,
|
|
61
61
|
fillColor != nullptr ? std::make_optional(fillColor->toStdString()) : std::nullopt
|
|
@@ -73,7 +73,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
73
73
|
value.pressable.has_value() ? jni::JBoolean::valueOf(value.pressable.value()) : nullptr,
|
|
74
74
|
value.zIndex.has_value() ? jni::JDouble::valueOf(value.zIndex.value()) : nullptr,
|
|
75
75
|
JRNLatLng::fromCpp(value.center),
|
|
76
|
-
value.radius
|
|
76
|
+
value.radius,
|
|
77
77
|
value.strokeWidth.has_value() ? jni::JDouble::valueOf(value.strokeWidth.value()) : nullptr,
|
|
78
78
|
value.strokeColor.has_value() ? jni::make_jstring(value.strokeColor.value()) : nullptr,
|
|
79
79
|
value.fillColor.has_value() ? jni::make_jstring(value.fillColor.value()) : nullptr
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNHeatmap.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 "RNHeatmap.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNHeatmapGradient.hpp"
|
|
14
|
+
#include "JRNHeatmapPoint.hpp"
|
|
15
|
+
#include "RNHeatmapGradient.hpp"
|
|
16
|
+
#include "RNHeatmapPoint.hpp"
|
|
17
|
+
#include <optional>
|
|
18
|
+
#include <string>
|
|
19
|
+
#include <vector>
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
|
+
|
|
23
|
+
using namespace facebook;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The C++ JNI bridge between the C++ struct "RNHeatmap" and the the Kotlin data class "RNHeatmap".
|
|
27
|
+
*/
|
|
28
|
+
struct JRNHeatmap final: public jni::JavaClass<JRNHeatmap> {
|
|
29
|
+
public:
|
|
30
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNHeatmap;";
|
|
31
|
+
|
|
32
|
+
public:
|
|
33
|
+
/**
|
|
34
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNHeatmap by copying all values to C++.
|
|
35
|
+
*/
|
|
36
|
+
[[maybe_unused]]
|
|
37
|
+
[[nodiscard]]
|
|
38
|
+
RNHeatmap toCpp() const {
|
|
39
|
+
static const auto clazz = javaClassStatic();
|
|
40
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
41
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
42
|
+
static const auto fieldPressable = clazz->getField<jni::JBoolean>("pressable");
|
|
43
|
+
jni::local_ref<jni::JBoolean> pressable = this->getFieldValue(fieldPressable);
|
|
44
|
+
static const auto fieldZIndex = clazz->getField<jni::JDouble>("zIndex");
|
|
45
|
+
jni::local_ref<jni::JDouble> zIndex = this->getFieldValue(fieldZIndex);
|
|
46
|
+
static const auto fieldWeightedData = clazz->getField<jni::JArrayClass<JRNHeatmapPoint>>("weightedData");
|
|
47
|
+
jni::local_ref<jni::JArrayClass<JRNHeatmapPoint>> weightedData = this->getFieldValue(fieldWeightedData);
|
|
48
|
+
static const auto fieldRadius = clazz->getField<jni::JDouble>("radius");
|
|
49
|
+
jni::local_ref<jni::JDouble> radius = this->getFieldValue(fieldRadius);
|
|
50
|
+
static const auto fieldOpacity = clazz->getField<jni::JDouble>("opacity");
|
|
51
|
+
jni::local_ref<jni::JDouble> opacity = this->getFieldValue(fieldOpacity);
|
|
52
|
+
static const auto fieldGradient = clazz->getField<JRNHeatmapGradient>("gradient");
|
|
53
|
+
jni::local_ref<JRNHeatmapGradient> gradient = this->getFieldValue(fieldGradient);
|
|
54
|
+
return RNHeatmap(
|
|
55
|
+
id->toStdString(),
|
|
56
|
+
pressable != nullptr ? std::make_optional(static_cast<bool>(pressable->value())) : std::nullopt,
|
|
57
|
+
zIndex != nullptr ? std::make_optional(zIndex->value()) : std::nullopt,
|
|
58
|
+
[&]() {
|
|
59
|
+
size_t __size = weightedData->size();
|
|
60
|
+
std::vector<RNHeatmapPoint> __vector;
|
|
61
|
+
__vector.reserve(__size);
|
|
62
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
63
|
+
auto __element = weightedData->getElement(__i);
|
|
64
|
+
__vector.push_back(__element->toCpp());
|
|
65
|
+
}
|
|
66
|
+
return __vector;
|
|
67
|
+
}(),
|
|
68
|
+
radius != nullptr ? std::make_optional(radius->value()) : std::nullopt,
|
|
69
|
+
opacity != nullptr ? std::make_optional(opacity->value()) : std::nullopt,
|
|
70
|
+
gradient != nullptr ? std::make_optional(gradient->toCpp()) : std::nullopt
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public:
|
|
75
|
+
/**
|
|
76
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
77
|
+
*/
|
|
78
|
+
[[maybe_unused]]
|
|
79
|
+
static jni::local_ref<JRNHeatmap::javaobject> fromCpp(const RNHeatmap& value) {
|
|
80
|
+
return newInstance(
|
|
81
|
+
jni::make_jstring(value.id),
|
|
82
|
+
value.pressable.has_value() ? jni::JBoolean::valueOf(value.pressable.value()) : nullptr,
|
|
83
|
+
value.zIndex.has_value() ? jni::JDouble::valueOf(value.zIndex.value()) : nullptr,
|
|
84
|
+
[&]() {
|
|
85
|
+
size_t __size = value.weightedData.size();
|
|
86
|
+
jni::local_ref<jni::JArrayClass<JRNHeatmapPoint>> __array = jni::JArrayClass<JRNHeatmapPoint>::newArray(__size);
|
|
87
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
88
|
+
const auto& __element = value.weightedData[__i];
|
|
89
|
+
__array->setElement(__i, *JRNHeatmapPoint::fromCpp(__element));
|
|
90
|
+
}
|
|
91
|
+
return __array;
|
|
92
|
+
}(),
|
|
93
|
+
value.radius.has_value() ? jni::JDouble::valueOf(value.radius.value()) : nullptr,
|
|
94
|
+
value.opacity.has_value() ? jni::JDouble::valueOf(value.opacity.value()) : nullptr,
|
|
95
|
+
value.gradient.has_value() ? JRNHeatmapGradient::fromCpp(value.gradient.value()) : nullptr
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNHeatmapGradient.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 "RNHeatmapGradient.hpp"
|
|
12
|
+
|
|
13
|
+
#include <string>
|
|
14
|
+
#include <vector>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "RNHeatmapGradient" and the the Kotlin data class "RNHeatmapGradient".
|
|
22
|
+
*/
|
|
23
|
+
struct JRNHeatmapGradient final: public jni::JavaClass<JRNHeatmapGradient> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNHeatmapGradient;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNHeatmapGradient by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
RNHeatmapGradient toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldColors = clazz->getField<jni::JArrayClass<jni::JString>>("colors");
|
|
36
|
+
jni::local_ref<jni::JArrayClass<jni::JString>> colors = this->getFieldValue(fieldColors);
|
|
37
|
+
static const auto fieldStartPoints = clazz->getField<jni::JArrayDouble>("startPoints");
|
|
38
|
+
jni::local_ref<jni::JArrayDouble> startPoints = this->getFieldValue(fieldStartPoints);
|
|
39
|
+
static const auto fieldColorMapSize = clazz->getField<double>("colorMapSize");
|
|
40
|
+
double colorMapSize = this->getFieldValue(fieldColorMapSize);
|
|
41
|
+
return RNHeatmapGradient(
|
|
42
|
+
[&]() {
|
|
43
|
+
size_t __size = colors->size();
|
|
44
|
+
std::vector<std::string> __vector;
|
|
45
|
+
__vector.reserve(__size);
|
|
46
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
47
|
+
auto __element = colors->getElement(__i);
|
|
48
|
+
__vector.push_back(__element->toStdString());
|
|
49
|
+
}
|
|
50
|
+
return __vector;
|
|
51
|
+
}(),
|
|
52
|
+
[&]() {
|
|
53
|
+
size_t __size = startPoints->size();
|
|
54
|
+
std::vector<double> __vector(__size);
|
|
55
|
+
startPoints->getRegion(0, __size, __vector.data());
|
|
56
|
+
return __vector;
|
|
57
|
+
}(),
|
|
58
|
+
colorMapSize
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public:
|
|
63
|
+
/**
|
|
64
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
65
|
+
*/
|
|
66
|
+
[[maybe_unused]]
|
|
67
|
+
static jni::local_ref<JRNHeatmapGradient::javaobject> fromCpp(const RNHeatmapGradient& value) {
|
|
68
|
+
return newInstance(
|
|
69
|
+
[&]() {
|
|
70
|
+
size_t __size = value.colors.size();
|
|
71
|
+
jni::local_ref<jni::JArrayClass<jni::JString>> __array = jni::JArrayClass<jni::JString>::newArray(__size);
|
|
72
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
73
|
+
const auto& __element = value.colors[__i];
|
|
74
|
+
__array->setElement(__i, *jni::make_jstring(__element));
|
|
75
|
+
}
|
|
76
|
+
return __array;
|
|
77
|
+
}(),
|
|
78
|
+
[&]() {
|
|
79
|
+
size_t __size = value.startPoints.size();
|
|
80
|
+
jni::local_ref<jni::JArrayDouble> __array = jni::JArrayDouble::newArray(__size);
|
|
81
|
+
__array->setRegion(0, __size, value.startPoints.data());
|
|
82
|
+
return __array;
|
|
83
|
+
}(),
|
|
84
|
+
value.colorMapSize
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNHeatmapPoint.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 "RNHeatmapPoint.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNHeatmapPoint" and the the Kotlin data class "RNHeatmapPoint".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNHeatmapPoint final: public jni::JavaClass<JRNHeatmapPoint> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNHeatmapPoint;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNHeatmapPoint by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNHeatmapPoint toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldLatitude = clazz->getField<double>("latitude");
|
|
35
|
+
double latitude = this->getFieldValue(fieldLatitude);
|
|
36
|
+
static const auto fieldLongitude = clazz->getField<double>("longitude");
|
|
37
|
+
double longitude = this->getFieldValue(fieldLongitude);
|
|
38
|
+
static const auto fieldWeight = clazz->getField<double>("weight");
|
|
39
|
+
double weight = this->getFieldValue(fieldWeight);
|
|
40
|
+
return RNHeatmapPoint(
|
|
41
|
+
latitude,
|
|
42
|
+
longitude,
|
|
43
|
+
weight
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
50
|
+
*/
|
|
51
|
+
[[maybe_unused]]
|
|
52
|
+
static jni::local_ref<JRNHeatmapPoint::javaobject> fromCpp(const RNHeatmapPoint& value) {
|
|
53
|
+
return newInstance(
|
|
54
|
+
value.latitude,
|
|
55
|
+
value.longitude,
|
|
56
|
+
value.weight
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNMapZoomConfig.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 "RNMapZoomConfig.hpp"
|
|
12
|
+
|
|
13
|
+
#include <optional>
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNMapZoomConfig" and the the Kotlin data class "RNMapZoomConfig".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNMapZoomConfig final: public jni::JavaClass<JRNMapZoomConfig> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNMapZoomConfig;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNMapZoomConfig by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNMapZoomConfig toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldMin = clazz->getField<jni::JDouble>("min");
|
|
35
|
+
jni::local_ref<jni::JDouble> min = this->getFieldValue(fieldMin);
|
|
36
|
+
static const auto fieldMax = clazz->getField<jni::JDouble>("max");
|
|
37
|
+
jni::local_ref<jni::JDouble> max = this->getFieldValue(fieldMax);
|
|
38
|
+
return RNMapZoomConfig(
|
|
39
|
+
min != nullptr ? std::make_optional(min->value()) : std::nullopt,
|
|
40
|
+
max != nullptr ? std::make_optional(max->value()) : std::nullopt
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JRNMapZoomConfig::javaobject> fromCpp(const RNMapZoomConfig& value) {
|
|
50
|
+
return newInstance(
|
|
51
|
+
value.min.has_value() ? jni::JDouble::valueOf(value.min.value()) : nullptr,
|
|
52
|
+
value.max.has_value() ? jni::JDouble::valueOf(value.max.value()) : nullptr
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -68,12 +68,8 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
68
68
|
view->setUserInterfaceStyle(props.userInterfaceStyle.value);
|
|
69
69
|
// TODO: Set isDirty = false
|
|
70
70
|
}
|
|
71
|
-
if (props.
|
|
72
|
-
view->
|
|
73
|
-
// TODO: Set isDirty = false
|
|
74
|
-
}
|
|
75
|
-
if (props.maxZoomLevel.isDirty) {
|
|
76
|
-
view->setMaxZoomLevel(props.maxZoomLevel.value);
|
|
71
|
+
if (props.mapZoomConfig.isDirty) {
|
|
72
|
+
view->setMapZoomConfig(props.mapZoomConfig.value);
|
|
77
73
|
// TODO: Set isDirty = false
|
|
78
74
|
}
|
|
79
75
|
if (props.mapPadding.isDirty) {
|
|
@@ -100,6 +96,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
100
96
|
view->setCircles(props.circles.value);
|
|
101
97
|
// TODO: Set isDirty = false
|
|
102
98
|
}
|
|
99
|
+
if (props.heatmaps.isDirty) {
|
|
100
|
+
view->setHeatmaps(props.heatmaps.value);
|
|
101
|
+
// TODO: Set isDirty = false
|
|
102
|
+
}
|
|
103
103
|
if (props.locationConfig.isDirty) {
|
|
104
104
|
view->setLocationConfig(props.locationConfig.value);
|
|
105
105
|
// TODO: Set isDirty = false
|
|
@@ -90,13 +90,7 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
90
90
|
@get:Keep
|
|
91
91
|
@set:DoNotStrip
|
|
92
92
|
@set:Keep
|
|
93
|
-
abstract var
|
|
94
|
-
|
|
95
|
-
@get:DoNotStrip
|
|
96
|
-
@get:Keep
|
|
97
|
-
@set:DoNotStrip
|
|
98
|
-
@set:Keep
|
|
99
|
-
abstract var maxZoomLevel: Double?
|
|
93
|
+
abstract var mapZoomConfig: RNMapZoomConfig?
|
|
100
94
|
|
|
101
95
|
@get:DoNotStrip
|
|
102
96
|
@get:Keep
|
|
@@ -134,6 +128,12 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
134
128
|
@set:Keep
|
|
135
129
|
abstract var circles: Array<RNCircle>?
|
|
136
130
|
|
|
131
|
+
@get:DoNotStrip
|
|
132
|
+
@get:Keep
|
|
133
|
+
@set:DoNotStrip
|
|
134
|
+
@set:Keep
|
|
135
|
+
abstract var heatmaps: Array<RNHeatmap>?
|
|
136
|
+
|
|
137
137
|
@get:DoNotStrip
|
|
138
138
|
@get:Keep
|
|
139
139
|
@set:DoNotStrip
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmap.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 "RNHeatmap".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNHeatmap
|
|
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 weightedData: Array<RNHeatmapPoint>,
|
|
36
|
+
@DoNotStrip
|
|
37
|
+
@Keep
|
|
38
|
+
val radius: Double?,
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
val opacity: Double?,
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
val gradient: RNHeatmapGradient?
|
|
45
|
+
) {
|
|
46
|
+
/* main constructor */
|
|
47
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmapGradient.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 "RNHeatmapGradient".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNHeatmapGradient
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val colors: Array<String>,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val startPoints: DoubleArray,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val colorMapSize: Double
|
|
33
|
+
) {
|
|
34
|
+
/* main constructor */
|
|
35
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.kt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmapPoint.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 "RNHeatmapPoint".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNHeatmapPoint
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val latitude: Double,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val longitude: Double,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val weight: Double
|
|
33
|
+
) {
|
|
34
|
+
/* main constructor */
|
|
35
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapZoomConfig.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 "RNMapZoomConfig".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNMapZoomConfig
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val min: Double?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val max: Double?
|
|
30
|
+
) {
|
|
31
|
+
/* main constructor */
|
|
32
|
+
}
|