react-native-google-maps-plus 1.6.2 → 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/proguard-rules.pro +29 -0
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +461 -445
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +5 -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 +142 -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 +93 -33
- 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 +182 -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 +75 -10
- 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 +9 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +19 -8
- 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 +265 -73
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +34 -14
- 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 +36 -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 +147 -21
- 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 +176 -36
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +98 -20
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +45 -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 +18 -7
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +392 -126
- 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 +20 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +43 -20
- 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 +122 -14
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +19 -9
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +9 -0
- package/package.json +8 -5
- package/src/RNGoogleMapsPlusView.nitro.ts +21 -7
- 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
|
@@ -56,10 +56,11 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
56
56
|
std::optional<double> rotation SWIFT_PRIVATE;
|
|
57
57
|
std::optional<RNPosition> infoWindowAnchor SWIFT_PRIVATE;
|
|
58
58
|
std::optional<RNMarkerSvg> iconSvg SWIFT_PRIVATE;
|
|
59
|
+
std::optional<RNMarkerSvg> infoWindowIconSvg SWIFT_PRIVATE;
|
|
59
60
|
|
|
60
61
|
public:
|
|
61
62
|
RNMarker() = default;
|
|
62
|
-
explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<bool> showInfoWindow, std::optional<std::string> title, std::optional<std::string> snippet, std::optional<double> opacity, std::optional<bool> flat, std::optional<bool> draggable, std::optional<double> rotation, std::optional<RNPosition> infoWindowAnchor, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), showInfoWindow(showInfoWindow), title(title), snippet(snippet), opacity(opacity), flat(flat), draggable(draggable), rotation(rotation), infoWindowAnchor(infoWindowAnchor), iconSvg(iconSvg) {}
|
|
63
|
+
explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<bool> showInfoWindow, std::optional<std::string> title, std::optional<std::string> snippet, std::optional<double> opacity, std::optional<bool> flat, std::optional<bool> draggable, std::optional<double> rotation, std::optional<RNPosition> infoWindowAnchor, std::optional<RNMarkerSvg> iconSvg, std::optional<RNMarkerSvg> infoWindowIconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), showInfoWindow(showInfoWindow), title(title), snippet(snippet), opacity(opacity), flat(flat), draggable(draggable), rotation(rotation), infoWindowAnchor(infoWindowAnchor), iconSvg(iconSvg), infoWindowIconSvg(infoWindowIconSvg) {}
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -84,7 +85,8 @@ namespace margelo::nitro {
|
|
|
84
85
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "draggable")),
|
|
85
86
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "rotation")),
|
|
86
87
|
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "infoWindowAnchor")),
|
|
87
|
-
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg")),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "infoWindowIconSvg"))
|
|
88
90
|
);
|
|
89
91
|
}
|
|
90
92
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMarker& arg) {
|
|
@@ -102,6 +104,7 @@ namespace margelo::nitro {
|
|
|
102
104
|
obj.setProperty(runtime, "rotation", JSIConverter<std::optional<double>>::toJSI(runtime, arg.rotation));
|
|
103
105
|
obj.setProperty(runtime, "infoWindowAnchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.infoWindowAnchor));
|
|
104
106
|
obj.setProperty(runtime, "iconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.iconSvg));
|
|
107
|
+
obj.setProperty(runtime, "infoWindowIconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.infoWindowIconSvg));
|
|
105
108
|
return obj;
|
|
106
109
|
}
|
|
107
110
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -125,6 +128,7 @@ namespace margelo::nitro {
|
|
|
125
128
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "rotation"))) return false;
|
|
126
129
|
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "infoWindowAnchor"))) return false;
|
|
127
130
|
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
|
|
131
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "infoWindowIconSvg"))) return false;
|
|
128
132
|
return true;
|
|
129
133
|
}
|
|
130
134
|
};
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNUrlTileOverlay.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
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <optional>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (RNUrlTileOverlay).
|
|
35
|
+
*/
|
|
36
|
+
struct RNUrlTileOverlay {
|
|
37
|
+
public:
|
|
38
|
+
std::string id SWIFT_PRIVATE;
|
|
39
|
+
std::optional<double> zIndex SWIFT_PRIVATE;
|
|
40
|
+
std::string url SWIFT_PRIVATE;
|
|
41
|
+
double tileSize SWIFT_PRIVATE;
|
|
42
|
+
std::optional<double> opacity SWIFT_PRIVATE;
|
|
43
|
+
std::optional<bool> fadeIn SWIFT_PRIVATE;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
RNUrlTileOverlay() = default;
|
|
47
|
+
explicit RNUrlTileOverlay(std::string id, std::optional<double> zIndex, std::string url, double tileSize, std::optional<double> opacity, std::optional<bool> fadeIn): id(id), zIndex(zIndex), url(url), tileSize(tileSize), opacity(opacity), fadeIn(fadeIn) {}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
51
|
+
|
|
52
|
+
namespace margelo::nitro {
|
|
53
|
+
|
|
54
|
+
// C++ RNUrlTileOverlay <> JS RNUrlTileOverlay (object)
|
|
55
|
+
template <>
|
|
56
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNUrlTileOverlay> final {
|
|
57
|
+
static inline margelo::nitro::rngooglemapsplus::RNUrlTileOverlay fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
58
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
59
|
+
return margelo::nitro::rngooglemapsplus::RNUrlTileOverlay(
|
|
60
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
61
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "url")),
|
|
63
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "tileSize")),
|
|
64
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "opacity")),
|
|
65
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "fadeIn"))
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNUrlTileOverlay& arg) {
|
|
69
|
+
jsi::Object obj(runtime);
|
|
70
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
71
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
|
|
72
|
+
obj.setProperty(runtime, "url", JSIConverter<std::string>::toJSI(runtime, arg.url));
|
|
73
|
+
obj.setProperty(runtime, "tileSize", JSIConverter<double>::toJSI(runtime, arg.tileSize));
|
|
74
|
+
obj.setProperty(runtime, "opacity", JSIConverter<std::optional<double>>::toJSI(runtime, arg.opacity));
|
|
75
|
+
obj.setProperty(runtime, "fadeIn", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.fadeIn));
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
79
|
+
if (!value.isObject()) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
jsi::Object obj = value.getObject(runtime);
|
|
83
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
87
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "url"))) return false;
|
|
89
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "tileSize"))) return false;
|
|
90
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "opacity"))) return false;
|
|
91
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "fadeIn"))) return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
} // namespace margelo::nitro
|
|
@@ -195,6 +195,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
195
195
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.kmlLayers: ") + exc.what());
|
|
196
196
|
}
|
|
197
197
|
}()),
|
|
198
|
+
urlTileOverlays([&]() -> CachedProp<std::optional<std::vector<RNUrlTileOverlay>>> {
|
|
199
|
+
try {
|
|
200
|
+
const react::RawValue* rawValue = rawProps.at("urlTileOverlays", nullptr, nullptr);
|
|
201
|
+
if (rawValue == nullptr) return sourceProps.urlTileOverlays;
|
|
202
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
203
|
+
return CachedProp<std::optional<std::vector<RNUrlTileOverlay>>>::fromRawValue(*runtime, value, sourceProps.urlTileOverlays);
|
|
204
|
+
} catch (const std::exception& exc) {
|
|
205
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.urlTileOverlays: ") + exc.what());
|
|
206
|
+
}
|
|
207
|
+
}()),
|
|
198
208
|
locationConfig([&]() -> CachedProp<std::optional<RNLocationConfig>> {
|
|
199
209
|
try {
|
|
200
210
|
const react::RawValue* rawValue = rawProps.at("locationConfig", nullptr, nullptr);
|
|
@@ -225,6 +235,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
225
235
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapReady: ") + exc.what());
|
|
226
236
|
}
|
|
227
237
|
}()),
|
|
238
|
+
onMapLoaded([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>> {
|
|
239
|
+
try {
|
|
240
|
+
const react::RawValue* rawValue = rawProps.at("onMapLoaded", nullptr, nullptr);
|
|
241
|
+
if (rawValue == nullptr) return sourceProps.onMapLoaded;
|
|
242
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
243
|
+
return CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMapLoaded);
|
|
244
|
+
} catch (const std::exception& exc) {
|
|
245
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapLoaded: ") + exc.what());
|
|
246
|
+
}
|
|
247
|
+
}()),
|
|
228
248
|
onLocationUpdate([&]() -> CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> {
|
|
229
249
|
try {
|
|
230
250
|
const react::RawValue* rawValue = rawProps.at("onLocationUpdate", nullptr, nullptr);
|
|
@@ -255,72 +275,92 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
255
275
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapPress: ") + exc.what());
|
|
256
276
|
}
|
|
257
277
|
}()),
|
|
258
|
-
|
|
278
|
+
onMapLongPress([&]() -> CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> {
|
|
279
|
+
try {
|
|
280
|
+
const react::RawValue* rawValue = rawProps.at("onMapLongPress", nullptr, nullptr);
|
|
281
|
+
if (rawValue == nullptr) return sourceProps.onMapLongPress;
|
|
282
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
283
|
+
return CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMapLongPress);
|
|
284
|
+
} catch (const std::exception& exc) {
|
|
285
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapLongPress: ") + exc.what());
|
|
286
|
+
}
|
|
287
|
+
}()),
|
|
288
|
+
onPoiPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>> {
|
|
289
|
+
try {
|
|
290
|
+
const react::RawValue* rawValue = rawProps.at("onPoiPress", nullptr, nullptr);
|
|
291
|
+
if (rawValue == nullptr) return sourceProps.onPoiPress;
|
|
292
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
293
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPoiPress);
|
|
294
|
+
} catch (const std::exception& exc) {
|
|
295
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPoiPress: ") + exc.what());
|
|
296
|
+
}
|
|
297
|
+
}()),
|
|
298
|
+
onMarkerPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
259
299
|
try {
|
|
260
300
|
const react::RawValue* rawValue = rawProps.at("onMarkerPress", nullptr, nullptr);
|
|
261
301
|
if (rawValue == nullptr) return sourceProps.onMarkerPress;
|
|
262
302
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
263
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
303
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerPress);
|
|
264
304
|
} catch (const std::exception& exc) {
|
|
265
305
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerPress: ") + exc.what());
|
|
266
306
|
}
|
|
267
307
|
}()),
|
|
268
|
-
onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
308
|
+
onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
269
309
|
try {
|
|
270
310
|
const react::RawValue* rawValue = rawProps.at("onPolylinePress", nullptr, nullptr);
|
|
271
311
|
if (rawValue == nullptr) return sourceProps.onPolylinePress;
|
|
272
312
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
273
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
313
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolylinePress);
|
|
274
314
|
} catch (const std::exception& exc) {
|
|
275
315
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolylinePress: ") + exc.what());
|
|
276
316
|
}
|
|
277
317
|
}()),
|
|
278
|
-
onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
318
|
+
onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
279
319
|
try {
|
|
280
320
|
const react::RawValue* rawValue = rawProps.at("onPolygonPress", nullptr, nullptr);
|
|
281
321
|
if (rawValue == nullptr) return sourceProps.onPolygonPress;
|
|
282
322
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
283
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
323
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPolygonPress);
|
|
284
324
|
} catch (const std::exception& exc) {
|
|
285
325
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolygonPress: ") + exc.what());
|
|
286
326
|
}
|
|
287
327
|
}()),
|
|
288
|
-
onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
328
|
+
onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
289
329
|
try {
|
|
290
330
|
const react::RawValue* rawValue = rawProps.at("onCirclePress", nullptr, nullptr);
|
|
291
331
|
if (rawValue == nullptr) return sourceProps.onCirclePress;
|
|
292
332
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
293
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
333
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onCirclePress);
|
|
294
334
|
} catch (const std::exception& exc) {
|
|
295
335
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onCirclePress: ") + exc.what());
|
|
296
336
|
}
|
|
297
337
|
}()),
|
|
298
|
-
onMarkerDragStart([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
338
|
+
onMarkerDragStart([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
299
339
|
try {
|
|
300
340
|
const react::RawValue* rawValue = rawProps.at("onMarkerDragStart", nullptr, nullptr);
|
|
301
341
|
if (rawValue == nullptr) return sourceProps.onMarkerDragStart;
|
|
302
342
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
303
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
343
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDragStart);
|
|
304
344
|
} catch (const std::exception& exc) {
|
|
305
345
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragStart: ") + exc.what());
|
|
306
346
|
}
|
|
307
347
|
}()),
|
|
308
|
-
onMarkerDrag([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
348
|
+
onMarkerDrag([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
309
349
|
try {
|
|
310
350
|
const react::RawValue* rawValue = rawProps.at("onMarkerDrag", nullptr, nullptr);
|
|
311
351
|
if (rawValue == nullptr) return sourceProps.onMarkerDrag;
|
|
312
352
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
313
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
353
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDrag);
|
|
314
354
|
} catch (const std::exception& exc) {
|
|
315
355
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDrag: ") + exc.what());
|
|
316
356
|
}
|
|
317
357
|
}()),
|
|
318
|
-
onMarkerDragEnd([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
358
|
+
onMarkerDragEnd([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
319
359
|
try {
|
|
320
360
|
const react::RawValue* rawValue = rawProps.at("onMarkerDragEnd", nullptr, nullptr);
|
|
321
361
|
if (rawValue == nullptr) return sourceProps.onMarkerDragEnd;
|
|
322
362
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
323
|
-
return CachedProp<std::optional<std::function<void(const std::
|
|
363
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMarkerDragEnd);
|
|
324
364
|
} catch (const std::exception& exc) {
|
|
325
365
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragEnd: ") + exc.what());
|
|
326
366
|
}
|
|
@@ -345,6 +385,56 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
345
385
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorLevelActivated: ") + exc.what());
|
|
346
386
|
}
|
|
347
387
|
}()),
|
|
388
|
+
onInfoWindowPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
389
|
+
try {
|
|
390
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowPress", nullptr, nullptr);
|
|
391
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowPress;
|
|
392
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
393
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowPress);
|
|
394
|
+
} catch (const std::exception& exc) {
|
|
395
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowPress: ") + exc.what());
|
|
396
|
+
}
|
|
397
|
+
}()),
|
|
398
|
+
onInfoWindowClose([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
399
|
+
try {
|
|
400
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowClose", nullptr, nullptr);
|
|
401
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowClose;
|
|
402
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
403
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowClose);
|
|
404
|
+
} catch (const std::exception& exc) {
|
|
405
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowClose: ") + exc.what());
|
|
406
|
+
}
|
|
407
|
+
}()),
|
|
408
|
+
onInfoWindowLongPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
409
|
+
try {
|
|
410
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowLongPress", nullptr, nullptr);
|
|
411
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowLongPress;
|
|
412
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
413
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowLongPress);
|
|
414
|
+
} catch (const std::exception& exc) {
|
|
415
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowLongPress: ") + exc.what());
|
|
416
|
+
}
|
|
417
|
+
}()),
|
|
418
|
+
onMyLocationPress([&]() -> CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> {
|
|
419
|
+
try {
|
|
420
|
+
const react::RawValue* rawValue = rawProps.at("onMyLocationPress", nullptr, nullptr);
|
|
421
|
+
if (rawValue == nullptr) return sourceProps.onMyLocationPress;
|
|
422
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
423
|
+
return CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMyLocationPress);
|
|
424
|
+
} catch (const std::exception& exc) {
|
|
425
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMyLocationPress: ") + exc.what());
|
|
426
|
+
}
|
|
427
|
+
}()),
|
|
428
|
+
onMyLocationButtonPress([&]() -> CachedProp<std::optional<std::function<void(bool /* pressed */)>>> {
|
|
429
|
+
try {
|
|
430
|
+
const react::RawValue* rawValue = rawProps.at("onMyLocationButtonPress", nullptr, nullptr);
|
|
431
|
+
if (rawValue == nullptr) return sourceProps.onMyLocationButtonPress;
|
|
432
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
433
|
+
return CachedProp<std::optional<std::function<void(bool /* pressed */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMyLocationButtonPress);
|
|
434
|
+
} catch (const std::exception& exc) {
|
|
435
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMyLocationButtonPress: ") + exc.what());
|
|
436
|
+
}
|
|
437
|
+
}()),
|
|
348
438
|
onCameraChangeStart([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> {
|
|
349
439
|
try {
|
|
350
440
|
const react::RawValue* rawValue = rawProps.at("onCameraChangeStart", nullptr, nullptr);
|
|
@@ -405,12 +495,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
405
495
|
circles(other.circles),
|
|
406
496
|
heatmaps(other.heatmaps),
|
|
407
497
|
kmlLayers(other.kmlLayers),
|
|
498
|
+
urlTileOverlays(other.urlTileOverlays),
|
|
408
499
|
locationConfig(other.locationConfig),
|
|
409
500
|
onMapError(other.onMapError),
|
|
410
501
|
onMapReady(other.onMapReady),
|
|
502
|
+
onMapLoaded(other.onMapLoaded),
|
|
411
503
|
onLocationUpdate(other.onLocationUpdate),
|
|
412
504
|
onLocationError(other.onLocationError),
|
|
413
505
|
onMapPress(other.onMapPress),
|
|
506
|
+
onMapLongPress(other.onMapLongPress),
|
|
507
|
+
onPoiPress(other.onPoiPress),
|
|
414
508
|
onMarkerPress(other.onMarkerPress),
|
|
415
509
|
onPolylinePress(other.onPolylinePress),
|
|
416
510
|
onPolygonPress(other.onPolygonPress),
|
|
@@ -420,6 +514,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
420
514
|
onMarkerDragEnd(other.onMarkerDragEnd),
|
|
421
515
|
onIndoorBuildingFocused(other.onIndoorBuildingFocused),
|
|
422
516
|
onIndoorLevelActivated(other.onIndoorLevelActivated),
|
|
517
|
+
onInfoWindowPress(other.onInfoWindowPress),
|
|
518
|
+
onInfoWindowClose(other.onInfoWindowClose),
|
|
519
|
+
onInfoWindowLongPress(other.onInfoWindowLongPress),
|
|
520
|
+
onMyLocationPress(other.onMyLocationPress),
|
|
521
|
+
onMyLocationButtonPress(other.onMyLocationButtonPress),
|
|
423
522
|
onCameraChangeStart(other.onCameraChangeStart),
|
|
424
523
|
onCameraChange(other.onCameraChange),
|
|
425
524
|
onCameraChangeComplete(other.onCameraChangeComplete),
|
|
@@ -444,12 +543,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
444
543
|
case hashString("circles"): return true;
|
|
445
544
|
case hashString("heatmaps"): return true;
|
|
446
545
|
case hashString("kmlLayers"): return true;
|
|
546
|
+
case hashString("urlTileOverlays"): return true;
|
|
447
547
|
case hashString("locationConfig"): return true;
|
|
448
548
|
case hashString("onMapError"): return true;
|
|
449
549
|
case hashString("onMapReady"): return true;
|
|
550
|
+
case hashString("onMapLoaded"): return true;
|
|
450
551
|
case hashString("onLocationUpdate"): return true;
|
|
451
552
|
case hashString("onLocationError"): return true;
|
|
452
553
|
case hashString("onMapPress"): return true;
|
|
554
|
+
case hashString("onMapLongPress"): return true;
|
|
555
|
+
case hashString("onPoiPress"): return true;
|
|
453
556
|
case hashString("onMarkerPress"): return true;
|
|
454
557
|
case hashString("onPolylinePress"): return true;
|
|
455
558
|
case hashString("onPolygonPress"): return true;
|
|
@@ -459,6 +562,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
459
562
|
case hashString("onMarkerDragEnd"): return true;
|
|
460
563
|
case hashString("onIndoorBuildingFocused"): return true;
|
|
461
564
|
case hashString("onIndoorLevelActivated"): return true;
|
|
565
|
+
case hashString("onInfoWindowPress"): return true;
|
|
566
|
+
case hashString("onInfoWindowClose"): return true;
|
|
567
|
+
case hashString("onInfoWindowLongPress"): return true;
|
|
568
|
+
case hashString("onMyLocationPress"): return true;
|
|
569
|
+
case hashString("onMyLocationButtonPress"): return true;
|
|
462
570
|
case hashString("onCameraChangeStart"): return true;
|
|
463
571
|
case hashString("onCameraChange"): return true;
|
|
464
572
|
case hashString("onCameraChangeComplete"): return true;
|
|
@@ -31,16 +31,17 @@
|
|
|
31
31
|
#include "RNCircle.hpp"
|
|
32
32
|
#include "RNHeatmap.hpp"
|
|
33
33
|
#include "RNKMLayer.hpp"
|
|
34
|
+
#include "RNUrlTileOverlay.hpp"
|
|
34
35
|
#include "RNLocationConfig.hpp"
|
|
35
36
|
#include "RNMapErrorCode.hpp"
|
|
36
37
|
#include <functional>
|
|
38
|
+
#include "RNRegion.hpp"
|
|
39
|
+
#include "RNCamera.hpp"
|
|
37
40
|
#include "RNLocation.hpp"
|
|
38
41
|
#include "RNLocationErrorCode.hpp"
|
|
39
42
|
#include "RNLatLng.hpp"
|
|
40
43
|
#include "RNIndoorBuilding.hpp"
|
|
41
44
|
#include "RNIndoorLevel.hpp"
|
|
42
|
-
#include "RNRegion.hpp"
|
|
43
|
-
#include "RNCamera.hpp"
|
|
44
45
|
#include <memory>
|
|
45
46
|
#include "HybridRNGoogleMapsPlusViewSpec.hpp"
|
|
46
47
|
|
|
@@ -82,21 +83,30 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
82
83
|
CachedProp<std::optional<std::vector<RNCircle>>> circles;
|
|
83
84
|
CachedProp<std::optional<std::vector<RNHeatmap>>> heatmaps;
|
|
84
85
|
CachedProp<std::optional<std::vector<RNKMLayer>>> kmlLayers;
|
|
86
|
+
CachedProp<std::optional<std::vector<RNUrlTileOverlay>>> urlTileOverlays;
|
|
85
87
|
CachedProp<std::optional<RNLocationConfig>> locationConfig;
|
|
86
88
|
CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>> onMapError;
|
|
87
89
|
CachedProp<std::optional<std::function<void(bool /* ready */)>>> onMapReady;
|
|
90
|
+
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>> onMapLoaded;
|
|
88
91
|
CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onLocationUpdate;
|
|
89
92
|
CachedProp<std::optional<std::function<void(RNLocationErrorCode /* error */)>>> onLocationError;
|
|
90
93
|
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapPress;
|
|
91
|
-
CachedProp<std::optional<std::function<void(const
|
|
92
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
93
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
94
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
95
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
96
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
97
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
94
|
+
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapLongPress;
|
|
95
|
+
CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>> onPoiPress;
|
|
96
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onMarkerPress;
|
|
97
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onPolylinePress;
|
|
98
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onPolygonPress;
|
|
99
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onCirclePress;
|
|
100
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> onMarkerDragStart;
|
|
101
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> onMarkerDrag;
|
|
102
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> onMarkerDragEnd;
|
|
98
103
|
CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> onIndoorBuildingFocused;
|
|
99
104
|
CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> onIndoorLevelActivated;
|
|
105
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onInfoWindowPress;
|
|
106
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onInfoWindowClose;
|
|
107
|
+
CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> onInfoWindowLongPress;
|
|
108
|
+
CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onMyLocationPress;
|
|
109
|
+
CachedProp<std::optional<std::function<void(bool /* pressed */)>>> onMyLocationButtonPress;
|
|
100
110
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
|
|
101
111
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
|
|
102
112
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
|
|
@@ -21,12 +21,16 @@
|
|
|
21
21
|
"circles": true,
|
|
22
22
|
"heatmaps": true,
|
|
23
23
|
"kmlLayers": true,
|
|
24
|
+
"urlTileOverlays": true,
|
|
24
25
|
"locationConfig": true,
|
|
25
26
|
"onMapError": true,
|
|
26
27
|
"onMapReady": true,
|
|
28
|
+
"onMapLoaded": true,
|
|
27
29
|
"onLocationUpdate": true,
|
|
28
30
|
"onLocationError": true,
|
|
29
31
|
"onMapPress": true,
|
|
32
|
+
"onMapLongPress": true,
|
|
33
|
+
"onPoiPress": true,
|
|
30
34
|
"onMarkerPress": true,
|
|
31
35
|
"onPolylinePress": true,
|
|
32
36
|
"onPolygonPress": true,
|
|
@@ -36,6 +40,11 @@
|
|
|
36
40
|
"onMarkerDragEnd": true,
|
|
37
41
|
"onIndoorBuildingFocused": true,
|
|
38
42
|
"onIndoorLevelActivated": true,
|
|
43
|
+
"onInfoWindowPress": true,
|
|
44
|
+
"onInfoWindowClose": true,
|
|
45
|
+
"onInfoWindowLongPress": true,
|
|
46
|
+
"onMyLocationPress": true,
|
|
47
|
+
"onMyLocationButtonPress": true,
|
|
39
48
|
"onCameraChangeStart": true,
|
|
40
49
|
"onCameraChange": true,
|
|
41
50
|
"onCameraChangeComplete": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-maps-plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-dev.10",
|
|
4
4
|
"description": "React Native wrapper for Android & iOS Google Maps SDK",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"source": "src/index",
|
|
9
9
|
"react-native": "src/index",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"typecheck": "tsc --noEmit",
|
|
11
|
+
"typecheck:lib": "tsc --noEmit -p tsconfig.json",
|
|
12
|
+
"typecheck:example": "tsc --noEmit -p example/tsconfig.json",
|
|
13
|
+
"typecheck": "yarn typecheck:lib && yarn typecheck:example",
|
|
12
14
|
"lint": "yarn lint:js && yarn lint:android && yarn lint:ios",
|
|
13
15
|
"lint:js": "eslint . --max-warnings 0 && yarn prettier --check .",
|
|
14
16
|
"lint:android": "cd android && ktlint -F ./**/*.kt*",
|
|
@@ -52,6 +54,7 @@
|
|
|
52
54
|
"android/fix-prefab.gradle",
|
|
53
55
|
"android/gradle.properties",
|
|
54
56
|
"android/CMakeLists.txt",
|
|
57
|
+
"android/proguard-rules.pro",
|
|
55
58
|
"android/src",
|
|
56
59
|
"ios/**/*.h",
|
|
57
60
|
"ios/**/*.m",
|
|
@@ -88,8 +91,8 @@
|
|
|
88
91
|
"@semantic-release/git": "10.0.1",
|
|
89
92
|
"@semantic-release/npm": "13.1.1",
|
|
90
93
|
"@types/jest": "30.0.0",
|
|
91
|
-
"@types/react": "19.
|
|
92
|
-
"clang-format-node": "2.0.
|
|
94
|
+
"@types/react": "19.1.1",
|
|
95
|
+
"clang-format-node": "2.0.3",
|
|
93
96
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
|
94
97
|
"del-cli": "7.0.0",
|
|
95
98
|
"eslint": "9.38.0",
|
|
@@ -100,7 +103,7 @@
|
|
|
100
103
|
"lefthook": "2.0.0",
|
|
101
104
|
"nitrogen": "0.30.2",
|
|
102
105
|
"prettier": "3.6.2",
|
|
103
|
-
"react": "19.
|
|
106
|
+
"react": "19.1.1",
|
|
104
107
|
"react-native": "0.82.1",
|
|
105
108
|
"react-native-builder-bob": "0.40.13",
|
|
106
109
|
"react-native-nitro-modules": "0.30.2",
|