react-native-google-maps-plus 1.0.0 → 1.0.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/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/GoogleMapsNitro+autolinking.cmake +85 -0
- package/nitrogen/generated/android/GoogleMapsNitro+autolinking.gradle +27 -0
- package/nitrogen/generated/android/GoogleMapsNitroOnLoad.cpp +70 -0
- package/nitrogen/generated/android/GoogleMapsNitroOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.cpp +83 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.cpp +485 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.hpp +108 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
- package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
- package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
- package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
- package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
- package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +94 -0
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +102 -0
- package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.cpp +132 -0
- package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocation.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocationErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNMapErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNRegion_RNCamera_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_std__string.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/GoogleMapsNitroOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroModuleSpec.kt +64 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroViewSpec.kt +263 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNAndroidLocationPermissionResult.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNCamera.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNIOSPermissionResult.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLatLng.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineCapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineJoinType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocation.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationErrorCode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationPermissionResult.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapErrorCode.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapPadding.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMarker.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolygon.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolyline.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPosition.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNRegion.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNUserInterfaceStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/GoogleMapsNitro+autolinking.rb +60 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.cpp +121 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.hpp +649 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Umbrella.hpp +104 -0
- package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.mm +41 -0
- package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.hpp +102 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.hpp +294 -0
- package/nitrogen/generated/ios/c++/views/HybridGoogleMapsNitroViewComponent.mm +191 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec_cxx.swift +164 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec_cxx.swift +630 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
- package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
- package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
- package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
- package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
- package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
- package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +120 -0
- package/nitrogen/generated/ios/swift/RNPolygon.swift +152 -0
- package/nitrogen/generated/ios/swift/RNPolyline.swift +168 -0
- package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
- package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
- package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.hpp +145 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
- package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
- package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
- package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
- package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +91 -0
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +101 -0
- package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.cpp +315 -0
- package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.hpp +139 -0
- package/nitrogen/generated/shared/json/GoogleMapsNitroViewConfig.json +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLocation.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 `RNLatLng` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLatLng; }
|
|
23
|
+
|
|
24
|
+
#include "RNLatLng.hpp"
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A struct which can be represented as a JavaScript object (RNLocation).
|
|
30
|
+
*/
|
|
31
|
+
struct RNLocation {
|
|
32
|
+
public:
|
|
33
|
+
RNLatLng center SWIFT_PRIVATE;
|
|
34
|
+
double bearing SWIFT_PRIVATE;
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
RNLocation() = default;
|
|
38
|
+
explicit RNLocation(RNLatLng center, double bearing): center(center), bearing(bearing) {}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
42
|
+
|
|
43
|
+
namespace margelo::nitro {
|
|
44
|
+
|
|
45
|
+
// C++ RNLocation <> JS RNLocation (object)
|
|
46
|
+
template <>
|
|
47
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLocation> final {
|
|
48
|
+
static inline margelo::nitro::googlemapsnitro::RNLocation fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
49
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
50
|
+
return margelo::nitro::googlemapsnitro::RNLocation(
|
|
51
|
+
JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "center")),
|
|
52
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "bearing"))
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNLocation& arg) {
|
|
56
|
+
jsi::Object obj(runtime);
|
|
57
|
+
obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::toJSI(runtime, arg.center));
|
|
58
|
+
obj.setProperty(runtime, "bearing", JSIConverter<double>::toJSI(runtime, arg.bearing));
|
|
59
|
+
return obj;
|
|
60
|
+
}
|
|
61
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
62
|
+
if (!value.isObject()) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
jsi::Object obj = value.getObject(runtime);
|
|
66
|
+
if (!JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
|
|
67
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "bearing"))) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLocationErrorCode.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
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An enum which can be represented as a JavaScript enum (RNLocationErrorCode).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNLocationErrorCode {
|
|
27
|
+
PERMISSION_DENIED SWIFT_NAME(permissionDenied) = 1,
|
|
28
|
+
POSITION_UNAVAILABLE SWIFT_NAME(positionUnavailable) = 2,
|
|
29
|
+
TIMEOUT SWIFT_NAME(timeout) = 3,
|
|
30
|
+
PLAY_SERVICE_NOT_AVAILABLE SWIFT_NAME(playServiceNotAvailable) = 4,
|
|
31
|
+
SETTINGS_NOT_SATISFIED SWIFT_NAME(settingsNotSatisfied) = 5,
|
|
32
|
+
INTERNAL_ERROR SWIFT_NAME(internalError) = -1,
|
|
33
|
+
} CLOSED_ENUM;
|
|
34
|
+
|
|
35
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
36
|
+
|
|
37
|
+
namespace margelo::nitro {
|
|
38
|
+
|
|
39
|
+
// C++ RNLocationErrorCode <> JS RNLocationErrorCode (enum)
|
|
40
|
+
template <>
|
|
41
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLocationErrorCode> final {
|
|
42
|
+
static inline margelo::nitro::googlemapsnitro::RNLocationErrorCode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
43
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
44
|
+
return static_cast<margelo::nitro::googlemapsnitro::RNLocationErrorCode>(enumValue);
|
|
45
|
+
}
|
|
46
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::RNLocationErrorCode arg) {
|
|
47
|
+
int enumValue = static_cast<int>(arg);
|
|
48
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
49
|
+
}
|
|
50
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
51
|
+
if (!value.isNumber()) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
double number = value.getNumber();
|
|
55
|
+
int integer = static_cast<int>(number);
|
|
56
|
+
if (number != integer) {
|
|
57
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
58
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
switch (integer) {
|
|
62
|
+
case 1 /* PERMISSION_DENIED */: return true;
|
|
63
|
+
case 2 /* POSITION_UNAVAILABLE */: return true;
|
|
64
|
+
case 3 /* TIMEOUT */: return true;
|
|
65
|
+
case 4 /* PLAY_SERVICE_NOT_AVAILABLE */: return true;
|
|
66
|
+
case 5 /* SETTINGS_NOT_SATISFIED */: return true;
|
|
67
|
+
case -1 /* INTERNAL_ERROR */: return true;
|
|
68
|
+
default: return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLocationPermissionResult.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 `RNAndroidLocationPermissionResult` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNAndroidLocationPermissionResult; }
|
|
23
|
+
// Forward declaration of `RNIOSPermissionResult` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNIOSPermissionResult; }
|
|
25
|
+
|
|
26
|
+
#include "RNAndroidLocationPermissionResult.hpp"
|
|
27
|
+
#include <optional>
|
|
28
|
+
#include "RNIOSPermissionResult.hpp"
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (RNLocationPermissionResult).
|
|
34
|
+
*/
|
|
35
|
+
struct RNLocationPermissionResult {
|
|
36
|
+
public:
|
|
37
|
+
std::optional<RNAndroidLocationPermissionResult> android SWIFT_PRIVATE;
|
|
38
|
+
std::optional<RNIOSPermissionResult> ios SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
RNLocationPermissionResult() = default;
|
|
42
|
+
explicit RNLocationPermissionResult(std::optional<RNAndroidLocationPermissionResult> android, std::optional<RNIOSPermissionResult> ios): android(android), ios(ios) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ RNLocationPermissionResult <> JS RNLocationPermissionResult (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLocationPermissionResult> final {
|
|
52
|
+
static inline margelo::nitro::googlemapsnitro::RNLocationPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::googlemapsnitro::RNLocationPermissionResult(
|
|
55
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult>>::fromJSI(runtime, obj.getProperty(runtime, "android")),
|
|
56
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNIOSPermissionResult>>::fromJSI(runtime, obj.getProperty(runtime, "ios"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNLocationPermissionResult& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "android", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult>>::toJSI(runtime, arg.android));
|
|
62
|
+
obj.setProperty(runtime, "ios", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNIOSPermissionResult>>::toJSI(runtime, arg.ios));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult>>::canConvert(runtime, obj.getProperty(runtime, "android"))) return false;
|
|
71
|
+
if (!JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNIOSPermissionResult>>::canConvert(runtime, obj.getProperty(runtime, "ios"))) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapErrorCode.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
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An enum which can be represented as a JavaScript enum (RNMapErrorCode).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNMapErrorCode {
|
|
27
|
+
PLAY_SERVICES_MISSING SWIFT_NAME(playServicesMissing) = 0,
|
|
28
|
+
PLAY_SERVICES_INVALID SWIFT_NAME(playServicesInvalid) = 1,
|
|
29
|
+
PLAY_SERVICES_DISABLED SWIFT_NAME(playServicesDisabled) = 2,
|
|
30
|
+
PLAY_SERVICES_OUTDATED SWIFT_NAME(playServicesOutdated) = 3,
|
|
31
|
+
PLAY_SERVICE_UPDATE_AVAILABLE SWIFT_NAME(playServiceUpdateAvailable) = 4,
|
|
32
|
+
PLAY_SERVICE_UPDATING SWIFT_NAME(playServiceUpdating) = 5,
|
|
33
|
+
UNKNOWN SWIFT_NAME(unknown) = 6,
|
|
34
|
+
} CLOSED_ENUM;
|
|
35
|
+
|
|
36
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
37
|
+
|
|
38
|
+
namespace margelo::nitro {
|
|
39
|
+
|
|
40
|
+
// C++ RNMapErrorCode <> JS RNMapErrorCode (enum)
|
|
41
|
+
template <>
|
|
42
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNMapErrorCode> final {
|
|
43
|
+
static inline margelo::nitro::googlemapsnitro::RNMapErrorCode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
44
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
45
|
+
return static_cast<margelo::nitro::googlemapsnitro::RNMapErrorCode>(enumValue);
|
|
46
|
+
}
|
|
47
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::RNMapErrorCode arg) {
|
|
48
|
+
int enumValue = static_cast<int>(arg);
|
|
49
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
50
|
+
}
|
|
51
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
52
|
+
if (!value.isNumber()) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
double number = value.getNumber();
|
|
56
|
+
int integer = static_cast<int>(number);
|
|
57
|
+
if (number != integer) {
|
|
58
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
59
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
// Check if we are within the bounds of the enum.
|
|
63
|
+
return integer >= 0 && integer <= 6;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapPadding.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
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (RNMapPadding).
|
|
29
|
+
*/
|
|
30
|
+
struct RNMapPadding {
|
|
31
|
+
public:
|
|
32
|
+
double top SWIFT_PRIVATE;
|
|
33
|
+
double left SWIFT_PRIVATE;
|
|
34
|
+
double bottom SWIFT_PRIVATE;
|
|
35
|
+
double right SWIFT_PRIVATE;
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
RNMapPadding() = default;
|
|
39
|
+
explicit RNMapPadding(double top, double left, double bottom, double right): top(top), left(left), bottom(bottom), right(right) {}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
43
|
+
|
|
44
|
+
namespace margelo::nitro {
|
|
45
|
+
|
|
46
|
+
// C++ RNMapPadding <> JS RNMapPadding (object)
|
|
47
|
+
template <>
|
|
48
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNMapPadding> final {
|
|
49
|
+
static inline margelo::nitro::googlemapsnitro::RNMapPadding fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
+
return margelo::nitro::googlemapsnitro::RNMapPadding(
|
|
52
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "top")),
|
|
53
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "left")),
|
|
54
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "bottom")),
|
|
55
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "right"))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNMapPadding& arg) {
|
|
59
|
+
jsi::Object obj(runtime);
|
|
60
|
+
obj.setProperty(runtime, "top", JSIConverter<double>::toJSI(runtime, arg.top));
|
|
61
|
+
obj.setProperty(runtime, "left", JSIConverter<double>::toJSI(runtime, arg.left));
|
|
62
|
+
obj.setProperty(runtime, "bottom", JSIConverter<double>::toJSI(runtime, arg.bottom));
|
|
63
|
+
obj.setProperty(runtime, "right", JSIConverter<double>::toJSI(runtime, arg.right));
|
|
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<double>::canConvert(runtime, obj.getProperty(runtime, "top"))) return false;
|
|
72
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "left"))) return false;
|
|
73
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "bottom"))) return false;
|
|
74
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "right"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMarker.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 `RNLatLng` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLatLng; }
|
|
23
|
+
// Forward declaration of `RNPosition` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::googlemapsnitro { struct RNPosition; }
|
|
25
|
+
|
|
26
|
+
#include <string>
|
|
27
|
+
#include "RNLatLng.hpp"
|
|
28
|
+
#include "RNPosition.hpp"
|
|
29
|
+
#include <optional>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (RNMarker).
|
|
35
|
+
*/
|
|
36
|
+
struct RNMarker {
|
|
37
|
+
public:
|
|
38
|
+
std::string id SWIFT_PRIVATE;
|
|
39
|
+
double zIndex SWIFT_PRIVATE;
|
|
40
|
+
RNLatLng coordinate SWIFT_PRIVATE;
|
|
41
|
+
std::optional<RNPosition> anchor SWIFT_PRIVATE;
|
|
42
|
+
double width SWIFT_PRIVATE;
|
|
43
|
+
double height SWIFT_PRIVATE;
|
|
44
|
+
std::string iconSvg SWIFT_PRIVATE;
|
|
45
|
+
|
|
46
|
+
public:
|
|
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) {}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
52
|
+
|
|
53
|
+
namespace margelo::nitro {
|
|
54
|
+
|
|
55
|
+
// C++ RNMarker <> JS RNMarker (object)
|
|
56
|
+
template <>
|
|
57
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNMarker> final {
|
|
58
|
+
static inline margelo::nitro::googlemapsnitro::RNMarker fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
60
|
+
return margelo::nitro::googlemapsnitro::RNMarker(
|
|
61
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
62
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
63
|
+
JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "coordinate")),
|
|
64
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "anchor")),
|
|
65
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
|
|
66
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height")),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNMarker& arg) {
|
|
71
|
+
jsi::Object obj(runtime);
|
|
72
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
73
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<double>::toJSI(runtime, arg.zIndex));
|
|
74
|
+
obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::toJSI(runtime, arg.coordinate));
|
|
75
|
+
obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNPosition>>::toJSI(runtime, arg.anchor));
|
|
76
|
+
obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
|
|
77
|
+
obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
|
|
78
|
+
obj.setProperty(runtime, "iconSvg", JSIConverter<std::string>::toJSI(runtime, arg.iconSvg));
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
82
|
+
if (!value.isObject()) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
jsi::Object obj = value.getObject(runtime);
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
87
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
88
|
+
if (!JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
|
|
89
|
+
if (!JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
|
|
90
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
|
|
91
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
|
|
92
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNPolygon.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 `RNLatLng` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLatLng; }
|
|
23
|
+
|
|
24
|
+
#include <string>
|
|
25
|
+
#include "RNLatLng.hpp"
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include <optional>
|
|
28
|
+
|
|
29
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A struct which can be represented as a JavaScript object (RNPolygon).
|
|
33
|
+
*/
|
|
34
|
+
struct RNPolygon {
|
|
35
|
+
public:
|
|
36
|
+
std::string id SWIFT_PRIVATE;
|
|
37
|
+
double zIndex SWIFT_PRIVATE;
|
|
38
|
+
std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
|
|
39
|
+
std::optional<std::string> fillColor SWIFT_PRIVATE;
|
|
40
|
+
std::optional<std::string> strokeColor SWIFT_PRIVATE;
|
|
41
|
+
std::optional<double> strokeWidth SWIFT_PRIVATE;
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
RNPolygon() = default;
|
|
45
|
+
explicit RNPolygon(std::string id, double zIndex, std::vector<RNLatLng> coordinates, std::optional<std::string> fillColor, std::optional<std::string> strokeColor, std::optional<double> strokeWidth): id(id), zIndex(zIndex), coordinates(coordinates), fillColor(fillColor), strokeColor(strokeColor), strokeWidth(strokeWidth) {}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro {
|
|
51
|
+
|
|
52
|
+
// C++ RNPolygon <> JS RNPolygon (object)
|
|
53
|
+
template <>
|
|
54
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNPolygon> final {
|
|
55
|
+
static inline margelo::nitro::googlemapsnitro::RNPolygon fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
+
return margelo::nitro::googlemapsnitro::RNPolygon(
|
|
58
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
59
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
60
|
+
JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
|
|
61
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor")),
|
|
62
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
|
|
63
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth"))
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNPolygon& arg) {
|
|
67
|
+
jsi::Object obj(runtime);
|
|
68
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
69
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<double>::toJSI(runtime, arg.zIndex));
|
|
70
|
+
obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::toJSI(runtime, arg.coordinates));
|
|
71
|
+
obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
|
|
72
|
+
obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
|
|
73
|
+
obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
77
|
+
if (!value.isObject()) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
jsi::Object obj = value.getObject(runtime);
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
82
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
83
|
+
if (!JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
|
|
84
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
|
|
85
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
|
|
86
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNPolyline.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 `RNLatLng` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLatLng; }
|
|
23
|
+
// Forward declaration of `RNLineCapType` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNLineCapType; }
|
|
25
|
+
// Forward declaration of `RNLineJoinType` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNLineJoinType; }
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include "RNLatLng.hpp"
|
|
30
|
+
#include <vector>
|
|
31
|
+
#include "RNLineCapType.hpp"
|
|
32
|
+
#include <optional>
|
|
33
|
+
#include "RNLineJoinType.hpp"
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A struct which can be represented as a JavaScript object (RNPolyline).
|
|
39
|
+
*/
|
|
40
|
+
struct RNPolyline {
|
|
41
|
+
public:
|
|
42
|
+
std::string id SWIFT_PRIVATE;
|
|
43
|
+
double zIndex SWIFT_PRIVATE;
|
|
44
|
+
std::vector<RNLatLng> coordinates SWIFT_PRIVATE;
|
|
45
|
+
std::optional<RNLineCapType> lineCap SWIFT_PRIVATE;
|
|
46
|
+
std::optional<RNLineJoinType> lineJoin SWIFT_PRIVATE;
|
|
47
|
+
std::optional<std::string> color SWIFT_PRIVATE;
|
|
48
|
+
std::optional<double> width SWIFT_PRIVATE;
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
RNPolyline() = default;
|
|
52
|
+
explicit RNPolyline(std::string id, double zIndex, std::vector<RNLatLng> coordinates, std::optional<RNLineCapType> lineCap, std::optional<RNLineJoinType> lineJoin, std::optional<std::string> color, std::optional<double> width): id(id), zIndex(zIndex), coordinates(coordinates), lineCap(lineCap), lineJoin(lineJoin), color(color), width(width) {}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
56
|
+
|
|
57
|
+
namespace margelo::nitro {
|
|
58
|
+
|
|
59
|
+
// C++ RNPolyline <> JS RNPolyline (object)
|
|
60
|
+
template <>
|
|
61
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNPolyline> final {
|
|
62
|
+
static inline margelo::nitro::googlemapsnitro::RNPolyline fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
64
|
+
return margelo::nitro::googlemapsnitro::RNPolyline(
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
66
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
67
|
+
JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "coordinates")),
|
|
68
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineCapType>>::fromJSI(runtime, obj.getProperty(runtime, "lineCap")),
|
|
69
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineJoinType>>::fromJSI(runtime, obj.getProperty(runtime, "lineJoin")),
|
|
70
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "color")),
|
|
71
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "width"))
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::googlemapsnitro::RNPolyline& arg) {
|
|
75
|
+
jsi::Object obj(runtime);
|
|
76
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
77
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<double>::toJSI(runtime, arg.zIndex));
|
|
78
|
+
obj.setProperty(runtime, "coordinates", JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::toJSI(runtime, arg.coordinates));
|
|
79
|
+
obj.setProperty(runtime, "lineCap", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineCapType>>::toJSI(runtime, arg.lineCap));
|
|
80
|
+
obj.setProperty(runtime, "lineJoin", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineJoinType>>::toJSI(runtime, arg.lineJoin));
|
|
81
|
+
obj.setProperty(runtime, "color", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.color));
|
|
82
|
+
obj.setProperty(runtime, "width", JSIConverter<std::optional<double>>::toJSI(runtime, arg.width));
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
86
|
+
if (!value.isObject()) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
jsi::Object obj = value.getObject(runtime);
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
91
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
92
|
+
if (!JSIConverter<std::vector<margelo::nitro::googlemapsnitro::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "coordinates"))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineCapType>>::canConvert(runtime, obj.getProperty(runtime, "lineCap"))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<margelo::nitro::googlemapsnitro::RNLineJoinType>>::canConvert(runtime, obj.getProperty(runtime, "lineJoin"))) return false;
|
|
95
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "color"))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
} // namespace margelo::nitro
|