react-native-google-maps-plus 1.0.1 → 1.0.3-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -11
- package/{GoogleMapsNitro.podspec → RNGoogleMapsPlus.podspec} +2 -2
- package/android/CMakeLists.txt +3 -3
- package/android/build.gradle +4 -4
- package/android/gradle.properties +8 -8
- package/android/src/main/cpp/cpp-adapter.cpp +2 -2
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/Color.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroViewImpl.kt → rngooglemapsplus/GoogleMapsViewImpl.kt} +242 -115
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/LocationHandler.kt +1 -1
- package/android/src/main/java/com/rngooglemapsplus/MapCircle.kt +29 -0
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapMarker.kt +7 -6
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolygon.kt +4 -2
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolyline.kt +4 -2
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PermissionHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PlayServicesHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroModule.kt → rngooglemapsplus/RNGoogleMapsPlusModule.kt} +3 -3
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroPackage.kt → rngooglemapsplus/RNGoogleMapsPlusPackage.kt} +6 -6
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroView.kt → rngooglemapsplus/RNGoogleMapsPlusView.kt} +119 -92
- package/ios/Color.swift +20 -20
- package/ios/{GoogleMapNitroViewImpl.swift → GoogleMapViewImpl.swift} +195 -140
- package/ios/MapCircle.swift +43 -0
- package/ios/MapMarker.swift +10 -17
- package/ios/MapPolygon.swift +9 -6
- package/ios/MapPolyline.swift +9 -7
- package/ios/PermissionHandler.swift +1 -1
- package/ios/{HybridGoogleMapsNitroModule.swift → RNGoogleMapsPlusModule.swift} +2 -2
- package/ios/{HybridGoogleMapsNitroView.swift → RNGoogleMapsPlusView.swift} +151 -108
- package/lib/module/RNGoogleMapsPlusModule.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusModule.nitro.js.map +1 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js.map +1 -0
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/{GoogleMapsNitroModule.nitro.d.ts → RNGoogleMapsPlusModule.nitro.d.ts} +2 -2
- package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
- package/lib/typescript/src/{GoogleMapsNitroView.nitro.d.ts → RNGoogleMapsPlusView.nitro.d.ts} +21 -16
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +23 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitro.json +11 -11
- package/nitrogen/generated/android/{GoogleMapsNitro+autolinking.cmake → RNGoogleMapsPlus+autolinking.cmake} +15 -15
- package/nitrogen/generated/android/{GoogleMapsNitro+autolinking.gradle → RNGoogleMapsPlus+autolinking.gradle} +3 -3
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +70 -0
- package/nitrogen/generated/android/{GoogleMapsNitroOnLoad.hpp → RNGoogleMapsPlusOnLoad.hpp} +5 -5
- package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +4 -4
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +4 -4
- package/nitrogen/generated/android/c++/{JHybridGoogleMapsNitroModuleSpec.cpp → JHybridRNGoogleMapsPlusModuleSpec.cpp} +16 -16
- package/nitrogen/generated/android/c++/{JHybridGoogleMapsNitroModuleSpec.hpp → JHybridRNGoogleMapsPlusModuleSpec.hpp} +12 -12
- package/nitrogen/generated/android/c++/{JHybridGoogleMapsNitroViewSpec.cpp → JHybridRNGoogleMapsPlusViewSpec.cpp} +223 -119
- package/nitrogen/generated/android/c++/{JHybridGoogleMapsNitroViewSpec.hpp → JHybridRNGoogleMapsPlusViewSpec.hpp} +44 -34
- package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNCamera.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
- package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -0
- package/nitrogen/generated/android/c++/JRNLatLng.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNLineCapType.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNLocation.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNMapPadding.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNMapType.hpp +68 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +7 -7
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +11 -7
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +11 -7
- package/nitrogen/generated/android/c++/JRNPosition.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNRegion.hpp +3 -3
- package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +3 -3
- package/nitrogen/generated/android/c++/views/{JHybridGoogleMapsNitroViewStateUpdater.cpp → JHybridRNGoogleMapsPlusViewStateUpdater.cpp} +38 -18
- package/nitrogen/generated/android/c++/views/{JHybridGoogleMapsNitroViewStateUpdater.hpp → JHybridRNGoogleMapsPlusViewStateUpdater.hpp} +11 -11
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_RNLatLng.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_RNLocation.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_RNLocationErrorCode.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_RNMapErrorCode.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_RNRegion_RNCamera_bool.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_bool.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/Func_void_std__string.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro/HybridGoogleMapsNitroModuleSpec.kt → rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt} +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro/HybridGoogleMapsNitroViewSpec.kt → rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt} +71 -17
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNAndroidLocationPermissionResult.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNCamera.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro/GoogleMapsNitroOnLoad.kt → rngooglemapsplus/RNGoogleMapsPlusOnLoad.kt} +9 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNIOSPermissionResult.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLatLng.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLineCapType.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLineJoinType.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLocation.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLocationErrorCode.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNLocationPermissionResult.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNMapErrorCode.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNMapPadding.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNMarker.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNPolygon.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNPolyline.kt +5 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNPosition.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNRegion.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro → rngooglemapsplus}/RNUserInterfaceStyle.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro/views/HybridGoogleMapsNitroViewManager.kt → rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt} +16 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/{googlemapsnitro/views/HybridGoogleMapsNitroViewStateUpdater.kt → rngooglemapsplus/views/HybridRNGoogleMapsPlusViewStateUpdater.kt} +5 -5
- package/nitrogen/generated/ios/{GoogleMapsNitro+autolinking.rb → RNGoogleMapsPlus+autolinking.rb} +4 -4
- package/nitrogen/generated/ios/{GoogleMapsNitro-Swift-Cxx-Bridge.cpp → RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp} +32 -32
- package/nitrogen/generated/ios/{GoogleMapsNitro-Swift-Cxx-Bridge.hpp → RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp} +233 -90
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +113 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.mm +41 -0
- package/nitrogen/generated/ios/{GoogleMapsNitroAutolinking.swift → RNGoogleMapsPlusAutolinking.swift} +15 -15
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/{HybridGoogleMapsNitroModuleSpecSwift.hpp → HybridRNGoogleMapsPlusModuleSpecSwift.hpp} +18 -18
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/{HybridGoogleMapsNitroViewSpecSwift.hpp → HybridRNGoogleMapsPlusViewSpecSwift.hpp} +117 -69
- package/nitrogen/generated/ios/c++/views/{HybridGoogleMapsNitroViewComponent.mm → HybridRNGoogleMapsPlusViewComponent.mm} +59 -34
- package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/{HybridGoogleMapsNitroModuleSpec_cxx.swift → HybridRNGoogleMapsPlusModuleSpec_cxx.swift} +21 -21
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +78 -0
- package/nitrogen/generated/ios/swift/{HybridGoogleMapsNitroViewSpec_cxx.swift → HybridRNGoogleMapsPlusViewSpec_cxx.swift} +317 -66
- package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +1 -1
- package/nitrogen/generated/ios/swift/RNCamera.swift +2 -2
- package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
- package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +1 -1
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -0
- package/nitrogen/generated/ios/swift/RNLatLng.swift +2 -2
- package/nitrogen/generated/ios/swift/RNLineCapType.swift +1 -1
- package/nitrogen/generated/ios/swift/RNLineJoinType.swift +1 -1
- package/nitrogen/generated/ios/swift/RNLocation.swift +2 -2
- package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +1 -1
- package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +2 -2
- package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +1 -1
- package/nitrogen/generated/ios/swift/RNMapPadding.swift +2 -2
- package/nitrogen/generated/ios/swift/RNMapType.swift +52 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +19 -7
- package/nitrogen/generated/ios/swift/RNPolygon.swift +42 -7
- package/nitrogen/generated/ios/swift/RNPolyline.swift +42 -7
- package/nitrogen/generated/ios/swift/RNPosition.swift +2 -2
- package/nitrogen/generated/ios/swift/RNRegion.swift +2 -2
- package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +1 -1
- package/nitrogen/generated/shared/c++/{HybridGoogleMapsNitroModuleSpec.cpp → HybridRNGoogleMapsPlusModuleSpec.cpp} +9 -9
- package/nitrogen/generated/shared/c++/{HybridGoogleMapsNitroModuleSpec.hpp → HybridRNGoogleMapsPlusModuleSpec.hpp} +12 -12
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/{HybridGoogleMapsNitroViewSpec.hpp → HybridRNGoogleMapsPlusViewSpec.hpp} +67 -48
- package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNCamera.hpp +10 -10
- package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -0
- package/nitrogen/generated/shared/c++/RNLatLng.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNLineCapType.hpp +11 -11
- package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +11 -11
- package/nitrogen/generated/shared/c++/RNLocation.hpp +10 -10
- package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +14 -14
- package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNMapPadding.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNMapType.hpp +88 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +20 -20
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +20 -16
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +28 -24
- package/nitrogen/generated/shared/c++/RNPosition.hpp +6 -6
- package/nitrogen/generated/shared/c++/RNRegion.hpp +10 -10
- package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +11 -11
- package/nitrogen/generated/shared/c++/views/{HybridGoogleMapsNitroViewComponent.cpp → HybridRNGoogleMapsPlusViewComponent.cpp} +133 -73
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +147 -0
- package/nitrogen/generated/shared/json/{GoogleMapsNitroViewConfig.json → RNGoogleMapsPlusViewConfig.json} +7 -2
- package/package.json +13 -7
- package/src/{GoogleMapsNitroModule.nitro.ts → RNGoogleMapsPlusModule.nitro.ts} +1 -1
- package/src/{GoogleMapsNitroView.nitro.ts → RNGoogleMapsPlusView.nitro.ts} +24 -16
- package/src/index.tsx +11 -11
- package/src/types.ts +26 -5
- package/lib/module/GoogleMapsNitroModule.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroModule.nitro.js.map +0 -1
- package/lib/module/GoogleMapsNitroView.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroView.nitro.js.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroModule.nitro.d.ts.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroView.nitro.d.ts.map +0 -1
- package/nitrogen/generated/android/GoogleMapsNitroOnLoad.cpp +0 -70
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Umbrella.hpp +0 -104
- package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.mm +0 -41
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.cpp +0 -11
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.cpp +0 -11
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec.swift +0 -52
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec.swift +0 -73
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.cpp +0 -66
- package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.hpp +0 -139
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNInitialProps.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
|
+
|
|
21
|
+
// Forward declaration of `RNCamera` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
|
|
23
|
+
|
|
24
|
+
#include <string>
|
|
25
|
+
#include <optional>
|
|
26
|
+
#include "RNCamera.hpp"
|
|
27
|
+
|
|
28
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A struct which can be represented as a JavaScript object (RNInitialProps).
|
|
32
|
+
*/
|
|
33
|
+
struct RNInitialProps {
|
|
34
|
+
public:
|
|
35
|
+
std::optional<std::string> mapId SWIFT_PRIVATE;
|
|
36
|
+
std::optional<bool> liteMode SWIFT_PRIVATE;
|
|
37
|
+
std::optional<RNCamera> initialCamera SWIFT_PRIVATE;
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
RNInitialProps() = default;
|
|
41
|
+
explicit RNInitialProps(std::optional<std::string> mapId, std::optional<bool> liteMode, std::optional<RNCamera> initialCamera): mapId(mapId), liteMode(liteMode), initialCamera(initialCamera) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ RNInitialProps <> JS RNInitialProps (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNInitialProps> final {
|
|
51
|
+
static inline margelo::nitro::rngooglemapsplus::RNInitialProps fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::rngooglemapsplus::RNInitialProps(
|
|
54
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "mapId")),
|
|
55
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "liteMode")),
|
|
56
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::fromJSI(runtime, obj.getProperty(runtime, "initialCamera"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNInitialProps& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "mapId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.mapId));
|
|
62
|
+
obj.setProperty(runtime, "liteMode", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.liteMode));
|
|
63
|
+
obj.setProperty(runtime, "initialCamera", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::toJSI(runtime, arg.initialCamera));
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
67
|
+
if (!value.isObject()) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
jsi::Object obj = value.getObject(runtime);
|
|
71
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "mapId"))) return false;
|
|
72
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "liteMode"))) return false;
|
|
73
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::canConvert(runtime, obj.getProperty(runtime, "initialCamera"))) return false;
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace margelo::nitro
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
namespace margelo::nitro::
|
|
25
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* A struct which can be represented as a JavaScript object (RNLatLng).
|
|
@@ -37,21 +37,21 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
37
37
|
explicit RNLatLng(double latitude, double longitude): latitude(latitude), longitude(longitude) {}
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
} // namespace margelo::nitro::
|
|
40
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
41
41
|
|
|
42
42
|
namespace margelo::nitro {
|
|
43
43
|
|
|
44
44
|
// C++ RNLatLng <> JS RNLatLng (object)
|
|
45
45
|
template <>
|
|
46
|
-
struct JSIConverter<margelo::nitro::
|
|
47
|
-
static inline margelo::nitro::
|
|
46
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng> final {
|
|
47
|
+
static inline margelo::nitro::rngooglemapsplus::RNLatLng fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
48
|
jsi::Object obj = arg.asObject(runtime);
|
|
49
|
-
return margelo::nitro::
|
|
49
|
+
return margelo::nitro::rngooglemapsplus::RNLatLng(
|
|
50
50
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitude")),
|
|
51
51
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitude"))
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLatLng& arg) {
|
|
55
55
|
jsi::Object obj(runtime);
|
|
56
56
|
obj.setProperty(runtime, "latitude", JSIConverter<double>::toJSI(runtime, arg.latitude));
|
|
57
57
|
obj.setProperty(runtime, "longitude", JSIConverter<double>::toJSI(runtime, arg.longitude));
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
|
-
namespace margelo::nitro::
|
|
26
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* An enum which can be represented as a JavaScript union (RNLineCapType).
|
|
@@ -34,28 +34,28 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
34
34
|
SQUARE SWIFT_NAME(square) = 2,
|
|
35
35
|
} CLOSED_ENUM;
|
|
36
36
|
|
|
37
|
-
} // namespace margelo::nitro::
|
|
37
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
38
38
|
|
|
39
39
|
namespace margelo::nitro {
|
|
40
40
|
|
|
41
41
|
// C++ RNLineCapType <> JS RNLineCapType (union)
|
|
42
42
|
template <>
|
|
43
|
-
struct JSIConverter<margelo::nitro::
|
|
44
|
-
static inline margelo::nitro::
|
|
43
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLineCapType> final {
|
|
44
|
+
static inline margelo::nitro::rngooglemapsplus::RNLineCapType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
45
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
46
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
-
case hashString("butt"): return margelo::nitro::
|
|
48
|
-
case hashString("round"): return margelo::nitro::
|
|
49
|
-
case hashString("square"): return margelo::nitro::
|
|
47
|
+
case hashString("butt"): return margelo::nitro::rngooglemapsplus::RNLineCapType::BUTT;
|
|
48
|
+
case hashString("round"): return margelo::nitro::rngooglemapsplus::RNLineCapType::ROUND;
|
|
49
|
+
case hashString("square"): return margelo::nitro::rngooglemapsplus::RNLineCapType::SQUARE;
|
|
50
50
|
default: [[unlikely]]
|
|
51
51
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNLineCapType - invalid value!");
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNLineCapType arg) {
|
|
55
55
|
switch (arg) {
|
|
56
|
-
case margelo::nitro::
|
|
57
|
-
case margelo::nitro::
|
|
58
|
-
case margelo::nitro::
|
|
56
|
+
case margelo::nitro::rngooglemapsplus::RNLineCapType::BUTT: return JSIConverter<std::string>::toJSI(runtime, "butt");
|
|
57
|
+
case margelo::nitro::rngooglemapsplus::RNLineCapType::ROUND: return JSIConverter<std::string>::toJSI(runtime, "round");
|
|
58
|
+
case margelo::nitro::rngooglemapsplus::RNLineCapType::SQUARE: return JSIConverter<std::string>::toJSI(runtime, "square");
|
|
59
59
|
default: [[unlikely]]
|
|
60
60
|
throw std::invalid_argument("Cannot convert RNLineCapType to JS - invalid value: "
|
|
61
61
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
|
-
namespace margelo::nitro::
|
|
26
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* An enum which can be represented as a JavaScript union (RNLineJoinType).
|
|
@@ -34,28 +34,28 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
34
34
|
BEVEL SWIFT_NAME(bevel) = 2,
|
|
35
35
|
} CLOSED_ENUM;
|
|
36
36
|
|
|
37
|
-
} // namespace margelo::nitro::
|
|
37
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
38
38
|
|
|
39
39
|
namespace margelo::nitro {
|
|
40
40
|
|
|
41
41
|
// C++ RNLineJoinType <> JS RNLineJoinType (union)
|
|
42
42
|
template <>
|
|
43
|
-
struct JSIConverter<margelo::nitro::
|
|
44
|
-
static inline margelo::nitro::
|
|
43
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLineJoinType> final {
|
|
44
|
+
static inline margelo::nitro::rngooglemapsplus::RNLineJoinType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
45
|
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
46
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
-
case hashString("round"): return margelo::nitro::
|
|
48
|
-
case hashString("miter"): return margelo::nitro::
|
|
49
|
-
case hashString("bevel"): return margelo::nitro::
|
|
47
|
+
case hashString("round"): return margelo::nitro::rngooglemapsplus::RNLineJoinType::ROUND;
|
|
48
|
+
case hashString("miter"): return margelo::nitro::rngooglemapsplus::RNLineJoinType::MITER;
|
|
49
|
+
case hashString("bevel"): return margelo::nitro::rngooglemapsplus::RNLineJoinType::BEVEL;
|
|
50
50
|
default: [[unlikely]]
|
|
51
51
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNLineJoinType - invalid value!");
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNLineJoinType arg) {
|
|
55
55
|
switch (arg) {
|
|
56
|
-
case margelo::nitro::
|
|
57
|
-
case margelo::nitro::
|
|
58
|
-
case margelo::nitro::
|
|
56
|
+
case margelo::nitro::rngooglemapsplus::RNLineJoinType::ROUND: return JSIConverter<std::string>::toJSI(runtime, "round");
|
|
57
|
+
case margelo::nitro::rngooglemapsplus::RNLineJoinType::MITER: return JSIConverter<std::string>::toJSI(runtime, "miter");
|
|
58
|
+
case margelo::nitro::rngooglemapsplus::RNLineJoinType::BEVEL: return JSIConverter<std::string>::toJSI(runtime, "bevel");
|
|
59
59
|
default: [[unlikely]]
|
|
60
60
|
throw std::invalid_argument("Cannot convert RNLineJoinType to JS - invalid value: "
|
|
61
61
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
21
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
23
23
|
|
|
24
24
|
#include "RNLatLng.hpp"
|
|
25
25
|
|
|
26
|
-
namespace margelo::nitro::
|
|
26
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* A struct which can be represented as a JavaScript object (RNLocation).
|
|
@@ -38,23 +38,23 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
38
38
|
explicit RNLocation(RNLatLng center, double bearing): center(center), bearing(bearing) {}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
} // namespace margelo::nitro::
|
|
41
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
42
42
|
|
|
43
43
|
namespace margelo::nitro {
|
|
44
44
|
|
|
45
45
|
// C++ RNLocation <> JS RNLocation (object)
|
|
46
46
|
template <>
|
|
47
|
-
struct JSIConverter<margelo::nitro::
|
|
48
|
-
static inline margelo::nitro::
|
|
47
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLocation> final {
|
|
48
|
+
static inline margelo::nitro::rngooglemapsplus::RNLocation fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
49
|
jsi::Object obj = arg.asObject(runtime);
|
|
50
|
-
return margelo::nitro::
|
|
51
|
-
JSIConverter<margelo::nitro::
|
|
50
|
+
return margelo::nitro::rngooglemapsplus::RNLocation(
|
|
51
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "center")),
|
|
52
52
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "bearing"))
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::
|
|
55
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLocation& arg) {
|
|
56
56
|
jsi::Object obj(runtime);
|
|
57
|
-
obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::
|
|
57
|
+
obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.center));
|
|
58
58
|
obj.setProperty(runtime, "bearing", JSIConverter<double>::toJSI(runtime, arg.bearing));
|
|
59
59
|
return obj;
|
|
60
60
|
}
|
|
@@ -63,7 +63,7 @@ namespace margelo::nitro {
|
|
|
63
63
|
return false;
|
|
64
64
|
}
|
|
65
65
|
jsi::Object obj = value.getObject(runtime);
|
|
66
|
-
if (!JSIConverter<margelo::nitro::
|
|
66
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
|
|
67
67
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "bearing"))) return false;
|
|
68
68
|
return true;
|
|
69
69
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
-
namespace margelo::nitro::
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* An enum which can be represented as a JavaScript enum (RNLocationErrorCode).
|
|
@@ -32,18 +32,18 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
32
32
|
INTERNAL_ERROR SWIFT_NAME(internalError) = -1,
|
|
33
33
|
} CLOSED_ENUM;
|
|
34
34
|
|
|
35
|
-
} // namespace margelo::nitro::
|
|
35
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
36
36
|
|
|
37
37
|
namespace margelo::nitro {
|
|
38
38
|
|
|
39
39
|
// C++ RNLocationErrorCode <> JS RNLocationErrorCode (enum)
|
|
40
40
|
template <>
|
|
41
|
-
struct JSIConverter<margelo::nitro::
|
|
42
|
-
static inline margelo::nitro::
|
|
41
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLocationErrorCode> final {
|
|
42
|
+
static inline margelo::nitro::rngooglemapsplus::RNLocationErrorCode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
43
43
|
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
44
|
-
return static_cast<margelo::nitro::
|
|
44
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNLocationErrorCode>(enumValue);
|
|
45
45
|
}
|
|
46
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::
|
|
46
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNLocationErrorCode arg) {
|
|
47
47
|
int enumValue = static_cast<int>(arg);
|
|
48
48
|
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
49
49
|
}
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
21
|
// Forward declaration of `RNAndroidLocationPermissionResult` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPermissionResult; }
|
|
23
23
|
// Forward declaration of `RNIOSPermissionResult` to properly resolve imports.
|
|
24
|
-
namespace margelo::nitro::
|
|
24
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
25
25
|
|
|
26
26
|
#include "RNAndroidLocationPermissionResult.hpp"
|
|
27
27
|
#include <optional>
|
|
28
28
|
#include "RNIOSPermissionResult.hpp"
|
|
29
29
|
|
|
30
|
-
namespace margelo::nitro::
|
|
30
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* A struct which can be represented as a JavaScript object (RNLocationPermissionResult).
|
|
@@ -42,24 +42,24 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
42
42
|
explicit RNLocationPermissionResult(std::optional<RNAndroidLocationPermissionResult> android, std::optional<RNIOSPermissionResult> ios): android(android), ios(ios) {}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
} // namespace margelo::nitro::
|
|
45
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
46
46
|
|
|
47
47
|
namespace margelo::nitro {
|
|
48
48
|
|
|
49
49
|
// C++ RNLocationPermissionResult <> JS RNLocationPermissionResult (object)
|
|
50
50
|
template <>
|
|
51
|
-
struct JSIConverter<margelo::nitro::
|
|
52
|
-
static inline margelo::nitro::
|
|
51
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLocationPermissionResult> final {
|
|
52
|
+
static inline margelo::nitro::rngooglemapsplus::RNLocationPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
53
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
-
return margelo::nitro::
|
|
55
|
-
JSIConverter<std::optional<margelo::nitro::
|
|
56
|
-
JSIConverter<std::optional<margelo::nitro::
|
|
54
|
+
return margelo::nitro::rngooglemapsplus::RNLocationPermissionResult(
|
|
55
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult>>::fromJSI(runtime, obj.getProperty(runtime, "android")),
|
|
56
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSPermissionResult>>::fromJSI(runtime, obj.getProperty(runtime, "ios"))
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLocationPermissionResult& arg) {
|
|
60
60
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "android", JSIConverter<std::optional<margelo::nitro::
|
|
62
|
-
obj.setProperty(runtime, "ios", JSIConverter<std::optional<margelo::nitro::
|
|
61
|
+
obj.setProperty(runtime, "android", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult>>::toJSI(runtime, arg.android));
|
|
62
|
+
obj.setProperty(runtime, "ios", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSPermissionResult>>::toJSI(runtime, arg.ios));
|
|
63
63
|
return obj;
|
|
64
64
|
}
|
|
65
65
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,8 +67,8 @@ namespace margelo::nitro {
|
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
69
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
-
if (!JSIConverter<std::optional<margelo::nitro::
|
|
71
|
-
if (!JSIConverter<std::optional<margelo::nitro::
|
|
70
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult>>::canConvert(runtime, obj.getProperty(runtime, "android"))) return false;
|
|
71
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSPermissionResult>>::canConvert(runtime, obj.getProperty(runtime, "ios"))) return false;
|
|
72
72
|
return true;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
-
namespace margelo::nitro::
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* An enum which can be represented as a JavaScript enum (RNMapErrorCode).
|
|
@@ -33,18 +33,18 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
33
33
|
UNKNOWN SWIFT_NAME(unknown) = 6,
|
|
34
34
|
} CLOSED_ENUM;
|
|
35
35
|
|
|
36
|
-
} // namespace margelo::nitro::
|
|
36
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
37
37
|
|
|
38
38
|
namespace margelo::nitro {
|
|
39
39
|
|
|
40
40
|
// C++ RNMapErrorCode <> JS RNMapErrorCode (enum)
|
|
41
41
|
template <>
|
|
42
|
-
struct JSIConverter<margelo::nitro::
|
|
43
|
-
static inline margelo::nitro::
|
|
42
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMapErrorCode> final {
|
|
43
|
+
static inline margelo::nitro::rngooglemapsplus::RNMapErrorCode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
44
44
|
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
45
|
-
return static_cast<margelo::nitro::
|
|
45
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNMapErrorCode>(enumValue);
|
|
46
46
|
}
|
|
47
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::
|
|
47
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNMapErrorCode arg) {
|
|
48
48
|
int enumValue = static_cast<int>(arg);
|
|
49
49
|
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
50
50
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
namespace margelo::nitro::
|
|
25
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* A struct which can be represented as a JavaScript object (RNMapPadding).
|
|
@@ -39,23 +39,23 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
39
39
|
explicit RNMapPadding(double top, double left, double bottom, double right): top(top), left(left), bottom(bottom), right(right) {}
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
} // namespace margelo::nitro::
|
|
42
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
43
43
|
|
|
44
44
|
namespace margelo::nitro {
|
|
45
45
|
|
|
46
46
|
// C++ RNMapPadding <> JS RNMapPadding (object)
|
|
47
47
|
template <>
|
|
48
|
-
struct JSIConverter<margelo::nitro::
|
|
49
|
-
static inline margelo::nitro::
|
|
48
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMapPadding> final {
|
|
49
|
+
static inline margelo::nitro::rngooglemapsplus::RNMapPadding fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
50
|
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
-
return margelo::nitro::
|
|
51
|
+
return margelo::nitro::rngooglemapsplus::RNMapPadding(
|
|
52
52
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "top")),
|
|
53
53
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "left")),
|
|
54
54
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "bottom")),
|
|
55
55
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "right"))
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMapPadding& arg) {
|
|
59
59
|
jsi::Object obj(runtime);
|
|
60
60
|
obj.setProperty(runtime, "top", JSIConverter<double>::toJSI(runtime, arg.top));
|
|
61
61
|
obj.setProperty(runtime, "left", JSIConverter<double>::toJSI(runtime, arg.left));
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapType.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (RNMapType).
|
|
30
|
+
*/
|
|
31
|
+
enum class RNMapType {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
NORMAL SWIFT_NAME(normal) = 1,
|
|
34
|
+
HYBRID SWIFT_NAME(hybrid) = 2,
|
|
35
|
+
SATELLITE SWIFT_NAME(satellite) = 3,
|
|
36
|
+
TERRAIN SWIFT_NAME(terrain) = 4,
|
|
37
|
+
} CLOSED_ENUM;
|
|
38
|
+
|
|
39
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
40
|
+
|
|
41
|
+
namespace margelo::nitro {
|
|
42
|
+
|
|
43
|
+
// C++ RNMapType <> JS RNMapType (union)
|
|
44
|
+
template <>
|
|
45
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMapType> final {
|
|
46
|
+
static inline margelo::nitro::rngooglemapsplus::RNMapType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
47
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
48
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
49
|
+
case hashString("none"): return margelo::nitro::rngooglemapsplus::RNMapType::NONE;
|
|
50
|
+
case hashString("normal"): return margelo::nitro::rngooglemapsplus::RNMapType::NORMAL;
|
|
51
|
+
case hashString("hybrid"): return margelo::nitro::rngooglemapsplus::RNMapType::HYBRID;
|
|
52
|
+
case hashString("satellite"): return margelo::nitro::rngooglemapsplus::RNMapType::SATELLITE;
|
|
53
|
+
case hashString("terrain"): return margelo::nitro::rngooglemapsplus::RNMapType::TERRAIN;
|
|
54
|
+
default: [[unlikely]]
|
|
55
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNMapType - invalid value!");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNMapType arg) {
|
|
59
|
+
switch (arg) {
|
|
60
|
+
case margelo::nitro::rngooglemapsplus::RNMapType::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
61
|
+
case margelo::nitro::rngooglemapsplus::RNMapType::NORMAL: return JSIConverter<std::string>::toJSI(runtime, "normal");
|
|
62
|
+
case margelo::nitro::rngooglemapsplus::RNMapType::HYBRID: return JSIConverter<std::string>::toJSI(runtime, "hybrid");
|
|
63
|
+
case margelo::nitro::rngooglemapsplus::RNMapType::SATELLITE: return JSIConverter<std::string>::toJSI(runtime, "satellite");
|
|
64
|
+
case margelo::nitro::rngooglemapsplus::RNMapType::TERRAIN: return JSIConverter<std::string>::toJSI(runtime, "terrain");
|
|
65
|
+
default: [[unlikely]]
|
|
66
|
+
throw std::invalid_argument("Cannot convert RNMapType to JS - invalid value: "
|
|
67
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
71
|
+
if (!value.isString()) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
75
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
76
|
+
case hashString("none"):
|
|
77
|
+
case hashString("normal"):
|
|
78
|
+
case hashString("hybrid"):
|
|
79
|
+
case hashString("satellite"):
|
|
80
|
+
case hashString("terrain"):
|
|
81
|
+
return true;
|
|
82
|
+
default:
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} // namespace margelo::nitro
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
21
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
22
|
-
namespace margelo::nitro::
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
23
23
|
// Forward declaration of `RNPosition` to properly resolve imports.
|
|
24
|
-
namespace margelo::nitro::
|
|
24
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
|
|
25
25
|
|
|
26
26
|
#include <string>
|
|
27
|
+
#include <optional>
|
|
27
28
|
#include "RNLatLng.hpp"
|
|
28
29
|
#include "RNPosition.hpp"
|
|
29
|
-
#include <optional>
|
|
30
30
|
|
|
31
|
-
namespace margelo::nitro::
|
|
31
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* A struct which can be represented as a JavaScript object (RNMarker).
|
|
@@ -36,7 +36,7 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
36
36
|
struct RNMarker {
|
|
37
37
|
public:
|
|
38
38
|
std::string id SWIFT_PRIVATE;
|
|
39
|
-
double zIndex SWIFT_PRIVATE;
|
|
39
|
+
std::optional<double> zIndex SWIFT_PRIVATE;
|
|
40
40
|
RNLatLng coordinate SWIFT_PRIVATE;
|
|
41
41
|
std::optional<RNPosition> anchor SWIFT_PRIVATE;
|
|
42
42
|
double width SWIFT_PRIVATE;
|
|
@@ -45,34 +45,34 @@ namespace margelo::nitro::googlemapsnitro {
|
|
|
45
45
|
|
|
46
46
|
public:
|
|
47
47
|
RNMarker() = default;
|
|
48
|
-
explicit RNMarker(std::string id, double zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, double width, double height, std::string iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), width(width), height(height), iconSvg(iconSvg) {}
|
|
48
|
+
explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, double width, double height, std::string iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), width(width), height(height), iconSvg(iconSvg) {}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
} // namespace margelo::nitro::
|
|
51
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
52
52
|
|
|
53
53
|
namespace margelo::nitro {
|
|
54
54
|
|
|
55
55
|
// C++ RNMarker <> JS RNMarker (object)
|
|
56
56
|
template <>
|
|
57
|
-
struct JSIConverter<margelo::nitro::
|
|
58
|
-
static inline margelo::nitro::
|
|
57
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMarker> final {
|
|
58
|
+
static inline margelo::nitro::rngooglemapsplus::RNMarker fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
59
|
jsi::Object obj = arg.asObject(runtime);
|
|
60
|
-
return margelo::nitro::
|
|
60
|
+
return margelo::nitro::rngooglemapsplus::RNMarker(
|
|
61
61
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
62
|
-
JSIConverter<double
|
|
63
|
-
JSIConverter<margelo::nitro::
|
|
64
|
-
JSIConverter<std::optional<margelo::nitro::
|
|
62
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
63
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "coordinate")),
|
|
64
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "anchor")),
|
|
65
65
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
|
|
66
66
|
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height")),
|
|
67
67
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::
|
|
70
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMarker& arg) {
|
|
71
71
|
jsi::Object obj(runtime);
|
|
72
72
|
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
73
|
-
obj.setProperty(runtime, "zIndex", JSIConverter<double
|
|
74
|
-
obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::
|
|
75
|
-
obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::
|
|
73
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
|
|
74
|
+
obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.coordinate));
|
|
75
|
+
obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.anchor));
|
|
76
76
|
obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
|
|
77
77
|
obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
|
|
78
78
|
obj.setProperty(runtime, "iconSvg", JSIConverter<std::string>::toJSI(runtime, arg.iconSvg));
|
|
@@ -84,9 +84,9 @@ namespace margelo::nitro {
|
|
|
84
84
|
}
|
|
85
85
|
jsi::Object obj = value.getObject(runtime);
|
|
86
86
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
87
|
-
if (!JSIConverter<double
|
|
88
|
-
if (!JSIConverter<margelo::nitro::
|
|
89
|
-
if (!JSIConverter<std::optional<margelo::nitro::
|
|
87
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
88
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
|
|
89
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
|
|
90
90
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
|
|
91
91
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
|
|
92
92
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
|