react-native-google-maps-plus 1.0.2 → 1.1.0-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.
Files changed (107) hide show
  1. package/README.md +127 -11
  2. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +359 -139
  3. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +44 -44
  4. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +19 -0
  5. package/android/src/main/java/com/rngooglemapsplus/{MapMarker.kt → MapMarkerBuilder.kt} +7 -6
  6. package/android/src/main/java/com/rngooglemapsplus/{MapPolygon.kt → MapPolygonBuilder.kt} +4 -18
  7. package/android/src/main/java/com/rngooglemapsplus/{MapPolyline.kt → MapPolylineBuilder.kt.kt} +4 -19
  8. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +145 -129
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +19 -0
  10. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLocationPriorityExtension.kt +12 -0
  11. package/android/src/main/java/com/rngooglemapsplus/extensions/RNMapCircleExtension.kt +14 -0
  12. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolygonExtension.kt +20 -0
  13. package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolylineExtension.kt +21 -0
  14. package/android/src/main/java/com/rngooglemapsplus/extensions/RNUserInterfaceExtension.kt +12 -0
  15. package/android/src/main/java/com/rngooglemapsplus/{Color.kt → extensions/StringExtension.kt} +1 -1
  16. package/android/src/main/java/com/rngooglemapsplus/extensions/ThrowableExtension.kt +38 -0
  17. package/ios/GoogleMapViewImpl.swift +348 -150
  18. package/ios/LocationHandler.swift +29 -69
  19. package/ios/MapCircleBuilder.swift +20 -0
  20. package/ios/{MapMarker.swift → MapMarkerBuilder.swift} +11 -42
  21. package/ios/MapPolygonBuilder.swift +20 -0
  22. package/ios/MapPolylineBuilder.swift +24 -0
  23. package/ios/PermissionHandler.swift +1 -1
  24. package/ios/RNGoogleMapsPlusModule.swift +1 -1
  25. package/ios/RNGoogleMapsPlusView.swift +159 -168
  26. package/ios/extensions/RNCamera+Extension.swift +22 -0
  27. package/ios/extensions/RNCircle+Extension.swift +24 -0
  28. package/ios/extensions/RNIOSLocationAccuracy+Extensions.swift +19 -0
  29. package/ios/extensions/RNMarker+Extension.swift +24 -0
  30. package/ios/{MapPolygon.swift → extensions/RNPolygon+Extension.swift.swift} +7 -23
  31. package/ios/extensions/RNPolyline+Extension.swift.swift +62 -0
  32. package/ios/extensions/RNUserInterface+Extension.swift +16 -0
  33. package/ios/{Color.swift → extensions/String+Extensions.swift} +20 -20
  34. package/lib/module/types.js +14 -0
  35. package/lib/module/types.js.map +1 -1
  36. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +21 -12
  37. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  38. package/lib/typescript/src/types.d.ts +59 -3
  39. package/lib/typescript/src/types.d.ts.map +1 -1
  40. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +233 -69
  41. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +40 -22
  42. package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +63 -0
  43. package/nitrogen/generated/android/c++/JRNAndroidLocationPriority.hpp +65 -0
  44. package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
  45. package/nitrogen/generated/android/c++/JRNIOSLocationAccuracy.hpp +65 -0
  46. package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +59 -0
  47. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -0
  48. package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +65 -0
  49. package/nitrogen/generated/android/c++/JRNMapType.hpp +68 -0
  50. package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +93 -0
  51. package/nitrogen/generated/android/c++/JRNMarker.hpp +4 -4
  52. package/nitrogen/generated/android/c++/JRNPolygon.hpp +8 -4
  53. package/nitrogen/generated/android/c++/JRNPolyline.hpp +8 -4
  54. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +40 -4
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +89 -11
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationConfig.kt +35 -0
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPriority.kt +23 -0
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationAccuracy.kt +23 -0
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationConfig.kt +32 -0
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationConfig.kt +32 -0
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +59 -0
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +1 -1
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +4 -1
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +4 -1
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +7 -1
  69. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +296 -45
  70. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +27 -0
  71. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +131 -37
  72. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +61 -16
  73. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +20 -11
  74. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +378 -45
  75. package/nitrogen/generated/ios/swift/RNAndroidLocationConfig.swift +93 -0
  76. package/nitrogen/generated/ios/swift/RNAndroidLocationPriority.swift +48 -0
  77. package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
  78. package/nitrogen/generated/ios/swift/RNIOSLocationAccuracy.swift +48 -0
  79. package/nitrogen/generated/ios/swift/RNIOSLocationConfig.swift +70 -0
  80. package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -0
  81. package/nitrogen/generated/ios/swift/RNLocationConfig.swift +84 -0
  82. package/nitrogen/generated/ios/swift/RNMapType.swift +52 -0
  83. package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +277 -0
  84. package/nitrogen/generated/ios/swift/RNMarker.swift +17 -5
  85. package/nitrogen/generated/ios/swift/RNPolygon.swift +40 -5
  86. package/nitrogen/generated/ios/swift/RNPolyline.swift +40 -5
  87. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +20 -2
  88. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +59 -26
  89. package/nitrogen/generated/shared/c++/RNAndroidLocationConfig.hpp +77 -0
  90. package/nitrogen/generated/shared/c++/RNAndroidLocationPriority.hpp +64 -0
  91. package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
  92. package/nitrogen/generated/shared/c++/RNIOSLocationAccuracy.hpp +64 -0
  93. package/nitrogen/generated/shared/c++/RNIOSLocationConfig.hpp +73 -0
  94. package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -0
  95. package/nitrogen/generated/shared/c++/RNLocationConfig.hpp +76 -0
  96. package/nitrogen/generated/shared/c++/RNMapType.hpp +88 -0
  97. package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +107 -0
  98. package/nitrogen/generated/shared/c++/RNMarker.hpp +6 -6
  99. package/nitrogen/generated/shared/c++/RNPolygon.hpp +10 -6
  100. package/nitrogen/generated/shared/c++/RNPolyline.hpp +10 -6
  101. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +138 -30
  102. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +27 -13
  103. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +10 -1
  104. package/package.json +5 -5
  105. package/src/RNGoogleMapsPlusView.nitro.ts +25 -11
  106. package/src/types.ts +67 -3
  107. package/ios/MapPolyline.swift +0 -83
