react-native-google-maps-plus 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/GoogleMapsNitro+autolinking.cmake +85 -0
- package/nitrogen/generated/android/GoogleMapsNitro+autolinking.gradle +27 -0
- package/nitrogen/generated/android/GoogleMapsNitroOnLoad.cpp +70 -0
- package/nitrogen/generated/android/GoogleMapsNitroOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLatLng.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNLocationErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNMapErrorCode.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +74 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.cpp +83 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroModuleSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.cpp +485 -0
- package/nitrogen/generated/android/c++/JHybridGoogleMapsNitroViewSpec.hpp +108 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPermissionResult.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNCamera.hpp +67 -0
- package/nitrogen/generated/android/c++/JRNIOSPermissionResult.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNLatLng.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNLineCapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLineJoinType.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNLocation.hpp +58 -0
- package/nitrogen/generated/android/c++/JRNLocationErrorCode.hpp +71 -0
- package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +61 -0
- package/nitrogen/generated/android/c++/JRNMapErrorCode.hpp +74 -0
- package/nitrogen/generated/android/c++/JRNMapPadding.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNMarker.hpp +82 -0
- package/nitrogen/generated/android/c++/JRNPolygon.hpp +94 -0
- package/nitrogen/generated/android/c++/JRNPolyline.hpp +102 -0
- package/nitrogen/generated/android/c++/JRNPosition.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNRegion.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.cpp +132 -0
- package/nitrogen/generated/android/c++/views/JHybridGoogleMapsNitroViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocation.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNLocationErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNMapErrorCode.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_RNRegion_RNCamera_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_bool.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/Func_void_std__string.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/GoogleMapsNitroOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroModuleSpec.kt +64 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/HybridGoogleMapsNitroViewSpec.kt +263 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNAndroidLocationPermissionResult.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNCamera.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNIOSPermissionResult.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLatLng.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineCapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLineJoinType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocation.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationErrorCode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNLocationPermissionResult.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapErrorCode.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMapPadding.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNMarker.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolygon.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPolyline.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNPosition.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNRegion.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/RNUserInterfaceStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/googlemapsnitro/views/HybridGoogleMapsNitroViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/GoogleMapsNitro+autolinking.rb +60 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.cpp +121 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Bridge.hpp +649 -0
- package/nitrogen/generated/ios/GoogleMapsNitro-Swift-Cxx-Umbrella.hpp +104 -0
- package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.mm +41 -0
- package/nitrogen/generated/ios/GoogleMapsNitroAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroModuleSpecSwift.hpp +102 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridGoogleMapsNitroViewSpecSwift.hpp +294 -0
- package/nitrogen/generated/ios/c++/views/HybridGoogleMapsNitroViewComponent.mm +191 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocation.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNLocationPermissionResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNMapErrorCode.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RNRegion_RNCamera_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroModuleSpec_cxx.swift +164 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridGoogleMapsNitroViewSpec_cxx.swift +630 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPermissionResult.swift +44 -0
- package/nitrogen/generated/ios/swift/RNCamera.swift +123 -0
- package/nitrogen/generated/ios/swift/RNIOSPermissionResult.swift +40 -0
- package/nitrogen/generated/ios/swift/RNLatLng.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLineCapType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLineJoinType.swift +44 -0
- package/nitrogen/generated/ios/swift/RNLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/RNLocationErrorCode.swift +56 -0
- package/nitrogen/generated/ios/swift/RNLocationPermissionResult.swift +70 -0
- package/nitrogen/generated/ios/swift/RNMapErrorCode.swift +60 -0
- package/nitrogen/generated/ios/swift/RNMapPadding.swift +68 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +120 -0
- package/nitrogen/generated/ios/swift/RNPolygon.swift +152 -0
- package/nitrogen/generated/ios/swift/RNPolyline.swift +168 -0
- package/nitrogen/generated/ios/swift/RNPosition.swift +46 -0
- package/nitrogen/generated/ios/swift/RNRegion.swift +57 -0
- package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +44 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroModuleSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridGoogleMapsNitroViewSpec.hpp +145 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPermissionResult.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNCamera.hpp +81 -0
- package/nitrogen/generated/shared/c++/RNIOSPermissionResult.hpp +65 -0
- package/nitrogen/generated/shared/c++/RNLatLng.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNLineCapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLineJoinType.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNLocation.hpp +72 -0
- package/nitrogen/generated/shared/c++/RNLocationErrorCode.hpp +73 -0
- package/nitrogen/generated/shared/c++/RNLocationPermissionResult.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNMapErrorCode.hpp +67 -0
- package/nitrogen/generated/shared/c++/RNMapPadding.hpp +79 -0
- package/nitrogen/generated/shared/c++/RNMarker.hpp +97 -0
- package/nitrogen/generated/shared/c++/RNPolygon.hpp +91 -0
- package/nitrogen/generated/shared/c++/RNPolyline.hpp +101 -0
- package/nitrogen/generated/shared/c++/RNPosition.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNRegion.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.cpp +315 -0
- package/nitrogen/generated/shared/c++/views/HybridGoogleMapsNitroViewComponent.hpp +139 -0
- package/nitrogen/generated/shared/json/GoogleMapsNitroViewConfig.json +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridGoogleMapsNitroViewSpec.cpp
|
|
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
|
+
#include "HybridGoogleMapsNitroViewSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
11
|
+
|
|
12
|
+
void HybridGoogleMapsNitroViewSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridGetter("buildingEnabled", &HybridGoogleMapsNitroViewSpec::getBuildingEnabled);
|
|
18
|
+
prototype.registerHybridSetter("buildingEnabled", &HybridGoogleMapsNitroViewSpec::setBuildingEnabled);
|
|
19
|
+
prototype.registerHybridGetter("trafficEnabled", &HybridGoogleMapsNitroViewSpec::getTrafficEnabled);
|
|
20
|
+
prototype.registerHybridSetter("trafficEnabled", &HybridGoogleMapsNitroViewSpec::setTrafficEnabled);
|
|
21
|
+
prototype.registerHybridGetter("customMapStyle", &HybridGoogleMapsNitroViewSpec::getCustomMapStyle);
|
|
22
|
+
prototype.registerHybridSetter("customMapStyle", &HybridGoogleMapsNitroViewSpec::setCustomMapStyle);
|
|
23
|
+
prototype.registerHybridGetter("initialCamera", &HybridGoogleMapsNitroViewSpec::getInitialCamera);
|
|
24
|
+
prototype.registerHybridSetter("initialCamera", &HybridGoogleMapsNitroViewSpec::setInitialCamera);
|
|
25
|
+
prototype.registerHybridGetter("userInterfaceStyle", &HybridGoogleMapsNitroViewSpec::getUserInterfaceStyle);
|
|
26
|
+
prototype.registerHybridSetter("userInterfaceStyle", &HybridGoogleMapsNitroViewSpec::setUserInterfaceStyle);
|
|
27
|
+
prototype.registerHybridGetter("minZoomLevel", &HybridGoogleMapsNitroViewSpec::getMinZoomLevel);
|
|
28
|
+
prototype.registerHybridSetter("minZoomLevel", &HybridGoogleMapsNitroViewSpec::setMinZoomLevel);
|
|
29
|
+
prototype.registerHybridGetter("maxZoomLevel", &HybridGoogleMapsNitroViewSpec::getMaxZoomLevel);
|
|
30
|
+
prototype.registerHybridSetter("maxZoomLevel", &HybridGoogleMapsNitroViewSpec::setMaxZoomLevel);
|
|
31
|
+
prototype.registerHybridGetter("mapPadding", &HybridGoogleMapsNitroViewSpec::getMapPadding);
|
|
32
|
+
prototype.registerHybridSetter("mapPadding", &HybridGoogleMapsNitroViewSpec::setMapPadding);
|
|
33
|
+
prototype.registerHybridGetter("markers", &HybridGoogleMapsNitroViewSpec::getMarkers);
|
|
34
|
+
prototype.registerHybridSetter("markers", &HybridGoogleMapsNitroViewSpec::setMarkers);
|
|
35
|
+
prototype.registerHybridGetter("polygons", &HybridGoogleMapsNitroViewSpec::getPolygons);
|
|
36
|
+
prototype.registerHybridSetter("polygons", &HybridGoogleMapsNitroViewSpec::setPolygons);
|
|
37
|
+
prototype.registerHybridGetter("polylines", &HybridGoogleMapsNitroViewSpec::getPolylines);
|
|
38
|
+
prototype.registerHybridSetter("polylines", &HybridGoogleMapsNitroViewSpec::setPolylines);
|
|
39
|
+
prototype.registerHybridGetter("onMapError", &HybridGoogleMapsNitroViewSpec::getOnMapError);
|
|
40
|
+
prototype.registerHybridSetter("onMapError", &HybridGoogleMapsNitroViewSpec::setOnMapError);
|
|
41
|
+
prototype.registerHybridGetter("onMapReady", &HybridGoogleMapsNitroViewSpec::getOnMapReady);
|
|
42
|
+
prototype.registerHybridSetter("onMapReady", &HybridGoogleMapsNitroViewSpec::setOnMapReady);
|
|
43
|
+
prototype.registerHybridGetter("onLocationUpdate", &HybridGoogleMapsNitroViewSpec::getOnLocationUpdate);
|
|
44
|
+
prototype.registerHybridSetter("onLocationUpdate", &HybridGoogleMapsNitroViewSpec::setOnLocationUpdate);
|
|
45
|
+
prototype.registerHybridGetter("onLocationError", &HybridGoogleMapsNitroViewSpec::getOnLocationError);
|
|
46
|
+
prototype.registerHybridSetter("onLocationError", &HybridGoogleMapsNitroViewSpec::setOnLocationError);
|
|
47
|
+
prototype.registerHybridGetter("onMapPress", &HybridGoogleMapsNitroViewSpec::getOnMapPress);
|
|
48
|
+
prototype.registerHybridSetter("onMapPress", &HybridGoogleMapsNitroViewSpec::setOnMapPress);
|
|
49
|
+
prototype.registerHybridGetter("onMarkerPress", &HybridGoogleMapsNitroViewSpec::getOnMarkerPress);
|
|
50
|
+
prototype.registerHybridSetter("onMarkerPress", &HybridGoogleMapsNitroViewSpec::setOnMarkerPress);
|
|
51
|
+
prototype.registerHybridGetter("onCameraChangeStart", &HybridGoogleMapsNitroViewSpec::getOnCameraChangeStart);
|
|
52
|
+
prototype.registerHybridSetter("onCameraChangeStart", &HybridGoogleMapsNitroViewSpec::setOnCameraChangeStart);
|
|
53
|
+
prototype.registerHybridGetter("onCameraChange", &HybridGoogleMapsNitroViewSpec::getOnCameraChange);
|
|
54
|
+
prototype.registerHybridSetter("onCameraChange", &HybridGoogleMapsNitroViewSpec::setOnCameraChange);
|
|
55
|
+
prototype.registerHybridGetter("onCameraChangeComplete", &HybridGoogleMapsNitroViewSpec::getOnCameraChangeComplete);
|
|
56
|
+
prototype.registerHybridSetter("onCameraChangeComplete", &HybridGoogleMapsNitroViewSpec::setOnCameraChangeComplete);
|
|
57
|
+
prototype.registerHybridMethod("setCamera", &HybridGoogleMapsNitroViewSpec::setCamera);
|
|
58
|
+
prototype.registerHybridMethod("setCameraToCoordinates", &HybridGoogleMapsNitroViewSpec::setCameraToCoordinates);
|
|
59
|
+
prototype.registerHybridMethod("showLocationDialog", &HybridGoogleMapsNitroViewSpec::showLocationDialog);
|
|
60
|
+
prototype.registerHybridMethod("openLocationSettings", &HybridGoogleMapsNitroViewSpec::openLocationSettings);
|
|
61
|
+
prototype.registerHybridMethod("requestLocationPermission", &HybridGoogleMapsNitroViewSpec::requestLocationPermission);
|
|
62
|
+
prototype.registerHybridMethod("isGooglePlayServicesAvailable", &HybridGoogleMapsNitroViewSpec::isGooglePlayServicesAvailable);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridGoogleMapsNitroViewSpec.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 `RNCamera` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::googlemapsnitro { struct RNCamera; }
|
|
18
|
+
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNUserInterfaceStyle; }
|
|
20
|
+
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::googlemapsnitro { struct RNMapPadding; }
|
|
22
|
+
// Forward declaration of `RNMarker` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::googlemapsnitro { struct RNMarker; }
|
|
24
|
+
// Forward declaration of `RNPolygon` to properly resolve imports.
|
|
25
|
+
namespace margelo::nitro::googlemapsnitro { struct RNPolygon; }
|
|
26
|
+
// Forward declaration of `RNPolyline` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::googlemapsnitro { struct RNPolyline; }
|
|
28
|
+
// Forward declaration of `RNMapErrorCode` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNMapErrorCode; }
|
|
30
|
+
// Forward declaration of `RNLocation` to properly resolve imports.
|
|
31
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLocation; }
|
|
32
|
+
// Forward declaration of `RNLocationErrorCode` to properly resolve imports.
|
|
33
|
+
namespace margelo::nitro::googlemapsnitro { enum class RNLocationErrorCode; }
|
|
34
|
+
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLatLng; }
|
|
36
|
+
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::googlemapsnitro { struct RNRegion; }
|
|
38
|
+
// Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
|
|
39
|
+
namespace margelo::nitro::googlemapsnitro { struct RNLocationPermissionResult; }
|
|
40
|
+
|
|
41
|
+
#include <string>
|
|
42
|
+
#include "RNCamera.hpp"
|
|
43
|
+
#include "RNUserInterfaceStyle.hpp"
|
|
44
|
+
#include "RNMapPadding.hpp"
|
|
45
|
+
#include "RNMarker.hpp"
|
|
46
|
+
#include <vector>
|
|
47
|
+
#include "RNPolygon.hpp"
|
|
48
|
+
#include "RNPolyline.hpp"
|
|
49
|
+
#include "RNMapErrorCode.hpp"
|
|
50
|
+
#include <functional>
|
|
51
|
+
#include <optional>
|
|
52
|
+
#include "RNLocation.hpp"
|
|
53
|
+
#include "RNLocationErrorCode.hpp"
|
|
54
|
+
#include "RNLatLng.hpp"
|
|
55
|
+
#include "RNRegion.hpp"
|
|
56
|
+
#include "RNLocationPermissionResult.hpp"
|
|
57
|
+
#include <NitroModules/Promise.hpp>
|
|
58
|
+
|
|
59
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
60
|
+
|
|
61
|
+
using namespace margelo::nitro;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* An abstract base class for `GoogleMapsNitroView`
|
|
65
|
+
* Inherit this class to create instances of `HybridGoogleMapsNitroViewSpec` in C++.
|
|
66
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
67
|
+
* @example
|
|
68
|
+
* ```cpp
|
|
69
|
+
* class HybridGoogleMapsNitroView: public HybridGoogleMapsNitroViewSpec {
|
|
70
|
+
* public:
|
|
71
|
+
* HybridGoogleMapsNitroView(...): HybridObject(TAG) { ... }
|
|
72
|
+
* // ...
|
|
73
|
+
* };
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
class HybridGoogleMapsNitroViewSpec: public virtual HybridObject {
|
|
77
|
+
public:
|
|
78
|
+
// Constructor
|
|
79
|
+
explicit HybridGoogleMapsNitroViewSpec(): HybridObject(TAG) { }
|
|
80
|
+
|
|
81
|
+
// Destructor
|
|
82
|
+
~HybridGoogleMapsNitroViewSpec() override = default;
|
|
83
|
+
|
|
84
|
+
public:
|
|
85
|
+
// Properties
|
|
86
|
+
virtual bool getBuildingEnabled() = 0;
|
|
87
|
+
virtual void setBuildingEnabled(bool buildingEnabled) = 0;
|
|
88
|
+
virtual bool getTrafficEnabled() = 0;
|
|
89
|
+
virtual void setTrafficEnabled(bool trafficEnabled) = 0;
|
|
90
|
+
virtual std::string getCustomMapStyle() = 0;
|
|
91
|
+
virtual void setCustomMapStyle(const std::string& customMapStyle) = 0;
|
|
92
|
+
virtual RNCamera getInitialCamera() = 0;
|
|
93
|
+
virtual void setInitialCamera(const RNCamera& initialCamera) = 0;
|
|
94
|
+
virtual RNUserInterfaceStyle getUserInterfaceStyle() = 0;
|
|
95
|
+
virtual void setUserInterfaceStyle(RNUserInterfaceStyle userInterfaceStyle) = 0;
|
|
96
|
+
virtual double getMinZoomLevel() = 0;
|
|
97
|
+
virtual void setMinZoomLevel(double minZoomLevel) = 0;
|
|
98
|
+
virtual double getMaxZoomLevel() = 0;
|
|
99
|
+
virtual void setMaxZoomLevel(double maxZoomLevel) = 0;
|
|
100
|
+
virtual RNMapPadding getMapPadding() = 0;
|
|
101
|
+
virtual void setMapPadding(const RNMapPadding& mapPadding) = 0;
|
|
102
|
+
virtual std::vector<RNMarker> getMarkers() = 0;
|
|
103
|
+
virtual void setMarkers(const std::vector<RNMarker>& markers) = 0;
|
|
104
|
+
virtual std::vector<RNPolygon> getPolygons() = 0;
|
|
105
|
+
virtual void setPolygons(const std::vector<RNPolygon>& polygons) = 0;
|
|
106
|
+
virtual std::vector<RNPolyline> getPolylines() = 0;
|
|
107
|
+
virtual void setPolylines(const std::vector<RNPolyline>& polylines) = 0;
|
|
108
|
+
virtual std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() = 0;
|
|
109
|
+
virtual void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) = 0;
|
|
110
|
+
virtual std::optional<std::function<void(bool /* ready */)>> getOnMapReady() = 0;
|
|
111
|
+
virtual void setOnMapReady(const std::optional<std::function<void(bool /* ready */)>>& onMapReady) = 0;
|
|
112
|
+
virtual std::optional<std::function<void(const RNLocation& /* location */)>> getOnLocationUpdate() = 0;
|
|
113
|
+
virtual void setOnLocationUpdate(const std::optional<std::function<void(const RNLocation& /* location */)>>& onLocationUpdate) = 0;
|
|
114
|
+
virtual std::optional<std::function<void(RNLocationErrorCode /* error */)>> getOnLocationError() = 0;
|
|
115
|
+
virtual void setOnLocationError(const std::optional<std::function<void(RNLocationErrorCode /* error */)>>& onLocationError) = 0;
|
|
116
|
+
virtual std::optional<std::function<void(const RNLatLng& /* coordinate */)>> getOnMapPress() = 0;
|
|
117
|
+
virtual void setOnMapPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapPress) = 0;
|
|
118
|
+
virtual std::optional<std::function<void(const std::string& /* id */)>> getOnMarkerPress() = 0;
|
|
119
|
+
virtual void setOnMarkerPress(const std::optional<std::function<void(const std::string& /* id */)>>& onMarkerPress) = 0;
|
|
120
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() = 0;
|
|
121
|
+
virtual void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) = 0;
|
|
122
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() = 0;
|
|
123
|
+
virtual void setOnCameraChange(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChange) = 0;
|
|
124
|
+
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeComplete() = 0;
|
|
125
|
+
virtual void setOnCameraChangeComplete(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeComplete) = 0;
|
|
126
|
+
|
|
127
|
+
public:
|
|
128
|
+
// Methods
|
|
129
|
+
virtual void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMS) = 0;
|
|
130
|
+
virtual void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMS) = 0;
|
|
131
|
+
virtual void showLocationDialog() = 0;
|
|
132
|
+
virtual void openLocationSettings() = 0;
|
|
133
|
+
virtual std::shared_ptr<Promise<RNLocationPermissionResult>> requestLocationPermission() = 0;
|
|
134
|
+
virtual bool isGooglePlayServicesAvailable() = 0;
|
|
135
|
+
|
|
136
|
+
protected:
|
|
137
|
+
// Hybrid Setup
|
|
138
|
+
void loadHybridMethods() override;
|
|
139
|
+
|
|
140
|
+
protected:
|
|
141
|
+
// Tag for logging
|
|
142
|
+
static constexpr auto TAG = "GoogleMapsNitroView";
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
@@ -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::googlemapsnitro {
|
|
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::googlemapsnitro
|
|
33
|
+
|
|
34
|
+
namespace margelo::nitro {
|
|
35
|
+
|
|
36
|
+
// C++ RNAndroidLocationPermissionResult <> JS RNAndroidLocationPermissionResult (enum)
|
|
37
|
+
template <>
|
|
38
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult> final {
|
|
39
|
+
static inline margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
40
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
41
|
+
return static_cast<margelo::nitro::googlemapsnitro::RNAndroidLocationPermissionResult>(enumValue);
|
|
42
|
+
}
|
|
43
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::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::googlemapsnitro { struct RNLatLng; }
|
|
23
|
+
|
|
24
|
+
#include "RNLatLng.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
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::googlemapsnitro
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ RNCamera <> JS RNCamera (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNCamera> final {
|
|
51
|
+
static inline margelo::nitro::googlemapsnitro::RNCamera fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::googlemapsnitro::RNCamera(
|
|
54
|
+
JSIConverter<std::optional<margelo::nitro::googlemapsnitro::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::googlemapsnitro::RNCamera& arg) {
|
|
61
|
+
jsi::Object obj(runtime);
|
|
62
|
+
obj.setProperty(runtime, "center", JSIConverter<std::optional<margelo::nitro::googlemapsnitro::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::googlemapsnitro::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,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::googlemapsnitro {
|
|
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::googlemapsnitro
|
|
32
|
+
|
|
33
|
+
namespace margelo::nitro {
|
|
34
|
+
|
|
35
|
+
// C++ RNIOSPermissionResult <> JS RNIOSPermissionResult (enum)
|
|
36
|
+
template <>
|
|
37
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNIOSPermissionResult> final {
|
|
38
|
+
static inline margelo::nitro::googlemapsnitro::RNIOSPermissionResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
39
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
40
|
+
return static_cast<margelo::nitro::googlemapsnitro::RNIOSPermissionResult>(enumValue);
|
|
41
|
+
}
|
|
42
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::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,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::googlemapsnitro {
|
|
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::googlemapsnitro
|
|
41
|
+
|
|
42
|
+
namespace margelo::nitro {
|
|
43
|
+
|
|
44
|
+
// C++ RNLatLng <> JS RNLatLng (object)
|
|
45
|
+
template <>
|
|
46
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLatLng> final {
|
|
47
|
+
static inline margelo::nitro::googlemapsnitro::RNLatLng fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
49
|
+
return margelo::nitro::googlemapsnitro::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::googlemapsnitro::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
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLineCapType.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (RNLineCapType).
|
|
30
|
+
*/
|
|
31
|
+
enum class RNLineCapType {
|
|
32
|
+
BUTT SWIFT_NAME(butt) = 0,
|
|
33
|
+
ROUND SWIFT_NAME(round) = 1,
|
|
34
|
+
SQUARE SWIFT_NAME(square) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ RNLineCapType <> JS RNLineCapType (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLineCapType> final {
|
|
44
|
+
static inline margelo::nitro::googlemapsnitro::RNLineCapType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("butt"): return margelo::nitro::googlemapsnitro::RNLineCapType::BUTT;
|
|
48
|
+
case hashString("round"): return margelo::nitro::googlemapsnitro::RNLineCapType::ROUND;
|
|
49
|
+
case hashString("square"): return margelo::nitro::googlemapsnitro::RNLineCapType::SQUARE;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNLineCapType - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::RNLineCapType arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::googlemapsnitro::RNLineCapType::BUTT: return JSIConverter<std::string>::toJSI(runtime, "butt");
|
|
57
|
+
case margelo::nitro::googlemapsnitro::RNLineCapType::ROUND: return JSIConverter<std::string>::toJSI(runtime, "round");
|
|
58
|
+
case margelo::nitro::googlemapsnitro::RNLineCapType::SQUARE: return JSIConverter<std::string>::toJSI(runtime, "square");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert RNLineCapType to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("butt"):
|
|
71
|
+
case hashString("round"):
|
|
72
|
+
case hashString("square"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLineJoinType.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::googlemapsnitro {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (RNLineJoinType).
|
|
30
|
+
*/
|
|
31
|
+
enum class RNLineJoinType {
|
|
32
|
+
ROUND SWIFT_NAME(round) = 0,
|
|
33
|
+
MITER SWIFT_NAME(miter) = 1,
|
|
34
|
+
BEVEL SWIFT_NAME(bevel) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::googlemapsnitro
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ RNLineJoinType <> JS RNLineJoinType (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::googlemapsnitro::RNLineJoinType> final {
|
|
44
|
+
static inline margelo::nitro::googlemapsnitro::RNLineJoinType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("round"): return margelo::nitro::googlemapsnitro::RNLineJoinType::ROUND;
|
|
48
|
+
case hashString("miter"): return margelo::nitro::googlemapsnitro::RNLineJoinType::MITER;
|
|
49
|
+
case hashString("bevel"): return margelo::nitro::googlemapsnitro::RNLineJoinType::BEVEL;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNLineJoinType - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::googlemapsnitro::RNLineJoinType arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::googlemapsnitro::RNLineJoinType::ROUND: return JSIConverter<std::string>::toJSI(runtime, "round");
|
|
57
|
+
case margelo::nitro::googlemapsnitro::RNLineJoinType::MITER: return JSIConverter<std::string>::toJSI(runtime, "miter");
|
|
58
|
+
case margelo::nitro::googlemapsnitro::RNLineJoinType::BEVEL: return JSIConverter<std::string>::toJSI(runtime, "bevel");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert RNLineJoinType to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("round"):
|
|
71
|
+
case hashString("miter"):
|
|
72
|
+
case hashString("bevel"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|