@maydon_tech/react-native-nitro-maps 0.1.0
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/NitroMap.podspec +42 -0
- package/README.md +172 -0
- package/android/CMakeLists.txt +27 -0
- package/android/build.gradle +141 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +108 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +63 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +408 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +68 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +176 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/NitroMapPackage.kt +33 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +195 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +912 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +70 -0
- package/cpp/ClusterEngine.hpp +411 -0
- package/cpp/KDBush.hpp +238 -0
- package/cpp/QuadTree.hpp +246 -0
- package/ios/Clustering/ClusterEngineWrapper.h +58 -0
- package/ios/Clustering/ClusterEngineWrapper.mm +142 -0
- package/ios/Clustering/ClusterIconRenderer.swift +80 -0
- package/ios/Clustering/NitroClusterEngine.swift +117 -0
- package/ios/Clustering/NitroClusterIconGenerator.swift +35 -0
- package/ios/MarkerRenderer/MarkerIconFactory.swift +322 -0
- package/ios/MarkerRenderer/PriceMarkerRenderer.swift +140 -0
- package/ios/NitroMap.swift +332 -0
- package/ios/NitroMapConfig/HybridNitroMapConfig.swift +33 -0
- package/ios/Providers/GoogleMapDelegate.swift +310 -0
- package/ios/Providers/GoogleMapProvider+Camera.swift +164 -0
- package/ios/Providers/GoogleMapProvider.swift +924 -0
- package/ios/Providers/MapProviderProtocol.swift +78 -0
- package/ios/Shared/ClusterConfig+Factory.swift +58 -0
- package/ios/Shared/ClusteringManager.swift +211 -0
- package/ios/Shared/MapStyleProvider.swift +135 -0
- package/ios/Shared/MarkerSelectionHandler.swift +116 -0
- package/ios/Utils/ColorValueExtension.swift +54 -0
- package/lib/module/components/ImageMarker.js +146 -0
- package/lib/module/components/ImageMarker.js.map +1 -0
- package/lib/module/components/NitroMap.js +320 -0
- package/lib/module/components/NitroMap.js.map +1 -0
- package/lib/module/components/PriceMarker.js +165 -0
- package/lib/module/components/PriceMarker.js.map +1 -0
- package/lib/module/context/NitroMapContext.js +15 -0
- package/lib/module/context/NitroMapContext.js.map +1 -0
- package/lib/module/hooks/useNitroMarker.js +104 -0
- package/lib/module/hooks/useNitroMarker.js.map +1 -0
- package/lib/module/index.js +21 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/index.js +4 -0
- package/lib/module/modules/index.js.map +1 -0
- package/lib/module/modules/module.js +30 -0
- package/lib/module/modules/module.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/NitroMap.nitro.js +4 -0
- package/lib/module/specs/NitroMap.nitro.js.map +1 -0
- package/lib/module/specs/NitroMapConfig.nitro.js +4 -0
- package/lib/module/specs/NitroMapConfig.nitro.js.map +1 -0
- package/lib/module/types/map.js +2 -0
- package/lib/module/types/map.js.map +1 -0
- package/lib/module/types/marker.js +4 -0
- package/lib/module/types/marker.js.map +1 -0
- package/lib/module/utils/colors.js +147 -0
- package/lib/module/utils/colors.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/ImageMarker.d.ts +70 -0
- package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroMap.d.ts +14 -0
- package/lib/typescript/src/components/NitroMap.d.ts.map +1 -0
- package/lib/typescript/src/components/PriceMarker.d.ts +88 -0
- package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts +16 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts +78 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/index.d.ts +2 -0
- package/lib/typescript/src/modules/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/module.d.ts +22 -0
- package/lib/typescript/src/modules/module.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts +227 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts +10 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts.map +1 -0
- package/lib/typescript/src/types/map.d.ts +154 -0
- package/lib/typescript/src/types/map.d.ts.map +1 -0
- package/lib/typescript/src/types/marker.d.ts +248 -0
- package/lib/typescript/src/types/marker.d.ts.map +1 -0
- package/lib/typescript/src/utils/colors.d.ts +82 -0
- package/lib/typescript/src/utils/colors.d.ts.map +1 -0
- package/nitro.json +21 -0
- package/nitrogen/generated/android/c++/JCamera.hpp +74 -0
- package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +68 -0
- package/nitrogen/generated/android/c++/JClusterConfig.hpp +121 -0
- package/nitrogen/generated/android/c++/JClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/android/c++/JClusterStrategy.hpp +59 -0
- package/nitrogen/generated/android/c++/JColorValue.cpp +26 -0
- package/nitrogen/generated/android/c++/JColorValue.hpp +70 -0
- package/nitrogen/generated/android/c++/JCoordinate.hpp +61 -0
- package/nitrogen/generated/android/c++/JEdgePadding.hpp +69 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_ClusterPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapError.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerDragEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerPressEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_RegionChangeEvent.hpp +79 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.cpp +59 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +593 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +125 -0
- package/nitrogen/generated/android/c++/JImageMarkerConfig.hpp +86 -0
- package/nitrogen/generated/android/c++/JMapBoundaries.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapError.hpp +61 -0
- package/nitrogen/generated/android/c++/JMapPressEvent.hpp +64 -0
- package/nitrogen/generated/android/c++/JMapProvider.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapStyleElement.hpp +87 -0
- package/nitrogen/generated/android/c++/JMapStyler.hpp +78 -0
- package/nitrogen/generated/android/c++/JMapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerColor.hpp +69 -0
- package/nitrogen/generated/android/c++/JMarkerConfig.hpp +77 -0
- package/nitrogen/generated/android/c++/JMarkerData.hpp +121 -0
- package/nitrogen/generated/android/c++/JMarkerDragEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerPressEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/JPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/JPriceMarkerStyle.hpp +102 -0
- package/nitrogen/generated/android/c++/JRegion.hpp +69 -0
- package/nitrogen/generated/android/c++/JRegionChangeEvent.hpp +62 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.hpp +70 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +144 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Camera.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterAnimationStyle.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterPressEvent.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterStrategy.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ColorValue.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Coordinate.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/EdgePadding.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_ClusterPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapError.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerDragEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_RegionChangeEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapConfigSpec.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +342 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ImageMarkerConfig.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapBoundaries.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapError.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapProvider.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyleElement.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyler.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerColor.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerConfig.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerDragEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Point.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PriceMarkerStyle.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Region.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/RegionChangeEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Variant_String_MarkerColor.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/nitromapOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapStateUpdater.kt +23 -0
- package/nitrogen/generated/android/nitromap+autolinking.cmake +87 -0
- package/nitrogen/generated/android/nitromap+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitromapOnLoad.cpp +70 -0
- package/nitrogen/generated/android/nitromapOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/NitroMap+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +130 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +793 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +132 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.mm +41 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.hpp +84 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +410 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +206 -0
- package/nitrogen/generated/ios/swift/Camera.swift +80 -0
- package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +52 -0
- package/nitrogen/generated/ios/swift/ClusterConfig.swift +268 -0
- package/nitrogen/generated/ios/swift/ClusterPressEvent.swift +70 -0
- package/nitrogen/generated/ios/swift/ClusterStrategy.swift +40 -0
- package/nitrogen/generated/ios/swift/ColorValue.swift +18 -0
- package/nitrogen/generated/ios/swift/Coordinate.swift +47 -0
- package/nitrogen/generated/ios/swift/EdgePadding.swift +69 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_Camera.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_ClusterPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec_cxx.swift +142 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +93 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +953 -0
- package/nitrogen/generated/ios/swift/ImageMarkerConfig.swift +166 -0
- package/nitrogen/generated/ios/swift/MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MapProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/MapStyleElement.swift +108 -0
- package/nitrogen/generated/ios/swift/MapStyler.swift +177 -0
- package/nitrogen/generated/ios/swift/MapType.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerAnimation.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerColor.swift +69 -0
- package/nitrogen/generated/ios/swift/MarkerConfig.swift +82 -0
- package/nitrogen/generated/ios/swift/MarkerData.swift +195 -0
- package/nitrogen/generated/ios/swift/MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerStyle.swift +44 -0
- package/nitrogen/generated/ios/swift/Point.swift +47 -0
- package/nitrogen/generated/ios/swift/PriceMarkerStyle.swift +374 -0
- package/nitrogen/generated/ios/swift/Region.swift +69 -0
- package/nitrogen/generated/ios/swift/RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Variant_String_MarkerColor.swift +18 -0
- package/nitrogen/generated/shared/c++/Camera.hpp +92 -0
- package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +88 -0
- package/nitrogen/generated/shared/c++/ClusterConfig.hpp +140 -0
- package/nitrogen/generated/shared/c++/ClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/shared/c++/ClusterStrategy.hpp +76 -0
- package/nitrogen/generated/shared/c++/Coordinate.hpp +79 -0
- package/nitrogen/generated/shared/c++/EdgePadding.hpp +87 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +173 -0
- package/nitrogen/generated/shared/c++/ImageMarkerConfig.hpp +103 -0
- package/nitrogen/generated/shared/c++/MapBoundaries.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapError.hpp +79 -0
- package/nitrogen/generated/shared/c++/MapPressEvent.hpp +83 -0
- package/nitrogen/generated/shared/c++/MapProvider.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapStyleElement.hpp +87 -0
- package/nitrogen/generated/shared/c++/MapStyler.hpp +96 -0
- package/nitrogen/generated/shared/c++/MapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerColor.hpp +87 -0
- package/nitrogen/generated/shared/c++/MarkerConfig.hpp +91 -0
- package/nitrogen/generated/shared/c++/MarkerData.hpp +131 -0
- package/nitrogen/generated/shared/c++/MarkerDragEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerPressEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/Point.hpp +79 -0
- package/nitrogen/generated/shared/c++/PriceMarkerStyle.hpp +119 -0
- package/nitrogen/generated/shared/c++/Region.hpp +87 -0
- package/nitrogen/generated/shared/c++/RegionChangeEvent.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +351 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +141 -0
- package/nitrogen/generated/shared/json/NitroMapConfig.json +32 -0
- package/package.json +176 -0
- package/react-native.config.js +16 -0
- package/src/components/ImageMarker.tsx +254 -0
- package/src/components/NitroMap.tsx +433 -0
- package/src/components/PriceMarker.tsx +311 -0
- package/src/context/NitroMapContext.tsx +33 -0
- package/src/hooks/useNitroMarker.ts +198 -0
- package/src/index.tsx +62 -0
- package/src/modules/index.ts +6 -0
- package/src/modules/module.ts +45 -0
- package/src/specs/NitroMap.nitro.ts +292 -0
- package/src/specs/NitroMapConfig.nitro.ts +8 -0
- package/src/types/map.ts +166 -0
- package/src/types/marker.ts +267 -0
- package/src/utils/colors.ts +159 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JPriceMarkerStyle.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "PriceMarkerStyle.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JMarkerColor.hpp"
|
|
14
|
+
#include "JVariant_String_MarkerColor.hpp"
|
|
15
|
+
#include "MarkerColor.hpp"
|
|
16
|
+
#include <optional>
|
|
17
|
+
#include <string>
|
|
18
|
+
#include <variant>
|
|
19
|
+
|
|
20
|
+
namespace margelo::nitro::nitromap {
|
|
21
|
+
|
|
22
|
+
using namespace facebook;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The C++ JNI bridge between the C++ struct "PriceMarkerStyle" and the the Kotlin data class "PriceMarkerStyle".
|
|
26
|
+
*/
|
|
27
|
+
struct JPriceMarkerStyle final: public jni::JavaClass<JPriceMarkerStyle> {
|
|
28
|
+
public:
|
|
29
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/PriceMarkerStyle;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
/**
|
|
33
|
+
* Convert this Java/Kotlin-based struct to the C++ struct PriceMarkerStyle by copying all values to C++.
|
|
34
|
+
*/
|
|
35
|
+
[[maybe_unused]]
|
|
36
|
+
[[nodiscard]]
|
|
37
|
+
PriceMarkerStyle toCpp() const {
|
|
38
|
+
static const auto clazz = javaClassStatic();
|
|
39
|
+
static const auto fieldPrice = clazz->getField<jni::JString>("price");
|
|
40
|
+
jni::local_ref<jni::JString> price = this->getFieldValue(fieldPrice);
|
|
41
|
+
static const auto fieldCurrency = clazz->getField<jni::JString>("currency");
|
|
42
|
+
jni::local_ref<jni::JString> currency = this->getFieldValue(fieldCurrency);
|
|
43
|
+
static const auto fieldSelected = clazz->getField<jboolean>("selected");
|
|
44
|
+
jboolean selected = this->getFieldValue(fieldSelected);
|
|
45
|
+
static const auto fieldBackgroundColor = clazz->getField<JVariant_String_MarkerColor>("backgroundColor");
|
|
46
|
+
jni::local_ref<JVariant_String_MarkerColor> backgroundColor = this->getFieldValue(fieldBackgroundColor);
|
|
47
|
+
static const auto fieldSelectedBackgroundColor = clazz->getField<JVariant_String_MarkerColor>("selectedBackgroundColor");
|
|
48
|
+
jni::local_ref<JVariant_String_MarkerColor> selectedBackgroundColor = this->getFieldValue(fieldSelectedBackgroundColor);
|
|
49
|
+
static const auto fieldTextColor = clazz->getField<JVariant_String_MarkerColor>("textColor");
|
|
50
|
+
jni::local_ref<JVariant_String_MarkerColor> textColor = this->getFieldValue(fieldTextColor);
|
|
51
|
+
static const auto fieldSelectedTextColor = clazz->getField<JVariant_String_MarkerColor>("selectedTextColor");
|
|
52
|
+
jni::local_ref<JVariant_String_MarkerColor> selectedTextColor = this->getFieldValue(fieldSelectedTextColor);
|
|
53
|
+
static const auto fieldFontSize = clazz->getField<jni::JDouble>("fontSize");
|
|
54
|
+
jni::local_ref<jni::JDouble> fontSize = this->getFieldValue(fieldFontSize);
|
|
55
|
+
static const auto fieldPaddingHorizontal = clazz->getField<jni::JDouble>("paddingHorizontal");
|
|
56
|
+
jni::local_ref<jni::JDouble> paddingHorizontal = this->getFieldValue(fieldPaddingHorizontal);
|
|
57
|
+
static const auto fieldPaddingVertical = clazz->getField<jni::JDouble>("paddingVertical");
|
|
58
|
+
jni::local_ref<jni::JDouble> paddingVertical = this->getFieldValue(fieldPaddingVertical);
|
|
59
|
+
static const auto fieldShadowOpacity = clazz->getField<jni::JDouble>("shadowOpacity");
|
|
60
|
+
jni::local_ref<jni::JDouble> shadowOpacity = this->getFieldValue(fieldShadowOpacity);
|
|
61
|
+
return PriceMarkerStyle(
|
|
62
|
+
price->toStdString(),
|
|
63
|
+
currency->toStdString(),
|
|
64
|
+
static_cast<bool>(selected),
|
|
65
|
+
backgroundColor != nullptr ? std::make_optional(backgroundColor->toCpp()) : std::nullopt,
|
|
66
|
+
selectedBackgroundColor != nullptr ? std::make_optional(selectedBackgroundColor->toCpp()) : std::nullopt,
|
|
67
|
+
textColor != nullptr ? std::make_optional(textColor->toCpp()) : std::nullopt,
|
|
68
|
+
selectedTextColor != nullptr ? std::make_optional(selectedTextColor->toCpp()) : std::nullopt,
|
|
69
|
+
fontSize != nullptr ? std::make_optional(fontSize->value()) : std::nullopt,
|
|
70
|
+
paddingHorizontal != nullptr ? std::make_optional(paddingHorizontal->value()) : std::nullopt,
|
|
71
|
+
paddingVertical != nullptr ? std::make_optional(paddingVertical->value()) : std::nullopt,
|
|
72
|
+
shadowOpacity != nullptr ? std::make_optional(shadowOpacity->value()) : std::nullopt
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public:
|
|
77
|
+
/**
|
|
78
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
79
|
+
*/
|
|
80
|
+
[[maybe_unused]]
|
|
81
|
+
static jni::local_ref<JPriceMarkerStyle::javaobject> fromCpp(const PriceMarkerStyle& value) {
|
|
82
|
+
using JSignature = JPriceMarkerStyle(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jboolean, jni::alias_ref<JVariant_String_MarkerColor>, jni::alias_ref<JVariant_String_MarkerColor>, jni::alias_ref<JVariant_String_MarkerColor>, jni::alias_ref<JVariant_String_MarkerColor>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JDouble>);
|
|
83
|
+
static const auto clazz = javaClassStatic();
|
|
84
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
85
|
+
return create(
|
|
86
|
+
clazz,
|
|
87
|
+
jni::make_jstring(value.price),
|
|
88
|
+
jni::make_jstring(value.currency),
|
|
89
|
+
value.selected,
|
|
90
|
+
value.backgroundColor.has_value() ? JVariant_String_MarkerColor::fromCpp(value.backgroundColor.value()) : nullptr,
|
|
91
|
+
value.selectedBackgroundColor.has_value() ? JVariant_String_MarkerColor::fromCpp(value.selectedBackgroundColor.value()) : nullptr,
|
|
92
|
+
value.textColor.has_value() ? JVariant_String_MarkerColor::fromCpp(value.textColor.value()) : nullptr,
|
|
93
|
+
value.selectedTextColor.has_value() ? JVariant_String_MarkerColor::fromCpp(value.selectedTextColor.value()) : nullptr,
|
|
94
|
+
value.fontSize.has_value() ? jni::JDouble::valueOf(value.fontSize.value()) : nullptr,
|
|
95
|
+
value.paddingHorizontal.has_value() ? jni::JDouble::valueOf(value.paddingHorizontal.value()) : nullptr,
|
|
96
|
+
value.paddingVertical.has_value() ? jni::JDouble::valueOf(value.paddingVertical.value()) : nullptr,
|
|
97
|
+
value.shadowOpacity.has_value() ? jni::JDouble::valueOf(value.shadowOpacity.value()) : nullptr
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRegion.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "Region.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::nitromap {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "Region" and the the Kotlin data class "Region".
|
|
21
|
+
*/
|
|
22
|
+
struct JRegion final: public jni::JavaClass<JRegion> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/Region;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct Region by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
Region 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
|
+
static const auto fieldLatitudeDelta = clazz->getField<double>("latitudeDelta");
|
|
39
|
+
double latitudeDelta = this->getFieldValue(fieldLatitudeDelta);
|
|
40
|
+
static const auto fieldLongitudeDelta = clazz->getField<double>("longitudeDelta");
|
|
41
|
+
double longitudeDelta = this->getFieldValue(fieldLongitudeDelta);
|
|
42
|
+
return Region(
|
|
43
|
+
latitude,
|
|
44
|
+
longitude,
|
|
45
|
+
latitudeDelta,
|
|
46
|
+
longitudeDelta
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
53
|
+
*/
|
|
54
|
+
[[maybe_unused]]
|
|
55
|
+
static jni::local_ref<JRegion::javaobject> fromCpp(const Region& value) {
|
|
56
|
+
using JSignature = JRegion(double, double, double, double);
|
|
57
|
+
static const auto clazz = javaClassStatic();
|
|
58
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
59
|
+
return create(
|
|
60
|
+
clazz,
|
|
61
|
+
value.latitude,
|
|
62
|
+
value.longitude,
|
|
63
|
+
value.latitudeDelta,
|
|
64
|
+
value.longitudeDelta
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRegionChangeEvent.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RegionChangeEvent.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRegion.hpp"
|
|
14
|
+
#include "Region.hpp"
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::nitromap {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The C++ JNI bridge between the C++ struct "RegionChangeEvent" and the the Kotlin data class "RegionChangeEvent".
|
|
22
|
+
*/
|
|
23
|
+
struct JRegionChangeEvent final: public jni::JavaClass<JRegionChangeEvent> {
|
|
24
|
+
public:
|
|
25
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/RegionChangeEvent;";
|
|
26
|
+
|
|
27
|
+
public:
|
|
28
|
+
/**
|
|
29
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RegionChangeEvent by copying all values to C++.
|
|
30
|
+
*/
|
|
31
|
+
[[maybe_unused]]
|
|
32
|
+
[[nodiscard]]
|
|
33
|
+
RegionChangeEvent toCpp() const {
|
|
34
|
+
static const auto clazz = javaClassStatic();
|
|
35
|
+
static const auto fieldRegion = clazz->getField<JRegion>("region");
|
|
36
|
+
jni::local_ref<JRegion> region = this->getFieldValue(fieldRegion);
|
|
37
|
+
static const auto fieldIsGesture = clazz->getField<jboolean>("isGesture");
|
|
38
|
+
jboolean isGesture = this->getFieldValue(fieldIsGesture);
|
|
39
|
+
return RegionChangeEvent(
|
|
40
|
+
region->toCpp(),
|
|
41
|
+
static_cast<bool>(isGesture)
|
|
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<JRegionChangeEvent::javaobject> fromCpp(const RegionChangeEvent& value) {
|
|
51
|
+
using JSignature = JRegionChangeEvent(jni::alias_ref<JRegion>, jboolean);
|
|
52
|
+
static const auto clazz = javaClassStatic();
|
|
53
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
54
|
+
return create(
|
|
55
|
+
clazz,
|
|
56
|
+
JRegion::fromCpp(value.region),
|
|
57
|
+
value.isGesture
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_String_MarkerColor.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JVariant_String_MarkerColor.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::nitromap {
|
|
11
|
+
/**
|
|
12
|
+
* Converts JVariant_String_MarkerColor to std::variant<std::string, MarkerColor>
|
|
13
|
+
*/
|
|
14
|
+
std::variant<std::string, MarkerColor> JVariant_String_MarkerColor::toCpp() const {
|
|
15
|
+
if (isInstanceOf(JVariant_String_MarkerColor_impl::First::javaClassStatic())) {
|
|
16
|
+
// It's a `std::string`
|
|
17
|
+
auto jniValue = static_cast<const JVariant_String_MarkerColor_impl::First*>(this)->getValue();
|
|
18
|
+
return jniValue->toStdString();
|
|
19
|
+
} else if (isInstanceOf(JVariant_String_MarkerColor_impl::Second::javaClassStatic())) {
|
|
20
|
+
// It's a `MarkerColor`
|
|
21
|
+
auto jniValue = static_cast<const JVariant_String_MarkerColor_impl::Second*>(this)->getValue();
|
|
22
|
+
return jniValue->toCpp();
|
|
23
|
+
}
|
|
24
|
+
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
25
|
+
}
|
|
26
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_String_MarkerColor.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <variant>
|
|
12
|
+
|
|
13
|
+
#include <string>
|
|
14
|
+
#include "MarkerColor.hpp"
|
|
15
|
+
#include <variant>
|
|
16
|
+
#include "JMarkerColor.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::nitromap {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_String_MarkerColor".
|
|
24
|
+
*/
|
|
25
|
+
class JVariant_String_MarkerColor: public jni::JavaClass<JVariant_String_MarkerColor> {
|
|
26
|
+
public:
|
|
27
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/Variant_String_MarkerColor;";
|
|
28
|
+
|
|
29
|
+
static jni::local_ref<JVariant_String_MarkerColor> create_0(jni::alias_ref<jni::JString> value) {
|
|
30
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_String_MarkerColor(jni::alias_ref<jni::JString>)>("create");
|
|
31
|
+
return method(javaClassStatic(), value);
|
|
32
|
+
}
|
|
33
|
+
static jni::local_ref<JVariant_String_MarkerColor> create_1(jni::alias_ref<JMarkerColor> value) {
|
|
34
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_String_MarkerColor(jni::alias_ref<JMarkerColor>)>("create");
|
|
35
|
+
return method(javaClassStatic(), value);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static jni::local_ref<JVariant_String_MarkerColor> fromCpp(const std::variant<std::string, MarkerColor>& variant) {
|
|
39
|
+
switch (variant.index()) {
|
|
40
|
+
case 0: return create_0(jni::make_jstring(std::get<0>(variant)));
|
|
41
|
+
case 1: return create_1(JMarkerColor::fromCpp(std::get<1>(variant)));
|
|
42
|
+
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[[nodiscard]] std::variant<std::string, MarkerColor> toCpp() const;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
namespace JVariant_String_MarkerColor_impl {
|
|
50
|
+
class First: public jni::JavaClass<First, JVariant_String_MarkerColor> {
|
|
51
|
+
public:
|
|
52
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/Variant_String_MarkerColor$First;";
|
|
53
|
+
|
|
54
|
+
[[nodiscard]] jni::local_ref<jni::JString> getValue() const {
|
|
55
|
+
static const auto field = javaClassStatic()->getField<jni::JString>("value");
|
|
56
|
+
return getFieldValue(field);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
class Second: public jni::JavaClass<Second, JVariant_String_MarkerColor> {
|
|
61
|
+
public:
|
|
62
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/Variant_String_MarkerColor$Second;";
|
|
63
|
+
|
|
64
|
+
[[nodiscard]] jni::local_ref<JMarkerColor> getValue() const {
|
|
65
|
+
static const auto field = javaClassStatic()->getField<JMarkerColor>("value");
|
|
66
|
+
return getFieldValue(field);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
} // namespace JVariant_String_MarkerColor_impl
|
|
70
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridNitroMapStateUpdater.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JHybridNitroMapStateUpdater.hpp"
|
|
9
|
+
#include "views/HybridNitroMapComponent.hpp"
|
|
10
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
11
|
+
|
|
12
|
+
namespace margelo::nitro::nitromap::views {
|
|
13
|
+
|
|
14
|
+
using namespace facebook;
|
|
15
|
+
using ConcreteStateData = react::ConcreteState<HybridNitroMapState>;
|
|
16
|
+
|
|
17
|
+
void JHybridNitroMapStateUpdater::updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
18
|
+
jni::alias_ref<JHybridNitroMapSpec::javaobject> javaView,
|
|
19
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface) {
|
|
20
|
+
JHybridNitroMapSpec* view = javaView->cthis();
|
|
21
|
+
|
|
22
|
+
// Get concrete StateWrapperImpl from passed StateWrapper interface object
|
|
23
|
+
jobject rawStateWrapper = stateWrapperInterface.get();
|
|
24
|
+
if (!stateWrapperInterface->isInstanceOf(react::StateWrapperImpl::javaClassStatic())) {
|
|
25
|
+
throw std::runtime_error("StateWrapper is not a StateWrapperImpl");
|
|
26
|
+
}
|
|
27
|
+
auto stateWrapper = jni::alias_ref<react::StateWrapperImpl::javaobject>{
|
|
28
|
+
static_cast<react::StateWrapperImpl::javaobject>(rawStateWrapper)};
|
|
29
|
+
|
|
30
|
+
std::shared_ptr<const react::State> state = stateWrapper->cthis()->getState();
|
|
31
|
+
auto concreteState = std::dynamic_pointer_cast<const ConcreteStateData>(state);
|
|
32
|
+
const HybridNitroMapState& data = concreteState->getData();
|
|
33
|
+
const std::optional<HybridNitroMapProps>& maybeProps = data.getProps();
|
|
34
|
+
if (!maybeProps.has_value()) {
|
|
35
|
+
// Props aren't set yet!
|
|
36
|
+
throw std::runtime_error("HybridNitroMapState's data doesn't contain any props!");
|
|
37
|
+
}
|
|
38
|
+
const HybridNitroMapProps& props = maybeProps.value();
|
|
39
|
+
if (props.provider.isDirty) {
|
|
40
|
+
view->setProvider(props.provider.value);
|
|
41
|
+
// TODO: Set isDirty = false
|
|
42
|
+
}
|
|
43
|
+
if (props.initialRegion.isDirty) {
|
|
44
|
+
view->setInitialRegion(props.initialRegion.value);
|
|
45
|
+
// TODO: Set isDirty = false
|
|
46
|
+
}
|
|
47
|
+
if (props.showsUserLocation.isDirty) {
|
|
48
|
+
view->setShowsUserLocation(props.showsUserLocation.value);
|
|
49
|
+
// TODO: Set isDirty = false
|
|
50
|
+
}
|
|
51
|
+
if (props.zoomEnabled.isDirty) {
|
|
52
|
+
view->setZoomEnabled(props.zoomEnabled.value);
|
|
53
|
+
// TODO: Set isDirty = false
|
|
54
|
+
}
|
|
55
|
+
if (props.scrollEnabled.isDirty) {
|
|
56
|
+
view->setScrollEnabled(props.scrollEnabled.value);
|
|
57
|
+
// TODO: Set isDirty = false
|
|
58
|
+
}
|
|
59
|
+
if (props.rotateEnabled.isDirty) {
|
|
60
|
+
view->setRotateEnabled(props.rotateEnabled.value);
|
|
61
|
+
// TODO: Set isDirty = false
|
|
62
|
+
}
|
|
63
|
+
if (props.pitchEnabled.isDirty) {
|
|
64
|
+
view->setPitchEnabled(props.pitchEnabled.value);
|
|
65
|
+
// TODO: Set isDirty = false
|
|
66
|
+
}
|
|
67
|
+
if (props.mapType.isDirty) {
|
|
68
|
+
view->setMapType(props.mapType.value);
|
|
69
|
+
// TODO: Set isDirty = false
|
|
70
|
+
}
|
|
71
|
+
if (props.customMapStyle.isDirty) {
|
|
72
|
+
view->setCustomMapStyle(props.customMapStyle.value);
|
|
73
|
+
// TODO: Set isDirty = false
|
|
74
|
+
}
|
|
75
|
+
if (props.showsMyLocationButton.isDirty) {
|
|
76
|
+
view->setShowsMyLocationButton(props.showsMyLocationButton.value);
|
|
77
|
+
// TODO: Set isDirty = false
|
|
78
|
+
}
|
|
79
|
+
if (props.clusterConfig.isDirty) {
|
|
80
|
+
view->setClusterConfig(props.clusterConfig.value);
|
|
81
|
+
// TODO: Set isDirty = false
|
|
82
|
+
}
|
|
83
|
+
if (props.darkMode.isDirty) {
|
|
84
|
+
view->setDarkMode(props.darkMode.value);
|
|
85
|
+
// TODO: Set isDirty = false
|
|
86
|
+
}
|
|
87
|
+
if (props.onPress.isDirty) {
|
|
88
|
+
view->setOnPress(props.onPress.value);
|
|
89
|
+
// TODO: Set isDirty = false
|
|
90
|
+
}
|
|
91
|
+
if (props.onLongPress.isDirty) {
|
|
92
|
+
view->setOnLongPress(props.onLongPress.value);
|
|
93
|
+
// TODO: Set isDirty = false
|
|
94
|
+
}
|
|
95
|
+
if (props.onMapReady.isDirty) {
|
|
96
|
+
view->setOnMapReady(props.onMapReady.value);
|
|
97
|
+
// TODO: Set isDirty = false
|
|
98
|
+
}
|
|
99
|
+
if (props.onRegionChange.isDirty) {
|
|
100
|
+
view->setOnRegionChange(props.onRegionChange.value);
|
|
101
|
+
// TODO: Set isDirty = false
|
|
102
|
+
}
|
|
103
|
+
if (props.onRegionChangeComplete.isDirty) {
|
|
104
|
+
view->setOnRegionChangeComplete(props.onRegionChangeComplete.value);
|
|
105
|
+
// TODO: Set isDirty = false
|
|
106
|
+
}
|
|
107
|
+
if (props.onMarkerPress.isDirty) {
|
|
108
|
+
view->setOnMarkerPress(props.onMarkerPress.value);
|
|
109
|
+
// TODO: Set isDirty = false
|
|
110
|
+
}
|
|
111
|
+
if (props.onMarkerDragStart.isDirty) {
|
|
112
|
+
view->setOnMarkerDragStart(props.onMarkerDragStart.value);
|
|
113
|
+
// TODO: Set isDirty = false
|
|
114
|
+
}
|
|
115
|
+
if (props.onMarkerDrag.isDirty) {
|
|
116
|
+
view->setOnMarkerDrag(props.onMarkerDrag.value);
|
|
117
|
+
// TODO: Set isDirty = false
|
|
118
|
+
}
|
|
119
|
+
if (props.onMarkerDragEnd.isDirty) {
|
|
120
|
+
view->setOnMarkerDragEnd(props.onMarkerDragEnd.value);
|
|
121
|
+
// TODO: Set isDirty = false
|
|
122
|
+
}
|
|
123
|
+
if (props.onClusterPress.isDirty) {
|
|
124
|
+
view->setOnClusterPress(props.onClusterPress.value);
|
|
125
|
+
// TODO: Set isDirty = false
|
|
126
|
+
}
|
|
127
|
+
if (props.onError.isDirty) {
|
|
128
|
+
view->setOnError(props.onError.value);
|
|
129
|
+
// TODO: Set isDirty = false
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Update hybridRef if it changed
|
|
133
|
+
if (props.hybridRef.isDirty) {
|
|
134
|
+
// hybridRef changed - call it with new this
|
|
135
|
+
const auto& maybeFunc = props.hybridRef.value;
|
|
136
|
+
if (maybeFunc.has_value()) {
|
|
137
|
+
std::shared_ptr<JHybridNitroMapSpec> shared = javaView->cthis()->shared_cast<JHybridNitroMapSpec>();
|
|
138
|
+
maybeFunc.value()(shared);
|
|
139
|
+
}
|
|
140
|
+
// TODO: Set isDirty = false
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
} // namespace margelo::nitro::nitromap::views
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHybridNitroMapStateUpdater.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#ifndef RN_SERIALIZABLE_STATE
|
|
11
|
+
#error nitromap was compiled without the 'RN_SERIALIZABLE_STATE' flag. This flag is required for Nitro Views - set it in your CMakeLists!
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#include <fbjni/fbjni.h>
|
|
15
|
+
#include <react/fabric/StateWrapperImpl.h>
|
|
16
|
+
#include <react/fabric/CoreComponentsRegistry.h>
|
|
17
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
18
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
19
|
+
#include <NitroModules/JStateWrapper.hpp>
|
|
20
|
+
#include "JHybridNitroMapSpec.hpp"
|
|
21
|
+
#include "views/HybridNitroMapComponent.hpp"
|
|
22
|
+
|
|
23
|
+
namespace margelo::nitro::nitromap::views {
|
|
24
|
+
|
|
25
|
+
using namespace facebook;
|
|
26
|
+
|
|
27
|
+
class JHybridNitroMapStateUpdater: public jni::JavaClass<JHybridNitroMapStateUpdater> {
|
|
28
|
+
public:
|
|
29
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitromap/views/HybridNitroMapStateUpdater;";
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
static void updateViewProps(jni::alias_ref<jni::JClass> /* class */,
|
|
33
|
+
jni::alias_ref<JHybridNitroMapSpec::javaobject> view,
|
|
34
|
+
jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface);
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
static void registerNatives() {
|
|
38
|
+
// Register JNI calls
|
|
39
|
+
javaClassStatic()->registerNatives({
|
|
40
|
+
makeNativeMethod("updateViewProps", JHybridNitroMapStateUpdater::updateViewProps),
|
|
41
|
+
});
|
|
42
|
+
// Register React Native view component descriptor
|
|
43
|
+
auto provider = react::concreteComponentDescriptorProvider<HybridNitroMapComponentDescriptor>();
|
|
44
|
+
auto providerRegistry = react::CoreComponentsRegistry::sharedProviderRegistry();
|
|
45
|
+
providerRegistry->add(provider);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} // namespace margelo::nitro::nitromap::views
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Camera.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitromap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "Camera".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class Camera(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val center: Coordinate,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val pitch: Double,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val heading: Double,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val altitude: Double,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val zoom: Double
|
|
35
|
+
) {
|
|
36
|
+
/* primary constructor */
|
|
37
|
+
|
|
38
|
+
private companion object {
|
|
39
|
+
/**
|
|
40
|
+
* Constructor called from C++
|
|
41
|
+
*/
|
|
42
|
+
@DoNotStrip
|
|
43
|
+
@Keep
|
|
44
|
+
@Suppress("unused")
|
|
45
|
+
@JvmStatic
|
|
46
|
+
private fun fromCpp(center: Coordinate, pitch: Double, heading: Double, altitude: Double, zoom: Double): Camera {
|
|
47
|
+
return Camera(center, pitch, heading, altitude, zoom)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ClusterAnimationStyle.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitromap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "ClusterAnimationStyle".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class ClusterAnimationStyle(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
DEFAULT(0),
|
|
20
|
+
BOUNCE(1),
|
|
21
|
+
SCALE(2),
|
|
22
|
+
FADE(3),
|
|
23
|
+
SPRING(4);
|
|
24
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ClusterConfig.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.nitromap
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "ClusterConfig".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class ClusterConfig(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val enabled: Boolean,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val strategy: ClusterStrategy,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val radius: Double,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val minimumClusterSize: Double,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val maxZoom: Double,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val backgroundColor: ColorValue,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val textColor: ColorValue,
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
@Keep
|
|
43
|
+
val borderWidth: Double,
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
@Keep
|
|
46
|
+
val borderColor: ColorValue,
|
|
47
|
+
@DoNotStrip
|
|
48
|
+
@Keep
|
|
49
|
+
val animatesClusters: Boolean,
|
|
50
|
+
@DoNotStrip
|
|
51
|
+
@Keep
|
|
52
|
+
val animationDuration: Double,
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
val animationStyle: ClusterAnimationStyle,
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
@Keep
|
|
58
|
+
val realtimeClustering: Boolean,
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
@Keep
|
|
61
|
+
val renderBuffer: Double,
|
|
62
|
+
@DoNotStrip
|
|
63
|
+
@Keep
|
|
64
|
+
val throttleInterval: Double
|
|
65
|
+
) {
|
|
66
|
+
/* primary constructor */
|
|
67
|
+
|
|
68
|
+
private companion object {
|
|
69
|
+
/**
|
|
70
|
+
* Constructor called from C++
|
|
71
|
+
*/
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
@Suppress("unused")
|
|
75
|
+
@JvmStatic
|
|
76
|
+
private fun fromCpp(enabled: Boolean, strategy: ClusterStrategy, radius: Double, minimumClusterSize: Double, maxZoom: Double, backgroundColor: ColorValue, textColor: ColorValue, borderWidth: Double, borderColor: ColorValue, animatesClusters: Boolean, animationDuration: Double, animationStyle: ClusterAnimationStyle, realtimeClustering: Boolean, renderBuffer: Double, throttleInterval: Double): ClusterConfig {
|
|
77
|
+
return ClusterConfig(enabled, strategy, radius, minimumClusterSize, maxZoom, backgroundColor, textColor, borderWidth, borderColor, animatesClusters, animationDuration, animationStyle, realtimeClustering, renderBuffer, throttleInterval)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|