@@ -0,0 +1,77 @@
1
+ ///
2
+ /// RNAndroidLocationConfig.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 `RNAndroidLocationPriority` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPriority; }
23
+
24
+ #include "RNAndroidLocationPriority.hpp"
25
+ #include <optional>
26
+
27
+ namespace margelo::nitro::rngooglemapsplus {
28
+
29
+ /**
30
+ * A struct which can be represented as a JavaScript object (RNAndroidLocationConfig).
31
+ */
32
+ struct RNAndroidLocationConfig {
33
+ public:
34
+ std::optional<RNAndroidLocationPriority> priority SWIFT_PRIVATE;
35
+ std::optional<double> interval SWIFT_PRIVATE;
36
+ std::optional<double> minUpdateInterval SWIFT_PRIVATE;
37
+
38
+ public:
39
+ RNAndroidLocationConfig() = default;
40
+ explicit RNAndroidLocationConfig(std::optional<RNAndroidLocationPriority> priority, std::optional<double> interval, std::optional<double> minUpdateInterval): priority(priority), interval(interval), minUpdateInterval(minUpdateInterval) {}
41
+ };
42
+
43
+ } // namespace margelo::nitro::rngooglemapsplus
44
+
45
+ namespace margelo::nitro {
46
+
47
+ // C++ RNAndroidLocationConfig <> JS RNAndroidLocationConfig (object)
48
+ template <>
49
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig> final {
50
+ static inline margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
51
+ jsi::Object obj = arg.asObject(runtime);
52
+ return margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig(
53
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>>::fromJSI(runtime, obj.getProperty(runtime, "priority")),
54
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "interval")),
55
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "minUpdateInterval"))
56
+ );
57
+ }
58
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig& arg) {
59
+ jsi::Object obj(runtime);
60
+ obj.setProperty(runtime, "priority", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>>::toJSI(runtime, arg.priority));
61
+ obj.setProperty(runtime, "interval", JSIConverter<std::optional<double>>::toJSI(runtime, arg.interval));
62
+ obj.setProperty(runtime, "minUpdateInterval", JSIConverter<std::optional<double>>::toJSI(runtime, arg.minUpdateInterval));
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::rngooglemapsplus::RNAndroidLocationPriority>>::canConvert(runtime, obj.getProperty(runtime, "priority"))) return false;
71
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "interval"))) return false;
72
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "minUpdateInterval"))) return false;
73
+ return true;
74
+ }
75
+ };
76
+
77
+ } // namespace margelo::nitro
@@ -0,0 +1,64 @@
1
+ ///
2
+ /// RNAndroidLocationPriority.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::rngooglemapsplus {
22
+
23
+ /**
24
+ * An enum which can be represented as a JavaScript enum (RNAndroidLocationPriority).
25
+ */
26
+ enum class RNAndroidLocationPriority {
27
+ PRIORITY_HIGH_ACCURACY SWIFT_NAME(priorityHighAccuracy) = 0,
28
+ PRIORITY_BALANCED_POWER_ACCURACY SWIFT_NAME(priorityBalancedPowerAccuracy) = 1,
29
+ PRIORITY_LOW_POWER SWIFT_NAME(priorityLowPower) = 2,
30
+ PRIORITY_PASSIVE SWIFT_NAME(priorityPassive) = 3,
31
+ } CLOSED_ENUM;
32
+
33
+ } // namespace margelo::nitro::rngooglemapsplus
34
+
35
+ namespace margelo::nitro {
36
+
37
+ // C++ RNAndroidLocationPriority <> JS RNAndroidLocationPriority (enum)
38
+ template <>
39
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority> final {
40
+ static inline margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
41
+ int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
42
+ return static_cast<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>(enumValue);
43
+ }
44
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority arg) {
45
+ int enumValue = static_cast<int>(arg);
46
+ return JSIConverter<int>::toJSI(runtime, enumValue);
47
+ }
48
+ static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
49
+ if (!value.isNumber()) {
50
+ return false;
51
+ }
52
+ double number = value.getNumber();
53
+ int integer = static_cast<int>(number);
54
+ if (number != integer) {
55
+ // The integer is not the same value as the double - we truncated floating points.
56
+ // Enums are all integers, so the input floating point number is obviously invalid.
57
+ return false;
58
+ }
59
+ // Check if we are within the bounds of the enum.
60
+ return integer >= 0 && integer <= 3;
61
+ }
62
+ };
63
+
64
+ } // namespace margelo::nitro
@@ -0,0 +1,98 @@
1
+ ///
2
+ /// RNCircle.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::rngooglemapsplus { struct RNLatLng; }
23
+
24
+ #include <string>
25
+ #include <optional>
26
+ #include "RNLatLng.hpp"
27
+
28
+ namespace margelo::nitro::rngooglemapsplus {
29
+
30
+ /**
31
+ * A struct which can be represented as a JavaScript object (RNCircle).
32
+ */
33
+ struct RNCircle {
34
+ public:
35
+ std::string id SWIFT_PRIVATE;
36
+ std::optional<bool> pressable SWIFT_PRIVATE;
37
+ std::optional<double> zIndex SWIFT_PRIVATE;
38
+ RNLatLng center SWIFT_PRIVATE;
39
+ std::optional<double> radius SWIFT_PRIVATE;
40
+ std::optional<double> strokeWidth SWIFT_PRIVATE;
41
+ std::optional<std::string> strokeColor SWIFT_PRIVATE;
42
+ std::optional<std::string> fillColor SWIFT_PRIVATE;
43
+
44
+ public:
45
+ RNCircle() = default;
46
+ explicit RNCircle(std::string id, std::optional<bool> pressable, std::optional<double> zIndex, RNLatLng center, std::optional<double> radius, std::optional<double> strokeWidth, std::optional<std::string> strokeColor, std::optional<std::string> fillColor): id(id), pressable(pressable), zIndex(zIndex), center(center), radius(radius), strokeWidth(strokeWidth), strokeColor(strokeColor), fillColor(fillColor) {}
47
+ };
48
+
49
+ } // namespace margelo::nitro::rngooglemapsplus
50
+
51
+ namespace margelo::nitro {
52
+
53
+ // C++ RNCircle <> JS RNCircle (object)
54
+ template <>
55
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNCircle> final {
56
+ static inline margelo::nitro::rngooglemapsplus::RNCircle fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
+ jsi::Object obj = arg.asObject(runtime);
58
+ return margelo::nitro::rngooglemapsplus::RNCircle(
59
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
60
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "pressable")),
61
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
62
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "center")),
63
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "radius")),
64
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth")),
65
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
66
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor"))
67
+ );
68
+ }
69
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNCircle& arg) {
70
+ jsi::Object obj(runtime);
71
+ obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
72
+ obj.setProperty(runtime, "pressable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pressable));
73
+ obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
74
+ obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.center));
75
+ obj.setProperty(runtime, "radius", JSIConverter<std::optional<double>>::toJSI(runtime, arg.radius));
76
+ obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
77
+ obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
78
+ obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
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<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
88
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
89
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
90
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "radius"))) return false;
91
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
92
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
93
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
94
+ return true;
95
+ }
96
+ };
97
+
98
+ } // namespace margelo::nitro
@@ -0,0 +1,64 @@
1
+ ///
2
+ /// RNIOSLocationAccuracy.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::rngooglemapsplus {
22
+
23
+ /**
24
+ * An enum which can be represented as a JavaScript enum (RNIOSLocationAccuracy).
25
+ */
26
+ enum class RNIOSLocationAccuracy {
27
+ ACCURACY_BEST SWIFT_NAME(accuracyBest) = 0,
28
+ ACCURACY_NEAREST_TEN_METER SWIFT_NAME(accuracyNearestTenMeter) = 1,
29
+ ACCURACY_NEAREST_HUNDRED_METER SWIFT_NAME(accuracyNearestHundredMeter) = 2,
30
+ ACCURACY_KILOMETER SWIFT_NAME(accuracyKilometer) = 3,
31
+ } CLOSED_ENUM;
32
+
33
+ } // namespace margelo::nitro::rngooglemapsplus
34
+
35
+ namespace margelo::nitro {
36
+
37
+ // C++ RNIOSLocationAccuracy <> JS RNIOSLocationAccuracy (enum)
38
+ template <>
39
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy> final {
40
+ static inline margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
41
+ int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
42
+ return static_cast<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>(enumValue);
43
+ }
44
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy arg) {
45
+ int enumValue = static_cast<int>(arg);
46
+ return JSIConverter<int>::toJSI(runtime, enumValue);
47
+ }
48
+ static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
49
+ if (!value.isNumber()) {
50
+ return false;
51
+ }
52
+ double number = value.getNumber();
53
+ int integer = static_cast<int>(number);
54
+ if (number != integer) {
55
+ // The integer is not the same value as the double - we truncated floating points.
56
+ // Enums are all integers, so the input floating point number is obviously invalid.
57
+ return false;
58
+ }
59
+ // Check if we are within the bounds of the enum.
60
+ return integer >= 0 && integer <= 3;
61
+ }
62
+ };
63
+
64
+ } // namespace margelo::nitro
@@ -0,0 +1,73 @@
1
+ ///
2
+ /// RNIOSLocationConfig.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 `RNIOSLocationAccuracy` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSLocationAccuracy; }
23
+
24
+ #include "RNIOSLocationAccuracy.hpp"
25
+ #include <optional>
26
+
27
+ namespace margelo::nitro::rngooglemapsplus {
28
+
29
+ /**
30
+ * A struct which can be represented as a JavaScript object (RNIOSLocationConfig).
31
+ */
32
+ struct RNIOSLocationConfig {
33
+ public:
34
+ std::optional<RNIOSLocationAccuracy> desiredAccuracy SWIFT_PRIVATE;
35
+ std::optional<double> distanceFilterMeters SWIFT_PRIVATE;
36
+
37
+ public:
38
+ RNIOSLocationConfig() = default;
39
+ explicit RNIOSLocationConfig(std::optional<RNIOSLocationAccuracy> desiredAccuracy, std::optional<double> distanceFilterMeters): desiredAccuracy(desiredAccuracy), distanceFilterMeters(distanceFilterMeters) {}
40
+ };
41
+
42
+ } // namespace margelo::nitro::rngooglemapsplus
43
+
44
+ namespace margelo::nitro {
45
+
46
+ // C++ RNIOSLocationConfig <> JS RNIOSLocationConfig (object)
47
+ template <>
48
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIOSLocationConfig> final {
49
+ static inline margelo::nitro::rngooglemapsplus::RNIOSLocationConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
50
+ jsi::Object obj = arg.asObject(runtime);
51
+ return margelo::nitro::rngooglemapsplus::RNIOSLocationConfig(
52
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::fromJSI(runtime, obj.getProperty(runtime, "desiredAccuracy")),
53
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "distanceFilterMeters"))
54
+ );
55
+ }
56
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNIOSLocationConfig& arg) {
57
+ jsi::Object obj(runtime);
58
+ obj.setProperty(runtime, "desiredAccuracy", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::toJSI(runtime, arg.desiredAccuracy));
59
+ obj.setProperty(runtime, "distanceFilterMeters", JSIConverter<std::optional<double>>::toJSI(runtime, arg.distanceFilterMeters));
60
+ return obj;
61
+ }
62
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
63
+ if (!value.isObject()) {
64
+ return false;
65
+ }
66
+ jsi::Object obj = value.getObject(runtime);
67
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::canConvert(runtime, obj.getProperty(runtime, "desiredAccuracy"))) return false;
68
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "distanceFilterMeters"))) return false;
69
+ return true;
70
+ }
71
+ };
72
+
73
+ } // namespace margelo::nitro
@@ -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> camera SWIFT_PRIVATE;
38
+
39
+ public:
40
+ RNInitialProps() = default;
41
+ explicit RNInitialProps(std::optional<std::string> mapId, std::optional<bool> liteMode, std::optional<RNCamera> camera): mapId(mapId), liteMode(liteMode), camera(camera) {}
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, "camera"))
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, "camera", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::toJSI(runtime, arg.camera));
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, "camera"))) return false;
74
+ return true;
75
+ }
76
+ };
77
+
78
+ } // namespace margelo::nitro
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// RNLocationConfig.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 `RNAndroidLocationConfig` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNAndroidLocationConfig; }
23
+ // Forward declaration of `RNIOSLocationConfig` to properly resolve imports.
24
+ namespace margelo::nitro::rngooglemapsplus { struct RNIOSLocationConfig; }
25
+
26
+ #include "RNAndroidLocationConfig.hpp"
27
+ #include <optional>
28
+ #include "RNIOSLocationConfig.hpp"
29
+
30
+ namespace margelo::nitro::rngooglemapsplus {
31
+
32
+ /**
33
+ * A struct which can be represented as a JavaScript object (RNLocationConfig).
34
+ */
35
+ struct RNLocationConfig {
36
+ public:
37
+ std::optional<RNAndroidLocationConfig> android SWIFT_PRIVATE;
38
+ std::optional<RNIOSLocationConfig> ios SWIFT_PRIVATE;
39
+
40
+ public:
41
+ RNLocationConfig() = default;
42
+ explicit RNLocationConfig(std::optional<RNAndroidLocationConfig> android, std::optional<RNIOSLocationConfig> ios): android(android), ios(ios) {}
43
+ };
44
+
45
+ } // namespace margelo::nitro::rngooglemapsplus
46
+
47
+ namespace margelo::nitro {
48
+
49
+ // C++ RNLocationConfig <> JS RNLocationConfig (object)
50
+ template <>
51
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLocationConfig> final {
52
+ static inline margelo::nitro::rngooglemapsplus::RNLocationConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
+ jsi::Object obj = arg.asObject(runtime);
54
+ return margelo::nitro::rngooglemapsplus::RNLocationConfig(
55
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig>>::fromJSI(runtime, obj.getProperty(runtime, "android")),
56
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationConfig>>::fromJSI(runtime, obj.getProperty(runtime, "ios"))
57
+ );
58
+ }
59
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLocationConfig& arg) {
60
+ jsi::Object obj(runtime);
61
+ obj.setProperty(runtime, "android", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig>>::toJSI(runtime, arg.android));
62
+ obj.setProperty(runtime, "ios", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationConfig>>::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::rngooglemapsplus::RNAndroidLocationConfig>>::canConvert(runtime, obj.getProperty(runtime, "android"))) return false;
71
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationConfig>>::canConvert(runtime, obj.getProperty(runtime, "ios"))) return false;
72
+ return true;
73
+ }
74
+ };
75
+
76
+ } // namespace margelo::nitro
@@ -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