react-native-google-maps-plus 1.7.0-dev.1 → 1.7.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +457 -451
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -8
- package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapHeatmapBuilder.kt +1 -1
- package/android/src/main/java/com/rngooglemapsplus/MapHelper.kt +22 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +103 -2
- package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +2 -1
- package/android/src/main/java/com/rngooglemapsplus/MapUrlTileOverlayBuilder.kt +40 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +84 -34
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/MapObjectTagExtensions.kt +84 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNMapTypeExtension.kt +13 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
- package/ios/GoogleMapViewImpl.swift +164 -48
- package/ios/MapCircleBuilder.swift +2 -0
- package/ios/MapHeatmapBuilder.swift +2 -1
- package/ios/MapMarkerBuilder.swift +54 -1
- package/ios/MapPolygonBuilder.swift +2 -0
- package/ios/MapPolylineBuilder.swift +2 -0
- package/ios/MapUrlTileOverlayBuilder.swift +24 -0
- package/ios/RNGoogleMapsPlusView.swift +68 -11
- package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
- package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
- package/ios/extensions/MapObjectTag+Extension.swift +93 -0
- package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
- package/ios/extensions/RNMapType+Extension.swift +18 -0
- package/lib/module/types.js.map +1 -1
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +7 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +18 -9
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +18 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +8 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera.hpp +83 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_RNLatLng.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_std__string_RNLatLng.hpp +77 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +237 -83
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +32 -16
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
- package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +11 -3
- package/nitrogen/generated/android/c++/JRNMarker.hpp +7 -3
- package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
- package/nitrogen/generated/android/c++/JRNUrlTileOverlay.hpp +78 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_std__optional_std__string_.kt → Func_void_std__string.kt} +12 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/{Func_void_std__optional_std__string__RNLatLng.kt → Func_void_std__string_RNLatLng.kt} +12 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string_std__string_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +122 -24
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUrlTileOverlay.kt +52 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +32 -8
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +168 -43
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +86 -22
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +35 -0
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +6 -6
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +17 -8
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +340 -138
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
- package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +61 -1
- package/nitrogen/generated/ios/swift/RNMarker.swift +24 -1
- package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
- package/nitrogen/generated/ios/swift/RNUrlTileOverlay.swift +133 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +16 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +41 -22
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
- package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +10 -2
- package/nitrogen/generated/shared/c++/RNMarker.hpp +6 -2
- package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
- package/nitrogen/generated/shared/c++/RNUrlTileOverlay.hpp +96 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +100 -16
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +18 -10
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +7 -0
- package/package.json +4 -2
- package/src/RNGoogleMapsPlusView.nitro.ts +20 -8
- package/src/types.ts +19 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string_.hpp +0 -76
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string__RNLatLng.hpp +0 -78
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string__RNLatLng.swift +0 -54
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotFormat.kt → RNSnapshotFormatExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotResultType.kt → RNSnapshotResultTypeExtension.kt} +0 -0
|
@@ -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,12 +235,12 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
225
235
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapReady: ") + exc.what());
|
|
226
236
|
}
|
|
227
237
|
}()),
|
|
228
|
-
onMapLoaded([&]() -> CachedProp<std::optional<std::function<void(
|
|
238
|
+
onMapLoaded([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>> {
|
|
229
239
|
try {
|
|
230
240
|
const react::RawValue* rawValue = rawProps.at("onMapLoaded", nullptr, nullptr);
|
|
231
241
|
if (rawValue == nullptr) return sourceProps.onMapLoaded;
|
|
232
242
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
233
|
-
return CachedProp<std::optional<std::function<void(
|
|
243
|
+
return CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMapLoaded);
|
|
234
244
|
} catch (const std::exception& exc) {
|
|
235
245
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapLoaded: ") + exc.what());
|
|
236
246
|
}
|
|
@@ -275,72 +285,82 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
275
285
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapLongPress: ") + exc.what());
|
|
276
286
|
}
|
|
277
287
|
}()),
|
|
278
|
-
|
|
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 */)>>> {
|
|
279
299
|
try {
|
|
280
300
|
const react::RawValue* rawValue = rawProps.at("onMarkerPress", nullptr, nullptr);
|
|
281
301
|
if (rawValue == nullptr) return sourceProps.onMarkerPress;
|
|
282
302
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
283
|
-
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);
|
|
284
304
|
} catch (const std::exception& exc) {
|
|
285
305
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerPress: ") + exc.what());
|
|
286
306
|
}
|
|
287
307
|
}()),
|
|
288
|
-
onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
308
|
+
onPolylinePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
289
309
|
try {
|
|
290
310
|
const react::RawValue* rawValue = rawProps.at("onPolylinePress", nullptr, nullptr);
|
|
291
311
|
if (rawValue == nullptr) return sourceProps.onPolylinePress;
|
|
292
312
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
293
|
-
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);
|
|
294
314
|
} catch (const std::exception& exc) {
|
|
295
315
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolylinePress: ") + exc.what());
|
|
296
316
|
}
|
|
297
317
|
}()),
|
|
298
|
-
onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
318
|
+
onPolygonPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
299
319
|
try {
|
|
300
320
|
const react::RawValue* rawValue = rawProps.at("onPolygonPress", nullptr, nullptr);
|
|
301
321
|
if (rawValue == nullptr) return sourceProps.onPolygonPress;
|
|
302
322
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
303
|
-
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);
|
|
304
324
|
} catch (const std::exception& exc) {
|
|
305
325
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPolygonPress: ") + exc.what());
|
|
306
326
|
}
|
|
307
327
|
}()),
|
|
308
|
-
onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
328
|
+
onCirclePress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */)>>> {
|
|
309
329
|
try {
|
|
310
330
|
const react::RawValue* rawValue = rawProps.at("onCirclePress", nullptr, nullptr);
|
|
311
331
|
if (rawValue == nullptr) return sourceProps.onCirclePress;
|
|
312
332
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
313
|
-
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);
|
|
314
334
|
} catch (const std::exception& exc) {
|
|
315
335
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onCirclePress: ") + exc.what());
|
|
316
336
|
}
|
|
317
337
|
}()),
|
|
318
|
-
onMarkerDragStart([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
338
|
+
onMarkerDragStart([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
319
339
|
try {
|
|
320
340
|
const react::RawValue* rawValue = rawProps.at("onMarkerDragStart", nullptr, nullptr);
|
|
321
341
|
if (rawValue == nullptr) return sourceProps.onMarkerDragStart;
|
|
322
342
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
323
|
-
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);
|
|
324
344
|
} catch (const std::exception& exc) {
|
|
325
345
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragStart: ") + exc.what());
|
|
326
346
|
}
|
|
327
347
|
}()),
|
|
328
|
-
onMarkerDrag([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
348
|
+
onMarkerDrag([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
329
349
|
try {
|
|
330
350
|
const react::RawValue* rawValue = rawProps.at("onMarkerDrag", nullptr, nullptr);
|
|
331
351
|
if (rawValue == nullptr) return sourceProps.onMarkerDrag;
|
|
332
352
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
333
|
-
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);
|
|
334
354
|
} catch (const std::exception& exc) {
|
|
335
355
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDrag: ") + exc.what());
|
|
336
356
|
}
|
|
337
357
|
}()),
|
|
338
|
-
onMarkerDragEnd([&]() -> CachedProp<std::optional<std::function<void(const std::
|
|
358
|
+
onMarkerDragEnd([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* id */, const RNLatLng& /* location */)>>> {
|
|
339
359
|
try {
|
|
340
360
|
const react::RawValue* rawValue = rawProps.at("onMarkerDragEnd", nullptr, nullptr);
|
|
341
361
|
if (rawValue == nullptr) return sourceProps.onMarkerDragEnd;
|
|
342
362
|
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
343
|
-
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);
|
|
344
364
|
} catch (const std::exception& exc) {
|
|
345
365
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragEnd: ") + exc.what());
|
|
346
366
|
}
|
|
@@ -365,6 +385,56 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
365
385
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorLevelActivated: ") + exc.what());
|
|
366
386
|
}
|
|
367
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
|
+
}()),
|
|
368
438
|
onCameraChangeStart([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> {
|
|
369
439
|
try {
|
|
370
440
|
const react::RawValue* rawValue = rawProps.at("onCameraChangeStart", nullptr, nullptr);
|
|
@@ -425,6 +495,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
425
495
|
circles(other.circles),
|
|
426
496
|
heatmaps(other.heatmaps),
|
|
427
497
|
kmlLayers(other.kmlLayers),
|
|
498
|
+
urlTileOverlays(other.urlTileOverlays),
|
|
428
499
|
locationConfig(other.locationConfig),
|
|
429
500
|
onMapError(other.onMapError),
|
|
430
501
|
onMapReady(other.onMapReady),
|
|
@@ -433,6 +504,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
433
504
|
onLocationError(other.onLocationError),
|
|
434
505
|
onMapPress(other.onMapPress),
|
|
435
506
|
onMapLongPress(other.onMapLongPress),
|
|
507
|
+
onPoiPress(other.onPoiPress),
|
|
436
508
|
onMarkerPress(other.onMarkerPress),
|
|
437
509
|
onPolylinePress(other.onPolylinePress),
|
|
438
510
|
onPolygonPress(other.onPolygonPress),
|
|
@@ -442,6 +514,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
442
514
|
onMarkerDragEnd(other.onMarkerDragEnd),
|
|
443
515
|
onIndoorBuildingFocused(other.onIndoorBuildingFocused),
|
|
444
516
|
onIndoorLevelActivated(other.onIndoorLevelActivated),
|
|
517
|
+
onInfoWindowPress(other.onInfoWindowPress),
|
|
518
|
+
onInfoWindowClose(other.onInfoWindowClose),
|
|
519
|
+
onInfoWindowLongPress(other.onInfoWindowLongPress),
|
|
520
|
+
onMyLocationPress(other.onMyLocationPress),
|
|
521
|
+
onMyLocationButtonPress(other.onMyLocationButtonPress),
|
|
445
522
|
onCameraChangeStart(other.onCameraChangeStart),
|
|
446
523
|
onCameraChange(other.onCameraChange),
|
|
447
524
|
onCameraChangeComplete(other.onCameraChangeComplete),
|
|
@@ -466,6 +543,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
466
543
|
case hashString("circles"): return true;
|
|
467
544
|
case hashString("heatmaps"): return true;
|
|
468
545
|
case hashString("kmlLayers"): return true;
|
|
546
|
+
case hashString("urlTileOverlays"): return true;
|
|
469
547
|
case hashString("locationConfig"): return true;
|
|
470
548
|
case hashString("onMapError"): return true;
|
|
471
549
|
case hashString("onMapReady"): return true;
|
|
@@ -474,6 +552,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
474
552
|
case hashString("onLocationError"): return true;
|
|
475
553
|
case hashString("onMapPress"): return true;
|
|
476
554
|
case hashString("onMapLongPress"): return true;
|
|
555
|
+
case hashString("onPoiPress"): return true;
|
|
477
556
|
case hashString("onMarkerPress"): return true;
|
|
478
557
|
case hashString("onPolylinePress"): return true;
|
|
479
558
|
case hashString("onPolygonPress"): return true;
|
|
@@ -483,6 +562,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
483
562
|
case hashString("onMarkerDragEnd"): return true;
|
|
484
563
|
case hashString("onIndoorBuildingFocused"): return true;
|
|
485
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;
|
|
486
570
|
case hashString("onCameraChangeStart"): return true;
|
|
487
571
|
case hashString("onCameraChange"): return true;
|
|
488
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,23 +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;
|
|
88
|
-
CachedProp<std::optional<std::function<void(
|
|
90
|
+
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */)>>> onMapLoaded;
|
|
89
91
|
CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onLocationUpdate;
|
|
90
92
|
CachedProp<std::optional<std::function<void(RNLocationErrorCode /* error */)>>> onLocationError;
|
|
91
93
|
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapPress;
|
|
92
94
|
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapLongPress;
|
|
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::
|
|
98
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
99
|
-
CachedProp<std::optional<std::function<void(const std::
|
|
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;
|
|
100
103
|
CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> onIndoorBuildingFocused;
|
|
101
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;
|
|
102
110
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
|
|
103
111
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
|
|
104
112
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
|
|
@@ -21,6 +21,7 @@
|
|
|
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,
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"onLocationError": true,
|
|
30
31
|
"onMapPress": true,
|
|
31
32
|
"onMapLongPress": true,
|
|
33
|
+
"onPoiPress": true,
|
|
32
34
|
"onMarkerPress": true,
|
|
33
35
|
"onPolylinePress": true,
|
|
34
36
|
"onPolygonPress": true,
|
|
@@ -38,6 +40,11 @@
|
|
|
38
40
|
"onMarkerDragEnd": true,
|
|
39
41
|
"onIndoorBuildingFocused": true,
|
|
40
42
|
"onIndoorLevelActivated": true,
|
|
43
|
+
"onInfoWindowPress": true,
|
|
44
|
+
"onInfoWindowClose": true,
|
|
45
|
+
"onInfoWindowLongPress": true,
|
|
46
|
+
"onMyLocationPress": true,
|
|
47
|
+
"onMyLocationButtonPress": true,
|
|
41
48
|
"onCameraChangeStart": true,
|
|
42
49
|
"onCameraChange": true,
|
|
43
50
|
"onCameraChangeComplete": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-maps-plus",
|
|
3
|
-
"version": "1.7.0-dev.
|
|
3
|
+
"version": "1.7.0-dev.11",
|
|
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*",
|
|
@@ -28,6 +28,7 @@ import type {
|
|
|
28
28
|
RNIndoorLevel,
|
|
29
29
|
RNLatLngBounds,
|
|
30
30
|
RNSnapshotOptions,
|
|
31
|
+
RNUrlTileOverlay,
|
|
31
32
|
} from './types';
|
|
32
33
|
|
|
33
34
|
export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
@@ -48,23 +49,30 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
48
49
|
circles?: RNCircle[];
|
|
49
50
|
heatmaps?: RNHeatmap[];
|
|
50
51
|
kmlLayers?: RNKMLayer[];
|
|
52
|
+
urlTileOverlays?: RNUrlTileOverlay[];
|
|
51
53
|
locationConfig?: RNLocationConfig;
|
|
52
54
|
onMapError?: (error: RNMapErrorCode) => void;
|
|
53
55
|
onMapReady?: (ready: boolean) => void;
|
|
54
|
-
onMapLoaded?: (
|
|
56
|
+
onMapLoaded?: (region: RNRegion, camera: RNCamera) => void;
|
|
55
57
|
onLocationUpdate?: (location: RNLocation) => void;
|
|
56
58
|
onLocationError?: (error: RNLocationErrorCode) => void;
|
|
57
59
|
onMapPress?: (coordinate: RNLatLng) => void;
|
|
58
60
|
onMapLongPress?: (coordinate: RNLatLng) => void;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
onPoiPress?: (placeId: string, name: string, coordinate: RNLatLng) => void;
|
|
62
|
+
onMarkerPress?: (id: string) => void;
|
|
63
|
+
onPolylinePress?: (id: string) => void;
|
|
64
|
+
onPolygonPress?: (id: string) => void;
|
|
65
|
+
onCirclePress?: (id: string) => void;
|
|
66
|
+
onMarkerDragStart?: (id: string, location: RNLatLng) => void;
|
|
67
|
+
onMarkerDrag?: (id: string, location: RNLatLng) => void;
|
|
68
|
+
onMarkerDragEnd?: (id: string, location: RNLatLng) => void;
|
|
66
69
|
onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
|
|
67
70
|
onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
|
|
71
|
+
onInfoWindowPress?: (id: string) => void;
|
|
72
|
+
onInfoWindowClose?: (id: string) => void;
|
|
73
|
+
onInfoWindowLongPress?: (id: string) => void;
|
|
74
|
+
onMyLocationPress?: (location: RNLocation) => void;
|
|
75
|
+
onMyLocationButtonPress?: (pressed: boolean) => void;
|
|
68
76
|
onCameraChangeStart?: (
|
|
69
77
|
region: RNRegion,
|
|
70
78
|
camera: RNCamera,
|
|
@@ -83,6 +91,10 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
83
91
|
}
|
|
84
92
|
|
|
85
93
|
export interface RNGoogleMapsPlusViewMethods extends HybridViewMethods {
|
|
94
|
+
showMarkerInfoWindow(id: string): void;
|
|
95
|
+
|
|
96
|
+
hideMarkerInfoWindow(id: string): void;
|
|
97
|
+
|
|
86
98
|
setCamera(camera: RNCamera, animated?: boolean, durationMs?: number): void;
|
|
87
99
|
|
|
88
100
|
setCameraToCoordinates(
|