react-native-google-maps-plus 0.1.0 → 1.0.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.
- package/LICENSE +20 -0
- package/README.md +156 -0
- package/RNGoogleMapsPlus.podspec +34 -0
- package/android/CMakeLists.txt +32 -0
- package/android/build.gradle +135 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +8 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/rngooglemapsplus/Color.kt +65 -0
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +847 -0
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +205 -0
- package/android/src/main/java/com/rngooglemapsplus/MapCircle.kt +29 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarker.kt +146 -0
- package/android/src/main/java/com/rngooglemapsplus/MapPolygon.kt +38 -0
- package/android/src/main/java/com/rngooglemapsplus/MapPolyline.kt +61 -0
- package/android/src/main/java/com/rngooglemapsplus/PermissionHandler.kt +116 -0
- package/android/src/main/java/com/rngooglemapsplus/PlayServicesHandler.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusModule.kt +22 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusPackage.kt +35 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +364 -0
- package/ios/Color.swift +109 -0
- package/ios/GoogleMapViewImpl.swift +645 -0
- package/ios/LocationHandler.swift +205 -0
- package/ios/MapCircle.swift +43 -0
- package/ios/MapHelper.swift +18 -0
- package/ios/MapMarker.swift +200 -0
- package/ios/MapPolygon.swift +58 -0
- package/ios/MapPolyline.swift +85 -0
- package/ios/PermissionHandler.swift +73 -0
- package/ios/RNGoogleMapsPlusModule.swift +27 -0
- package/ios/RNGoogleMapsPlusView.swift +391 -0
- 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 +8 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +78 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts +12 -0
- package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +39 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +7 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +131 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/nitro.json +28 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.cmake +85 -0
- package/nitrogen/generated/android/RNGoogleMapsPlus+autolinking.gradle +27 -0
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +70 -0
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.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++/JHybridRNGoogleMapsPlusModuleSpec.cpp +83 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +589 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +118 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
- package/nitrogen/generated/android/c++/JRNCircle.hpp +84 -0
- package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNInitialProps.hpp +66 -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++/JRNMapType.hpp +68 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +98 -0
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +106 -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/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +152 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocation.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNLocationErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNMapErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNRegion_RNCamera_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +64 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +317 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPermissionResult.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNGoogleMapsPlusOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSPermissionResult.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineCapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLineJoinType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationErrorCode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapErrorCode.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapType.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUserInterfaceStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus+autolinking.rb +60 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +121 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +792 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +113 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.mm +41 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlusAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusModuleSpecSwift.hpp +102 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +342 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +216 -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/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec_cxx.swift +164 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +881 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
- package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
- package/nitrogen/generated/ios/swift/RNCircle.swift +198 -0
- package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +107 -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/RNMapType.swift +52 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +132 -0
- package/nitrogen/generated/ios/swift/RNPolygon.swift +187 -0
- package/nitrogen/generated/ios/swift/RNPolyline.swift +203 -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++/HybridRNGoogleMapsPlusModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +164 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
- package/nitrogen/generated/shared/c++/RNCircle.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
- package/nitrogen/generated/shared/c++/RNInitialProps.hpp +78 -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++/RNMapType.hpp +88 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +95 -0
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +105 -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/HybridRNGoogleMapsPlusViewComponent.cpp +375 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +147 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +34 -0
- package/package.json +24 -8
- package/src/RNGoogleMapsPlusModule.nitro.ts +13 -0
- package/src/RNGoogleMapsPlusView.nitro.ts +86 -0
- package/src/index.tsx +24 -0
- package/src/types.ts +195 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridRNGoogleMapsPlusViewSpec.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/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `RNInitialProps` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
18
|
+
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
20
|
+
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMapPadding; }
|
|
22
|
+
// Forward declaration of `RNMapType` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNMapType; }
|
|
24
|
+
// Forward declaration of `RNMarker` to properly resolve imports.
|
|
25
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMarker; }
|
|
26
|
+
// Forward declaration of `RNPolygon` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNPolygon; }
|
|
28
|
+
// Forward declaration of `RNPolyline` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
|
|
30
|
+
// Forward declaration of `RNCircle` to properly resolve imports.
|
|
31
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNCircle; }
|
|
32
|
+
// Forward declaration of `RNMapErrorCode` to properly resolve imports.
|
|
33
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
|
|
34
|
+
// Forward declaration of `RNLocation` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLocation; }
|
|
36
|
+
// Forward declaration of `RNLocationErrorCode` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
|
|
38
|
+
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
39
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
40
|
+
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
41
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
|
|
42
|
+
// Forward declaration of `RNCamera` to properly resolve imports.
|
|
43
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNCamera; }
|
|
44
|
+
// Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
|
|
45
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
|
|
46
|
+
|
|
47
|
+
#include "RNInitialProps.hpp"
|
|
48
|
+
#include <optional>
|
|
49
|
+
#include <string>
|
|
50
|
+
#include "RNUserInterfaceStyle.hpp"
|
|
51
|
+
#include "RNMapPadding.hpp"
|
|
52
|
+
#include "RNMapType.hpp"
|
|
53
|
+
#include "RNMarker.hpp"
|
|
54
|
+
#include <vector>
|
|
55
|
+
#include "RNPolygon.hpp"
|
|
56
|
+
#include "RNPolyline.hpp"
|
|
57
|
+
#include "RNCircle.hpp"
|
|
58
|
+
#include "RNMapErrorCode.hpp"
|
|
59
|
+
#include <functional>
|
|
60
|
+
#include "RNLocation.hpp"
|
|
61
|
+
#include "RNLocationErrorCode.hpp"
|
|
62
|
+
#include "RNLatLng.hpp"
|
|
63
|
+
#include "RNRegion.hpp"
|
|
64
|
+
#include "RNCamera.hpp"
|
|
65
|
+
#include "RNLocationPermissionResult.hpp"
|
|
66
|
+
#include <NitroModules/Promise.hpp>
|
|
67
|
+
|
|
68
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
69
|
+
|
|
70
|
+
using namespace margelo::nitro;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* An abstract base class for `RNGoogleMapsPlusView`
|
|
74
|
+
* Inherit this class to create instances of `HybridRNGoogleMapsPlusViewSpec` in C++.
|
|
75
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
76
|
+
* @example
|
|
77
|
+
* ```cpp
|
|
78
|
+
* class HybridRNGoogleMapsPlusView: public HybridRNGoogleMapsPlusViewSpec {
|
|
79
|
+
* public:
|
|
80
|
+
* HybridRNGoogleMapsPlusView(...): HybridObject(TAG) { ... }
|
|
81
|
+
* // ...
|
|
82
|
+
* };
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
class HybridRNGoogleMapsPlusViewSpec: public virtual HybridObject {
|
|
86
|
+
public:
|
|
87
|
+
// Constructor
|
|
88
|
+
explicit HybridRNGoogleMapsPlusViewSpec(): HybridObject(TAG) { }
|
|
89
|
+
|
|
90
|
+
// Destructor
|
|
91
|
+
~HybridRNGoogleMapsPlusViewSpec() override = default;
|
|
92
|
+
|
|
93
|
+
public:
|
|
94
|
+
// Properties
|
|
95
|
+
virtual std::optional<RNInitialProps> getInitialProps() = 0;
|
|
96
|
+
virtual void setInitialProps(const std::optional<RNInitialProps>& initialProps) = 0;
|
|
97
|
+
virtual std::optional<bool> getBuildingEnabled() = 0;
|
|
98
|
+
virtual void setBuildingEnabled(std::optional<bool> buildingEnabled) = 0;
|
|
99
|
+
virtual std::optional<bool> getTrafficEnabled() = 0;
|
|
100
|
+
virtual void setTrafficEnabled(std::optional<bool> trafficEnabled) = 0;
|
|
101
|
+
virtual std::optional<std::string> getCustomMapStyle() = 0;
|
|
102
|
+
virtual void setCustomMapStyle(const std::optional<std::string>& customMapStyle) = 0;
|
|
103
|
+
virtual std::optional<RNUserInterfaceStyle> getUserInterfaceStyle() = 0;
|
|
104
|
+
virtual void setUserInterfaceStyle(std::optional<RNUserInterfaceStyle> userInterfaceStyle) = 0;
|
|
105
|
+
virtual std::optional<double> getMinZoomLevel() = 0;
|
|
106
|
+
virtual void setMinZoomLevel(std::optional<double> minZoomLevel) = 0;
|
|
107
|
+
virtual std::optional<double> getMaxZoomLevel() = 0;
|
|
108
|
+
virtual void setMaxZoomLevel(std::optional<double> maxZoomLevel) = 0;
|
|
109
|
+
virtual std::optional<RNMapPadding> getMapPadding() = 0;
|
|
110
|
+
virtual void setMapPadding(const std::optional<RNMapPadding>& mapPadding) = 0;
|
|
111
|
+
virtual std::optional<RNMapType> getMapType() = 0;
|
|
112
|
+
virtual void setMapType(std::optional<RNMapType> mapType) = 0;
|
|
113
|
+
virtual std::optional<std::vector<RNMarker>> getMarkers() = 0;
|
|
114
|
+
virtual void setMarkers(const std::optional<std::vector<RNMarker>>& markers) = 0;
|
|
115
|
+
virtual std::optional<std::vector<RNPolygon>> getPolygons() = 0;
|
|
116
|
+
virtual void setPolygons(const std::optional<std::vector<RNPolygon>>& polygons) = 0;
|
|
117
|
+
virtual std::optional<std::vector<RNPolyline>> getPolylines() = 0;
|
|
118
|
+
virtual void setPolylines(const std::optional<std::vector<RNPolyline>>& polylines) = 0;
|
|
119
|
+
virtual std::optional<std::vector<RNCircle>> getCircles() = 0;
|
|
120
|
+
virtual void setCircles(const std::optional<std::vector<RNCircle>>& circles) = 0;
|
|
121
|
+
virtual std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() = 0;
|
|
122
|
+
virtual void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) = 0;
|
|
123
|
+
virtual std::optional<std::function<void(bool /* ready */)>> getOnMapReady() = 0;
|
|
124
|
+
virtual void setOnMapReady(const std::optional<std::function<void(bool /* ready */)>>& onMapReady) = 0;
|
|
125
|
+
virtual std::optional<std::function<void(const RNLocation& /* location */)>> getOnLocationUpdate() = 0;
|
|
126
|
+
virtual void setOnLocationUpdate(const std::optional<std::function<void(const RNLocation& /* location */)>>& onLocationUpdate) = 0;
|
|
127
|
+
virtual std::optional<std::function<void(RNLocationErrorCode /* error */)>> getOnLocationError() = 0;
|
|
128
|
+
virtual void setOnLocationError(const std::optional<std::function<void(RNLocationErrorCode /* error */)>>& onLocationError) = 0;
|
|
129
|
+
virtual std::optional<std::function<void(const RNLatLng& /* coordinate */)>> getOnMapPress() = 0;
|
|
130
|
+
virtual void setOnMapPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapPress) = 0;
|
|
131
|
+
virtual std::optional<std::function<void(const std::string& /* id */)>> getOnMarkerPress() = 0;
|
|
132
|
+
virtual void setOnMarkerPress(const std::optional<std::function<void(const std::string& /* id */)>>& onMarkerPress) = 0;
|
|
133
|
+
virtual std::optional<std::function<void(const std::string& /* id */)>> getOnPolylinePress() = 0;
|
|
134
|
+
virtual void setOnPolylinePress(const std::optional<std::function<void(const std::string& /* id */)>>& onPolylinePress) = 0;
|
|
135
|
+
virtual std::optional<std::function<void(const std::string& /* id */)>> getOnPolygonPress() = 0;
|
|
136
|
+
virtual void setOnPolygonPress(const std::optional<std::function<void(const std::string& /* id */)>>& onPolygonPress) = 0;
|
|
137
|
+
virtual std::optional<std::function<void(const std::string& /* id */)>> getOnCirclePress() = 0;
|
|
138
|
+
virtual void setOnCirclePress(const std::optional<std::function<void(const std::string& /* id */)>>& onCirclePress) = 0;
|
|
139
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() = 0;
|
|
140
|
+
virtual void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) = 0;
|
|
141
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() = 0;
|
|
142
|
+
virtual void setOnCameraChange(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChange) = 0;
|
|
143
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeComplete() = 0;
|
|
144
|
+
virtual void setOnCameraChangeComplete(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeComplete) = 0;
|
|
145
|
+
|
|
146
|
+
public:
|
|
147
|
+
// Methods
|
|
148
|
+
virtual void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) = 0;
|
|
149
|
+
virtual void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) = 0;
|
|
150
|
+
virtual void showLocationDialog() = 0;
|
|
151
|
+
virtual void openLocationSettings() = 0;
|
|
152
|
+
virtual std::shared_ptr<Promise<RNLocationPermissionResult>> requestLocationPermission() = 0;
|
|
153
|
+
virtual bool isGooglePlayServicesAvailable() = 0;
|
|
154
|
+
|
|
155
|
+
protected:
|
|
156
|
+
// Hybrid Setup
|
|
157
|
+
void loadHybridMethods() override;
|
|
158
|
+
|
|
159
|
+
protected:
|
|
160
|
+
// Tag for logging
|
|
161
|
+
static constexpr auto TAG = "RNGoogleMapsPlusView";
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNAndroidLocationPermissionResult.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 (RNAndroidLocationPermissionResult).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNAndroidLocationPermissionResult {
|
|
27
|
+
GRANTED SWIFT_NAME(granted) = 1,
|
|
28
|
+
DENIED SWIFT_NAME(denied) = -1,
|
|
29
|
+
NEVER_ASK_AGAIN SWIFT_NAME(neverAskAgain) = -2,
|
|
30
|
+
} CLOSED_ENUM;
|
|
31
|
+
|
|
32
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
33
|
+
|
|
34
|
+
namespace margelo::nitro {
|
|
35
|
+
|
|
36
|
+
// C++ RNAndroidLocationPermissionResult <> JS RNAndroidLocationPermissionResult (enum)
|
|
37
|
+
template <>
|
|
38
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult> final {
|
|
39
|
+
static inline margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
40
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
41
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult>(enumValue);
|
|
42
|
+
}
|
|
43
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNAndroidLocationPermissionResult arg) {
|
|
44
|
+
int enumValue = static_cast<int>(arg);
|
|
45
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
46
|
+
}
|
|
47
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
48
|
+
if (!value.isNumber()) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
double number = value.getNumber();
|
|
52
|
+
int integer = static_cast<int>(number);
|
|
53
|
+
if (number != integer) {
|
|
54
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
55
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
switch (integer) {
|
|
59
|
+
case 1 /* GRANTED */: return true;
|
|
60
|
+
case -1 /* DENIED */: return true;
|
|
61
|
+
case -2 /* NEVER_ASK_AGAIN */: return true;
|
|
62
|
+
default: return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNCamera.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 "RNLatLng.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (RNCamera).
|
|
31
|
+
*/
|
|
32
|
+
struct RNCamera {
|
|
33
|
+
public:
|
|
34
|
+
std::optional<RNLatLng> center SWIFT_PRIVATE;
|
|
35
|
+
std::optional<double> zoom SWIFT_PRIVATE;
|
|
36
|
+
std::optional<double> bearing SWIFT_PRIVATE;
|
|
37
|
+
std::optional<double> tilt SWIFT_PRIVATE;
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
RNCamera() = default;
|
|
41
|
+
explicit RNCamera(std::optional<RNLatLng> center, std::optional<double> zoom, std::optional<double> bearing, std::optional<double> tilt): center(center), zoom(zoom), bearing(bearing), tilt(tilt) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ RNCamera <> JS RNCamera (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNCamera> final {
|
|
51
|
+
static inline margelo::nitro::rngooglemapsplus::RNCamera fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::rngooglemapsplus::RNCamera(
|
|
54
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLatLng>>::fromJSI(runtime, obj.getProperty(runtime, "center")),
|
|
55
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zoom")),
|
|
56
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "bearing")),
|
|
57
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "tilt"))
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNCamera& arg) {
|
|
61
|
+
jsi::Object obj(runtime);
|
|
62
|
+
obj.setProperty(runtime, "center", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLatLng>>::toJSI(runtime, arg.center));
|
|
63
|
+
obj.setProperty(runtime, "zoom", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zoom));
|
|
64
|
+
obj.setProperty(runtime, "bearing", JSIConverter<std::optional<double>>::toJSI(runtime, arg.bearing));
|
|
65
|
+
obj.setProperty(runtime, "tilt", JSIConverter<std::optional<double>>::toJSI(runtime, arg.tilt));
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
+
if (!value.isObject()) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
jsi::Object obj = value.getObject(runtime);
|
|
73
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNLatLng>>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
|
|
74
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zoom"))) return false;
|
|
75
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "bearing"))) return false;
|
|
76
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "tilt"))) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // 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,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNIOSPermissionResult.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 (RNIOSPermissionResult).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNIOSPermissionResult {
|
|
27
|
+
DENIED SWIFT_NAME(denied) = -1,
|
|
28
|
+
AUTHORIZED SWIFT_NAME(authorized) = 1,
|
|
29
|
+
} CLOSED_ENUM;
|
|
30
|
+
|
|
31
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
32
|
+
|
|
33
|
+
namespace margelo::nitro {
|
|
34
|
+
|
|
35
|
+
// C++ RNIOSPermissionResult <> JS RNIOSPermissionResult (enum)
|
|
36
|
+
template <>
|
|
37
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIOSPermissionResult> final {
|
|
38
|
+
static inline margelo::nitro::rngooglemapsplus::RNIOSPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
39
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
40
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNIOSPermissionResult>(enumValue);
|
|
41
|
+
}
|
|
42
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNIOSPermissionResult arg) {
|
|
43
|
+
int enumValue = static_cast<int>(arg);
|
|
44
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
45
|
+
}
|
|
46
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
47
|
+
if (!value.isNumber()) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
double number = value.getNumber();
|
|
51
|
+
int integer = static_cast<int>(number);
|
|
52
|
+
if (number != integer) {
|
|
53
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
54
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
switch (integer) {
|
|
58
|
+
case -1 /* DENIED */: return true;
|
|
59
|
+
case 1 /* AUTHORIZED */: return true;
|
|
60
|
+
default: return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // 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> 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
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLatLng.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::rngooglemapsplus {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (RNLatLng).
|
|
29
|
+
*/
|
|
30
|
+
struct RNLatLng {
|
|
31
|
+
public:
|
|
32
|
+
double latitude SWIFT_PRIVATE;
|
|
33
|
+
double longitude SWIFT_PRIVATE;
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
RNLatLng() = default;
|
|
37
|
+
explicit RNLatLng(double latitude, double longitude): latitude(latitude), longitude(longitude) {}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
41
|
+
|
|
42
|
+
namespace margelo::nitro {
|
|
43
|
+
|
|
44
|
+
// C++ RNLatLng <> JS RNLatLng (object)
|
|
45
|
+
template <>
|
|
46
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng> final {
|
|
47
|
+
static inline margelo::nitro::rngooglemapsplus::RNLatLng fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
49
|
+
return margelo::nitro::rngooglemapsplus::RNLatLng(
|
|
50
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitude")),
|
|
51
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitude"))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLatLng& arg) {
|
|
55
|
+
jsi::Object obj(runtime);
|
|
56
|
+
obj.setProperty(runtime, "latitude", JSIConverter<double>::toJSI(runtime, arg.latitude));
|
|
57
|
+
obj.setProperty(runtime, "longitude", JSIConverter<double>::toJSI(runtime, arg.longitude));
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
61
|
+
if (!value.isObject()) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
jsi::Object obj = value.getObject(runtime);
|
|
65
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitude"))) return false;
|
|
66
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitude"))) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // namespace margelo::nitro
|