react-native-google-maps-plus 1.0.0 → 1.0.2
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/{GoogleMapsNitro.podspec → RNGoogleMapsPlus.podspec} +2 -2
- package/android/CMakeLists.txt +3 -3
- package/android/build.gradle +4 -4
- package/android/gradle.properties +8 -8
- package/android/src/main/cpp/cpp-adapter.cpp +2 -2
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/Color.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroViewImpl.kt → rngooglemapsplus/GoogleMapsViewImpl.kt} +7 -7
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/LocationHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapMarker.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolygon.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/MapPolyline.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PermissionHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro → rngooglemapsplus}/PlayServicesHandler.kt +1 -1
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroModule.kt → rngooglemapsplus/RNGoogleMapsPlusModule.kt} +3 -3
- package/android/src/main/java/com/{googlemapsnitro/GoogleMapsNitroPackage.kt → rngooglemapsplus/RNGoogleMapsPlusPackage.kt} +6 -6
- package/android/src/main/java/com/{googlemapsnitro/HybridGoogleMapsNitroView.kt → rngooglemapsplus/RNGoogleMapsPlusView.kt} +4 -4
- package/ios/{GoogleMapNitroViewImpl.swift → GoogleMapViewImpl.swift} +1 -1
- package/ios/{HybridGoogleMapsNitroModule.swift → RNGoogleMapsPlusModule.swift} +1 -1
- package/ios/{HybridGoogleMapsNitroView.swift → RNGoogleMapsPlusView.swift} +3 -3
- package/lib/module/RNGoogleMapsPlusModule.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusModule.nitro.js.map +1 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js +4 -0
- package/lib/module/RNGoogleMapsPlusView.nitro.js.map +1 -0
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/{GoogleMapsNitroModule.nitro.d.ts → RNGoogleMapsPlusModule.nitro.d.ts} +2 -2
- package/lib/typescript/src/RNGoogleMapsPlusModule.nitro.d.ts.map +1 -0
- package/lib/typescript/src/{GoogleMapsNitroView.nitro.d.ts → RNGoogleMapsPlusView.nitro.d.ts} +4 -4
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +5 -5
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +2 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitro.json +11 -11
- 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 +485 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.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/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +132 -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 +263 -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/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/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/RNMarker.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +47 -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 +50 -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 +649 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +104 -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 +294 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.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/HybridRNGoogleMapsPlusModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusModuleSpec_cxx.swift +164 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_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++/HybridRNGoogleMapsPlusModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusModuleSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.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/HybridRNGoogleMapsPlusViewComponent.cpp +315 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +139 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +29 -0
- package/package.json +9 -3
- package/src/{GoogleMapsNitroModule.nitro.ts → RNGoogleMapsPlusModule.nitro.ts} +1 -1
- package/src/{GoogleMapsNitroView.nitro.ts → RNGoogleMapsPlusView.nitro.ts} +5 -5
- package/src/index.tsx +11 -11
- package/src/types.ts +2 -2
- package/lib/module/GoogleMapsNitroModule.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroModule.nitro.js.map +0 -1
- package/lib/module/GoogleMapsNitroView.nitro.js +0 -4
- package/lib/module/GoogleMapsNitroView.nitro.js.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroModule.nitro.d.ts.map +0 -1
- package/lib/typescript/src/GoogleMapsNitroView.nitro.d.ts.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
#include <NitroModules/JHybridObject.hpp>
|
|
11
|
+
#include <fbjni/fbjni.h>
|
|
12
|
+
#include "HybridRNGoogleMapsPlusViewSpec.hpp"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
class JHybridRNGoogleMapsPlusViewSpec: public jni::HybridClass<JHybridRNGoogleMapsPlusViewSpec, JHybridObject>,
|
|
22
|
+
public virtual HybridRNGoogleMapsPlusViewSpec {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec;";
|
|
25
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
|
26
|
+
static void registerNatives();
|
|
27
|
+
|
|
28
|
+
protected:
|
|
29
|
+
// C++ constructor (called from Java via `initHybrid()`)
|
|
30
|
+
explicit JHybridRNGoogleMapsPlusViewSpec(jni::alias_ref<jhybridobject> jThis) :
|
|
31
|
+
HybridObject(HybridRNGoogleMapsPlusViewSpec::TAG),
|
|
32
|
+
HybridBase(jThis),
|
|
33
|
+
_javaPart(jni::make_global(jThis)) {}
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
~JHybridRNGoogleMapsPlusViewSpec() override {
|
|
37
|
+
// Hermes GC can destroy JS objects on a non-JNI Thread.
|
|
38
|
+
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
size_t getExternalMemorySize() noexcept override;
|
|
43
|
+
void dispose() noexcept override;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
inline const jni::global_ref<JHybridRNGoogleMapsPlusViewSpec::javaobject>& getJavaPart() const noexcept {
|
|
47
|
+
return _javaPart;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
// Properties
|
|
52
|
+
bool getBuildingEnabled() override;
|
|
53
|
+
void setBuildingEnabled(bool buildingEnabled) override;
|
|
54
|
+
bool getTrafficEnabled() override;
|
|
55
|
+
void setTrafficEnabled(bool trafficEnabled) override;
|
|
56
|
+
std::string getCustomMapStyle() override;
|
|
57
|
+
void setCustomMapStyle(const std::string& customMapStyle) override;
|
|
58
|
+
RNCamera getInitialCamera() override;
|
|
59
|
+
void setInitialCamera(const RNCamera& initialCamera) override;
|
|
60
|
+
RNUserInterfaceStyle getUserInterfaceStyle() override;
|
|
61
|
+
void setUserInterfaceStyle(RNUserInterfaceStyle userInterfaceStyle) override;
|
|
62
|
+
double getMinZoomLevel() override;
|
|
63
|
+
void setMinZoomLevel(double minZoomLevel) override;
|
|
64
|
+
double getMaxZoomLevel() override;
|
|
65
|
+
void setMaxZoomLevel(double maxZoomLevel) override;
|
|
66
|
+
RNMapPadding getMapPadding() override;
|
|
67
|
+
void setMapPadding(const RNMapPadding& mapPadding) override;
|
|
68
|
+
std::vector<RNMarker> getMarkers() override;
|
|
69
|
+
void setMarkers(const std::vector<RNMarker>& markers) override;
|
|
70
|
+
std::vector<RNPolygon> getPolygons() override;
|
|
71
|
+
void setPolygons(const std::vector<RNPolygon>& polygons) override;
|
|
72
|
+
std::vector<RNPolyline> getPolylines() override;
|
|
73
|
+
void setPolylines(const std::vector<RNPolyline>& polylines) override;
|
|
74
|
+
std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() override;
|
|
75
|
+
void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) override;
|
|
76
|
+
std::optional<std::function<void(bool /* ready */)>> getOnMapReady() override;
|
|
77
|
+
void setOnMapReady(const std::optional<std::function<void(bool /* ready */)>>& onMapReady) override;
|
|
78
|
+
std::optional<std::function<void(const RNLocation& /* location */)>> getOnLocationUpdate() override;
|
|
79
|
+
void setOnLocationUpdate(const std::optional<std::function<void(const RNLocation& /* location */)>>& onLocationUpdate) override;
|
|
80
|
+
std::optional<std::function<void(RNLocationErrorCode /* error */)>> getOnLocationError() override;
|
|
81
|
+
void setOnLocationError(const std::optional<std::function<void(RNLocationErrorCode /* error */)>>& onLocationError) override;
|
|
82
|
+
std::optional<std::function<void(const RNLatLng& /* coordinate */)>> getOnMapPress() override;
|
|
83
|
+
void setOnMapPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapPress) override;
|
|
84
|
+
std::optional<std::function<void(const std::string& /* id */)>> getOnMarkerPress() override;
|
|
85
|
+
void setOnMarkerPress(const std::optional<std::function<void(const std::string& /* id */)>>& onMarkerPress) override;
|
|
86
|
+
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() override;
|
|
87
|
+
void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) override;
|
|
88
|
+
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() override;
|
|
89
|
+
void setOnCameraChange(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChange) override;
|
|
90
|
+
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeComplete() override;
|
|
91
|
+
void setOnCameraChangeComplete(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeComplete) override;
|
|
92
|
+
|
|
93
|
+
public:
|
|
94
|
+
// Methods
|
|
95
|
+
void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) override;
|
|
96
|
+
void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) override;
|
|
97
|
+
void showLocationDialog() override;
|
|
98
|
+
void openLocationSettings() override;
|
|
99
|
+
std::shared_ptr<Promise<RNLocationPermissionResult>> requestLocationPermission() override;
|
|
100
|
+
bool isGooglePlayServicesAvailable() override;
|
|
101
|
+
|
|
102
|
+
private:
|
|
103
|
+
friend HybridBase;
|
|
104
|
+
using HybridBase::HybridBase;
|
|
105
|
+
jni::global_ref<JHybridRNGoogleMapsPlusViewSpec::javaobject> _javaPart;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNAndroidLocationPermissionResult.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNAndroidLocationPermissionResult.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNAndroidLocationPermissionResult" and the the Kotlin enum "RNAndroidLocationPermissionResult".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNAndroidLocationPermissionResult final: public jni::JavaClass<JRNAndroidLocationPermissionResult> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNAndroidLocationPermissionResult;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNAndroidLocationPermissionResult.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNAndroidLocationPermissionResult toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNAndroidLocationPermissionResult>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNAndroidLocationPermissionResult> fromCpp(RNAndroidLocationPermissionResult value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldGRANTED = clazz->getStaticField<JRNAndroidLocationPermissionResult>("GRANTED");
|
|
45
|
+
static const auto fieldDENIED = clazz->getStaticField<JRNAndroidLocationPermissionResult>("DENIED");
|
|
46
|
+
static const auto fieldNEVER_ASK_AGAIN = clazz->getStaticField<JRNAndroidLocationPermissionResult>("NEVER_ASK_AGAIN");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case RNAndroidLocationPermissionResult::GRANTED:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldGRANTED);
|
|
51
|
+
case RNAndroidLocationPermissionResult::DENIED:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldDENIED);
|
|
53
|
+
case RNAndroidLocationPermissionResult::NEVER_ASK_AGAIN:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldNEVER_ASK_AGAIN);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNCamera.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNCamera.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "RNLatLng.hpp"
|
|
15
|
+
#include <optional>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "RNCamera" and the the Kotlin data class "RNCamera".
|
|
23
|
+
*/
|
|
24
|
+
struct JRNCamera final: public jni::JavaClass<JRNCamera> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNCamera;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNCamera by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
RNCamera toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
|
|
37
|
+
jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
|
|
38
|
+
static const auto fieldZoom = clazz->getField<jni::JDouble>("zoom");
|
|
39
|
+
jni::local_ref<jni::JDouble> zoom = this->getFieldValue(fieldZoom);
|
|
40
|
+
static const auto fieldBearing = clazz->getField<jni::JDouble>("bearing");
|
|
41
|
+
jni::local_ref<jni::JDouble> bearing = this->getFieldValue(fieldBearing);
|
|
42
|
+
static const auto fieldTilt = clazz->getField<jni::JDouble>("tilt");
|
|
43
|
+
jni::local_ref<jni::JDouble> tilt = this->getFieldValue(fieldTilt);
|
|
44
|
+
return RNCamera(
|
|
45
|
+
center != nullptr ? std::make_optional(center->toCpp()) : std::nullopt,
|
|
46
|
+
zoom != nullptr ? std::make_optional(zoom->value()) : std::nullopt,
|
|
47
|
+
bearing != nullptr ? std::make_optional(bearing->value()) : std::nullopt,
|
|
48
|
+
tilt != nullptr ? std::make_optional(tilt->value()) : std::nullopt
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
/**
|
|
54
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
55
|
+
*/
|
|
56
|
+
[[maybe_unused]]
|
|
57
|
+
static jni::local_ref<JRNCamera::javaobject> fromCpp(const RNCamera& value) {
|
|
58
|
+
return newInstance(
|
|
59
|
+
value.center.has_value() ? JRNLatLng::fromCpp(value.center.value()) : nullptr,
|
|
60
|
+
value.zoom.has_value() ? jni::JDouble::valueOf(value.zoom.value()) : nullptr,
|
|
61
|
+
value.bearing.has_value() ? jni::JDouble::valueOf(value.bearing.value()) : nullptr,
|
|
62
|
+
value.tilt.has_value() ? jni::JDouble::valueOf(value.tilt.value()) : nullptr
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNIOSPermissionResult.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNIOSPermissionResult.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNIOSPermissionResult" and the the Kotlin enum "RNIOSPermissionResult".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNIOSPermissionResult final: public jni::JavaClass<JRNIOSPermissionResult> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNIOSPermissionResult;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNIOSPermissionResult.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNIOSPermissionResult toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNIOSPermissionResult>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNIOSPermissionResult> fromCpp(RNIOSPermissionResult value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldDENIED = clazz->getStaticField<JRNIOSPermissionResult>("DENIED");
|
|
45
|
+
static const auto fieldAUTHORIZED = clazz->getStaticField<JRNIOSPermissionResult>("AUTHORIZED");
|
|
46
|
+
|
|
47
|
+
switch (value) {
|
|
48
|
+
case RNIOSPermissionResult::DENIED:
|
|
49
|
+
return clazz->getStaticFieldValue(fieldDENIED);
|
|
50
|
+
case RNIOSPermissionResult::AUTHORIZED:
|
|
51
|
+
return clazz->getStaticFieldValue(fieldAUTHORIZED);
|
|
52
|
+
default:
|
|
53
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
54
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLatLng.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLatLng.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "RNLatLng" and the the Kotlin data class "RNLatLng".
|
|
21
|
+
*/
|
|
22
|
+
struct JRNLatLng final: public jni::JavaClass<JRNLatLng> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLatLng;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNLatLng by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
RNLatLng toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldLatitude = clazz->getField<double>("latitude");
|
|
35
|
+
double latitude = this->getFieldValue(fieldLatitude);
|
|
36
|
+
static const auto fieldLongitude = clazz->getField<double>("longitude");
|
|
37
|
+
double longitude = this->getFieldValue(fieldLongitude);
|
|
38
|
+
return RNLatLng(
|
|
39
|
+
latitude,
|
|
40
|
+
longitude
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JRNLatLng::javaobject> fromCpp(const RNLatLng& value) {
|
|
50
|
+
return newInstance(
|
|
51
|
+
value.latitude,
|
|
52
|
+
value.longitude
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLineCapType.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLineCapType.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNLineCapType" and the the Kotlin enum "RNLineCapType".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNLineCapType final: public jni::JavaClass<JRNLineCapType> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLineCapType;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNLineCapType.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNLineCapType toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNLineCapType>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNLineCapType> fromCpp(RNLineCapType value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldBUTT = clazz->getStaticField<JRNLineCapType>("BUTT");
|
|
45
|
+
static const auto fieldROUND = clazz->getStaticField<JRNLineCapType>("ROUND");
|
|
46
|
+
static const auto fieldSQUARE = clazz->getStaticField<JRNLineCapType>("SQUARE");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case RNLineCapType::BUTT:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldBUTT);
|
|
51
|
+
case RNLineCapType::ROUND:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldROUND);
|
|
53
|
+
case RNLineCapType::SQUARE:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldSQUARE);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLineJoinType.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLineJoinType.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNLineJoinType" and the the Kotlin enum "RNLineJoinType".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNLineJoinType final: public jni::JavaClass<JRNLineJoinType> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLineJoinType;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNLineJoinType.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNLineJoinType toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNLineJoinType>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNLineJoinType> fromCpp(RNLineJoinType value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldROUND = clazz->getStaticField<JRNLineJoinType>("ROUND");
|
|
45
|
+
static const auto fieldMITER = clazz->getStaticField<JRNLineJoinType>("MITER");
|
|
46
|
+
static const auto fieldBEVEL = clazz->getStaticField<JRNLineJoinType>("BEVEL");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case RNLineJoinType::ROUND:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldROUND);
|
|
51
|
+
case RNLineJoinType::MITER:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldMITER);
|
|
53
|
+
case RNLineJoinType::BEVEL:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldBEVEL);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLocation.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLocation.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNLatLng.hpp"
|
|
14
|
+
#include "RNLatLng.hpp"
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "RNLocation" and the the Kotlin data class "RNLocation".
|
|
22
|
+
*/
|
|
23
|
+
struct JRNLocation final: public jni::JavaClass<JRNLocation> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLocation;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNLocation by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
RNLocation toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
|
|
36
|
+
jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
|
|
37
|
+
static const auto fieldBearing = clazz->getField<double>("bearing");
|
|
38
|
+
double bearing = this->getFieldValue(fieldBearing);
|
|
39
|
+
return RNLocation(
|
|
40
|
+
center->toCpp(),
|
|
41
|
+
bearing
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
/**
|
|
47
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
48
|
+
*/
|
|
49
|
+
[[maybe_unused]]
|
|
50
|
+
static jni::local_ref<JRNLocation::javaobject> fromCpp(const RNLocation& value) {
|
|
51
|
+
return newInstance(
|
|
52
|
+
JRNLatLng::fromCpp(value.center),
|
|
53
|
+
value.bearing
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLocationErrorCode.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLocationErrorCode.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNLocationErrorCode" and the the Kotlin enum "RNLocationErrorCode".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNLocationErrorCode final: public jni::JavaClass<JRNLocationErrorCode> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLocationErrorCode;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNLocationErrorCode.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNLocationErrorCode toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNLocationErrorCode>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNLocationErrorCode> fromCpp(RNLocationErrorCode value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldPERMISSION_DENIED = clazz->getStaticField<JRNLocationErrorCode>("PERMISSION_DENIED");
|
|
45
|
+
static const auto fieldPOSITION_UNAVAILABLE = clazz->getStaticField<JRNLocationErrorCode>("POSITION_UNAVAILABLE");
|
|
46
|
+
static const auto fieldTIMEOUT = clazz->getStaticField<JRNLocationErrorCode>("TIMEOUT");
|
|
47
|
+
static const auto fieldPLAY_SERVICE_NOT_AVAILABLE = clazz->getStaticField<JRNLocationErrorCode>("PLAY_SERVICE_NOT_AVAILABLE");
|
|
48
|
+
static const auto fieldSETTINGS_NOT_SATISFIED = clazz->getStaticField<JRNLocationErrorCode>("SETTINGS_NOT_SATISFIED");
|
|
49
|
+
static const auto fieldINTERNAL_ERROR = clazz->getStaticField<JRNLocationErrorCode>("INTERNAL_ERROR");
|
|
50
|
+
|
|
51
|
+
switch (value) {
|
|
52
|
+
case RNLocationErrorCode::PERMISSION_DENIED:
|
|
53
|
+
return clazz->getStaticFieldValue(fieldPERMISSION_DENIED);
|
|
54
|
+
case RNLocationErrorCode::POSITION_UNAVAILABLE:
|
|
55
|
+
return clazz->getStaticFieldValue(fieldPOSITION_UNAVAILABLE);
|
|
56
|
+
case RNLocationErrorCode::TIMEOUT:
|
|
57
|
+
return clazz->getStaticFieldValue(fieldTIMEOUT);
|
|
58
|
+
case RNLocationErrorCode::PLAY_SERVICE_NOT_AVAILABLE:
|
|
59
|
+
return clazz->getStaticFieldValue(fieldPLAY_SERVICE_NOT_AVAILABLE);
|
|
60
|
+
case RNLocationErrorCode::SETTINGS_NOT_SATISFIED:
|
|
61
|
+
return clazz->getStaticFieldValue(fieldSETTINGS_NOT_SATISFIED);
|
|
62
|
+
case RNLocationErrorCode::INTERNAL_ERROR:
|
|
63
|
+
return clazz->getStaticFieldValue(fieldINTERNAL_ERROR);
|
|
64
|
+
default:
|
|
65
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
66
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNLocationPermissionResult.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNLocationPermissionResult.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNAndroidLocationPermissionResult.hpp"
|
|
14
|
+
#include "JRNIOSPermissionResult.hpp"
|
|
15
|
+
#include "RNAndroidLocationPermissionResult.hpp"
|
|
16
|
+
#include "RNIOSPermissionResult.hpp"
|
|
17
|
+
#include <optional>
|
|
18
|
+
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
20
|
+
|
|
21
|
+
using namespace facebook;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The C++ JNI bridge between the C++ struct "RNLocationPermissionResult" and the the Kotlin data class "RNLocationPermissionResult".
|
|
25
|
+
*/
|
|
26
|
+
struct JRNLocationPermissionResult final: public jni::JavaClass<JRNLocationPermissionResult> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNLocationPermissionResult;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNLocationPermissionResult by copying all values to C++.
|
|
33
|
+
*/
|
|
34
|
+
[[maybe_unused]]
|
|
35
|
+
[[nodiscard]]
|
|
36
|
+
RNLocationPermissionResult toCpp() const {
|
|
37
|
+
static const auto clazz = javaClassStatic();
|
|
38
|
+
static const auto fieldAndroid = clazz->getField<JRNAndroidLocationPermissionResult>("android");
|
|
39
|
+
jni::local_ref<JRNAndroidLocationPermissionResult> android = this->getFieldValue(fieldAndroid);
|
|
40
|
+
static const auto fieldIos = clazz->getField<JRNIOSPermissionResult>("ios");
|
|
41
|
+
jni::local_ref<JRNIOSPermissionResult> ios = this->getFieldValue(fieldIos);
|
|
42
|
+
return RNLocationPermissionResult(
|
|
43
|
+
android != nullptr ? std::make_optional(android->toCpp()) : std::nullopt,
|
|
44
|
+
ios != nullptr ? std::make_optional(ios->toCpp()) : std::nullopt
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
/**
|
|
50
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
51
|
+
*/
|
|
52
|
+
[[maybe_unused]]
|
|
53
|
+
static jni::local_ref<JRNLocationPermissionResult::javaobject> fromCpp(const RNLocationPermissionResult& value) {
|
|
54
|
+
return newInstance(
|
|
55
|
+
value.android.has_value() ? JRNAndroidLocationPermissionResult::fromCpp(value.android.value()) : nullptr,
|
|
56
|
+
value.ios.has_value() ? JRNIOSPermissionResult::fromCpp(value.ios.value()) : nullptr
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::rngooglemapsplus
|