react-native-google-maps-plus 1.3.0-dev.2 → 1.3.0-dev.4
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/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +92 -8
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +0 -1
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +52 -9
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +17 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNSize.kt +7 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotFormat.kt +16 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotResultType.kt +9 -0
- package/ios/GoogleMapViewImpl.swift +285 -145
- package/ios/RNGoogleMapsPlusView.swift +86 -38
- package/ios/extensions/RNLatLngBounds+Extension.swift +16 -0
- package/ios/extensions/RNSize+Extension.swift +7 -0
- package/ios/extensions/RNSnapshotFormat+Extension.swift +28 -0
- package/ios/extensions/RNSnapshotResultType+Extension.swift +12 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +6 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +13 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +51 -7
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +5 -2
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +58 -0
- package/nitrogen/generated/android/c++/JRNSize.hpp +57 -0
- package/nitrogen/generated/android/c++/JRNSnapshotFormat.hpp +62 -0
- package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +71 -0
- package/nitrogen/generated/android/c++/JRNSnapshotResultType.hpp +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +14 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotFormat.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotResultType.kt +21 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +57 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +15 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +40 -5
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +7 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +5 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +58 -4
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +46 -0
- package/nitrogen/generated/ios/swift/RNSize.swift +46 -0
- package/nitrogen/generated/ios/swift/RNSnapshotFormat.swift +44 -0
- package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +87 -0
- package/nitrogen/generated/ios/swift/RNSnapshotResultType.swift +40 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +3 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +12 -3
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +72 -0
- package/nitrogen/generated/shared/c++/RNSize.hpp +71 -0
- package/nitrogen/generated/shared/c++/RNSnapshotFormat.hpp +80 -0
- package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +87 -0
- package/nitrogen/generated/shared/c++/RNSnapshotResultType.hpp +76 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +15 -2
- package/src/types.ts +24 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNSnapshotFormat.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNSnapshotFormat.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNSnapshotFormat" and the the Kotlin enum "RNSnapshotFormat".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNSnapshotFormat final: public jni::JavaClass<JRNSnapshotFormat> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotFormat;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNSnapshotFormat.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNSnapshotFormat toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNSnapshotFormat>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNSnapshotFormat> fromCpp(RNSnapshotFormat value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldPNG = clazz->getStaticField<JRNSnapshotFormat>("PNG");
|
|
45
|
+
static const auto fieldJPG = clazz->getStaticField<JRNSnapshotFormat>("JPG");
|
|
46
|
+
static const auto fieldJPEG = clazz->getStaticField<JRNSnapshotFormat>("JPEG");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case RNSnapshotFormat::PNG:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldPNG);
|
|
51
|
+
case RNSnapshotFormat::JPG:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldJPG);
|
|
53
|
+
case RNSnapshotFormat::JPEG:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldJPEG);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNSnapshotOptions.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNSnapshotOptions.hpp"
|
|
12
|
+
|
|
13
|
+
#include "JRNSize.hpp"
|
|
14
|
+
#include "JRNSnapshotFormat.hpp"
|
|
15
|
+
#include "JRNSnapshotResultType.hpp"
|
|
16
|
+
#include "RNSize.hpp"
|
|
17
|
+
#include "RNSnapshotFormat.hpp"
|
|
18
|
+
#include "RNSnapshotResultType.hpp"
|
|
19
|
+
#include <optional>
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
|
+
|
|
23
|
+
using namespace facebook;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The C++ JNI bridge between the C++ struct "RNSnapshotOptions" and the the Kotlin data class "RNSnapshotOptions".
|
|
27
|
+
*/
|
|
28
|
+
struct JRNSnapshotOptions final: public jni::JavaClass<JRNSnapshotOptions> {
|
|
29
|
+
public:
|
|
30
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotOptions;";
|
|
31
|
+
|
|
32
|
+
public:
|
|
33
|
+
/**
|
|
34
|
+
* Convert this Java/Kotlin-based struct to the C++ struct RNSnapshotOptions by copying all values to C++.
|
|
35
|
+
*/
|
|
36
|
+
[[maybe_unused]]
|
|
37
|
+
[[nodiscard]]
|
|
38
|
+
RNSnapshotOptions toCpp() const {
|
|
39
|
+
static const auto clazz = javaClassStatic();
|
|
40
|
+
static const auto fieldSize = clazz->getField<JRNSize>("size");
|
|
41
|
+
jni::local_ref<JRNSize> size = this->getFieldValue(fieldSize);
|
|
42
|
+
static const auto fieldFormat = clazz->getField<JRNSnapshotFormat>("format");
|
|
43
|
+
jni::local_ref<JRNSnapshotFormat> format = this->getFieldValue(fieldFormat);
|
|
44
|
+
static const auto fieldQuality = clazz->getField<double>("quality");
|
|
45
|
+
double quality = this->getFieldValue(fieldQuality);
|
|
46
|
+
static const auto fieldResultType = clazz->getField<JRNSnapshotResultType>("resultType");
|
|
47
|
+
jni::local_ref<JRNSnapshotResultType> resultType = this->getFieldValue(fieldResultType);
|
|
48
|
+
return RNSnapshotOptions(
|
|
49
|
+
size != nullptr ? std::make_optional(size->toCpp()) : std::nullopt,
|
|
50
|
+
format->toCpp(),
|
|
51
|
+
quality,
|
|
52
|
+
resultType->toCpp()
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
/**
|
|
58
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
59
|
+
*/
|
|
60
|
+
[[maybe_unused]]
|
|
61
|
+
static jni::local_ref<JRNSnapshotOptions::javaobject> fromCpp(const RNSnapshotOptions& value) {
|
|
62
|
+
return newInstance(
|
|
63
|
+
value.size.has_value() ? JRNSize::fromCpp(value.size.value()) : nullptr,
|
|
64
|
+
JRNSnapshotFormat::fromCpp(value.format),
|
|
65
|
+
value.quality,
|
|
66
|
+
JRNSnapshotResultType::fromCpp(value.resultType)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JRNSnapshotResultType.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "RNSnapshotResultType.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "RNSnapshotResultType" and the the Kotlin enum "RNSnapshotResultType".
|
|
19
|
+
*/
|
|
20
|
+
struct JRNSnapshotResultType final: public jni::JavaClass<JRNSnapshotResultType> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/RNSnapshotResultType;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum RNSnapshotResultType.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
RNSnapshotResultType toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<RNSnapshotResultType>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JRNSnapshotResultType> fromCpp(RNSnapshotResultType value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldBASE64 = clazz->getStaticField<JRNSnapshotResultType>("BASE64");
|
|
45
|
+
static const auto fieldFILE = clazz->getStaticField<JRNSnapshotResultType>("FILE");
|
|
46
|
+
|
|
47
|
+
switch (value) {
|
|
48
|
+
case RNSnapshotResultType::BASE64:
|
|
49
|
+
return clazz->getStaticFieldValue(fieldBASE64);
|
|
50
|
+
case RNSnapshotResultType::FILE:
|
|
51
|
+
return clazz->getStaticFieldValue(fieldFILE);
|
|
52
|
+
default:
|
|
53
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
54
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -387,11 +387,23 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
387
387
|
// Methods
|
|
388
388
|
@DoNotStrip
|
|
389
389
|
@Keep
|
|
390
|
-
abstract fun setCamera(camera: RNCamera, animated: Boolean?,
|
|
390
|
+
abstract fun setCamera(camera: RNCamera, animated: Boolean?, durationMs: Double?): Unit
|
|
391
391
|
|
|
392
392
|
@DoNotStrip
|
|
393
393
|
@Keep
|
|
394
|
-
abstract fun setCameraToCoordinates(coordinates: Array<RNLatLng>, padding: RNMapPadding?, animated: Boolean?,
|
|
394
|
+
abstract fun setCameraToCoordinates(coordinates: Array<RNLatLng>, padding: RNMapPadding?, animated: Boolean?, durationMs: Double?): Unit
|
|
395
|
+
|
|
396
|
+
@DoNotStrip
|
|
397
|
+
@Keep
|
|
398
|
+
abstract fun setCameraBounds(bounds: RNLatLngBounds?): Unit
|
|
399
|
+
|
|
400
|
+
@DoNotStrip
|
|
401
|
+
@Keep
|
|
402
|
+
abstract fun animateToBounds(bounds: RNLatLngBounds, padding: Double?, durationMs: Double?, lockBounds: Boolean?): Unit
|
|
403
|
+
|
|
404
|
+
@DoNotStrip
|
|
405
|
+
@Keep
|
|
406
|
+
abstract fun snapshot(options: RNSnapshotOptions): Promise<String?>
|
|
395
407
|
|
|
396
408
|
@DoNotStrip
|
|
397
409
|
@Keep
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNLatLngBounds.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RNLatLngBounds".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNLatLngBounds
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val northEast: RNLatLng,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val southWest: RNLatLng
|
|
30
|
+
) {
|
|
31
|
+
/* main constructor */
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNSize.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RNSize".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNSize
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val width: Double,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val height: Double
|
|
30
|
+
) {
|
|
31
|
+
/* main constructor */
|
|
32
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotFormat.kt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNSnapshotFormat.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "RNSnapshotFormat".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class RNSnapshotFormat(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
PNG(0),
|
|
20
|
+
JPG(1),
|
|
21
|
+
JPEG(2);
|
|
22
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNSnapshotOptions.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import com.margelo.nitro.core.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RNSnapshotOptions".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RNSnapshotOptions
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
constructor(
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val size: RNSize?,
|
|
27
|
+
@DoNotStrip
|
|
28
|
+
@Keep
|
|
29
|
+
val format: RNSnapshotFormat,
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
val quality: Double,
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
val resultType: RNSnapshotResultType
|
|
36
|
+
) {
|
|
37
|
+
/* main constructor */
|
|
38
|
+
}
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotResultType.kt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNSnapshotResultType.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the JavaScript enum/union "RNSnapshotResultType".
|
|
15
|
+
*/
|
|
16
|
+
@DoNotStrip
|
|
17
|
+
@Keep
|
|
18
|
+
enum class RNSnapshotResultType(@DoNotStrip @Keep val value: Int) {
|
|
19
|
+
BASE64(0),
|
|
20
|
+
FILE(1);
|
|
21
|
+
}
|
|
@@ -42,6 +42,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
|
|
|
42
42
|
namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
43
43
|
// Forward declaration of `RNKMLayer` to properly resolve imports.
|
|
44
44
|
namespace margelo::nitro::rngooglemapsplus { struct RNKMLayer; }
|
|
45
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
45
47
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
46
48
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
47
49
|
// Forward declaration of `RNLineCapType` to properly resolve imports.
|
|
@@ -78,6 +80,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
|
|
|
78
80
|
namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
|
|
79
81
|
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
80
82
|
namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
|
|
83
|
+
// Forward declaration of `RNSize` to properly resolve imports.
|
|
84
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
|
|
81
85
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
82
86
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
83
87
|
|
|
@@ -106,6 +110,7 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
|
|
|
106
110
|
#include "RNInitialProps.hpp"
|
|
107
111
|
#include "RNKMLayer.hpp"
|
|
108
112
|
#include "RNLatLng.hpp"
|
|
113
|
+
#include "RNLatLngBounds.hpp"
|
|
109
114
|
#include "RNLineCapType.hpp"
|
|
110
115
|
#include "RNLineJoinType.hpp"
|
|
111
116
|
#include "RNLocation.hpp"
|
|
@@ -123,6 +128,7 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
|
|
|
123
128
|
#include "RNPolyline.hpp"
|
|
124
129
|
#include "RNPosition.hpp"
|
|
125
130
|
#include "RNRegion.hpp"
|
|
131
|
+
#include "RNSize.hpp"
|
|
126
132
|
#include "RNUserInterfaceStyle.hpp"
|
|
127
133
|
#include <NitroModules/Promise.hpp>
|
|
128
134
|
#include <NitroModules/PromiseHolder.hpp>
|
|
@@ -1161,6 +1167,48 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
1161
1167
|
return *optional;
|
|
1162
1168
|
}
|
|
1163
1169
|
|
|
1170
|
+
// pragma MARK: std::optional<RNLatLngBounds>
|
|
1171
|
+
/**
|
|
1172
|
+
* Specialized version of `std::optional<RNLatLngBounds>`.
|
|
1173
|
+
*/
|
|
1174
|
+
using std__optional_RNLatLngBounds_ = std::optional<RNLatLngBounds>;
|
|
1175
|
+
inline std::optional<RNLatLngBounds> create_std__optional_RNLatLngBounds_(const RNLatLngBounds& value) noexcept {
|
|
1176
|
+
return std::optional<RNLatLngBounds>(value);
|
|
1177
|
+
}
|
|
1178
|
+
inline bool has_value_std__optional_RNLatLngBounds_(const std::optional<RNLatLngBounds>& optional) noexcept {
|
|
1179
|
+
return optional.has_value();
|
|
1180
|
+
}
|
|
1181
|
+
inline RNLatLngBounds get_std__optional_RNLatLngBounds_(const std::optional<RNLatLngBounds>& optional) noexcept {
|
|
1182
|
+
return *optional;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
// pragma MARK: std::shared_ptr<Promise<std::optional<std::string>>>
|
|
1186
|
+
/**
|
|
1187
|
+
* Specialized version of `std::shared_ptr<Promise<std::optional<std::string>>>`.
|
|
1188
|
+
*/
|
|
1189
|
+
using std__shared_ptr_Promise_std__optional_std__string___ = std::shared_ptr<Promise<std::optional<std::string>>>;
|
|
1190
|
+
inline std::shared_ptr<Promise<std::optional<std::string>>> create_std__shared_ptr_Promise_std__optional_std__string___() noexcept {
|
|
1191
|
+
return Promise<std::optional<std::string>>::create();
|
|
1192
|
+
}
|
|
1193
|
+
inline PromiseHolder<std::optional<std::string>> wrap_std__shared_ptr_Promise_std__optional_std__string___(std::shared_ptr<Promise<std::optional<std::string>>> promise) noexcept {
|
|
1194
|
+
return PromiseHolder<std::optional<std::string>>(std::move(promise));
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
// pragma MARK: std::optional<RNSize>
|
|
1198
|
+
/**
|
|
1199
|
+
* Specialized version of `std::optional<RNSize>`.
|
|
1200
|
+
*/
|
|
1201
|
+
using std__optional_RNSize_ = std::optional<RNSize>;
|
|
1202
|
+
inline std::optional<RNSize> create_std__optional_RNSize_(const RNSize& value) noexcept {
|
|
1203
|
+
return std::optional<RNSize>(value);
|
|
1204
|
+
}
|
|
1205
|
+
inline bool has_value_std__optional_RNSize_(const std::optional<RNSize>& optional) noexcept {
|
|
1206
|
+
return optional.has_value();
|
|
1207
|
+
}
|
|
1208
|
+
inline RNSize get_std__optional_RNSize_(const std::optional<RNSize>& optional) noexcept {
|
|
1209
|
+
return *optional;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1164
1212
|
// pragma MARK: std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>
|
|
1165
1213
|
/**
|
|
1166
1214
|
* Specialized version of `std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>`.
|
|
@@ -1172,5 +1220,14 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
1172
1220
|
// pragma MARK: std::weak_ptr<HybridRNGoogleMapsPlusViewSpec>
|
|
1173
1221
|
using std__weak_ptr_HybridRNGoogleMapsPlusViewSpec_ = std::weak_ptr<HybridRNGoogleMapsPlusViewSpec>;
|
|
1174
1222
|
inline std__weak_ptr_HybridRNGoogleMapsPlusViewSpec_ weakify_std__shared_ptr_HybridRNGoogleMapsPlusViewSpec_(const std::shared_ptr<HybridRNGoogleMapsPlusViewSpec>& strong) noexcept { return strong; }
|
|
1223
|
+
|
|
1224
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::optional<std::string>>>>
|
|
1225
|
+
using Result_std__shared_ptr_Promise_std__optional_std__string____ = Result<std::shared_ptr<Promise<std::optional<std::string>>>>;
|
|
1226
|
+
inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::shared_ptr<Promise<std::optional<std::string>>>& value) noexcept {
|
|
1227
|
+
return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withValue(value);
|
|
1228
|
+
}
|
|
1229
|
+
inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::exception_ptr& error) noexcept {
|
|
1230
|
+
return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withError(error);
|
|
1231
|
+
}
|
|
1175
1232
|
|
|
1176
1233
|
} // namespace margelo::nitro::rngooglemapsplus::bridge::swift
|
|
@@ -42,6 +42,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
|
|
|
42
42
|
namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
43
43
|
// Forward declaration of `RNKMLayer` to properly resolve imports.
|
|
44
44
|
namespace margelo::nitro::rngooglemapsplus { struct RNKMLayer; }
|
|
45
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
46
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
45
47
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
46
48
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
47
49
|
// Forward declaration of `RNLineCapType` to properly resolve imports.
|
|
@@ -78,6 +80,14 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
|
|
|
78
80
|
namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
|
|
79
81
|
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
80
82
|
namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
|
|
83
|
+
// Forward declaration of `RNSize` to properly resolve imports.
|
|
84
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
|
|
85
|
+
// Forward declaration of `RNSnapshotFormat` to properly resolve imports.
|
|
86
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
|
|
87
|
+
// Forward declaration of `RNSnapshotOptions` to properly resolve imports.
|
|
88
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
|
|
89
|
+
// Forward declaration of `RNSnapshotResultType` to properly resolve imports.
|
|
90
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
81
91
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
82
92
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
83
93
|
|
|
@@ -100,6 +110,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
|
100
110
|
#include "RNInitialProps.hpp"
|
|
101
111
|
#include "RNKMLayer.hpp"
|
|
102
112
|
#include "RNLatLng.hpp"
|
|
113
|
+
#include "RNLatLngBounds.hpp"
|
|
103
114
|
#include "RNLineCapType.hpp"
|
|
104
115
|
#include "RNLineJoinType.hpp"
|
|
105
116
|
#include "RNLocation.hpp"
|
|
@@ -117,6 +128,10 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
|
117
128
|
#include "RNPolyline.hpp"
|
|
118
129
|
#include "RNPosition.hpp"
|
|
119
130
|
#include "RNRegion.hpp"
|
|
131
|
+
#include "RNSize.hpp"
|
|
132
|
+
#include "RNSnapshotFormat.hpp"
|
|
133
|
+
#include "RNSnapshotOptions.hpp"
|
|
134
|
+
#include "RNSnapshotResultType.hpp"
|
|
120
135
|
#include "RNUserInterfaceStyle.hpp"
|
|
121
136
|
#include <NitroModules/Promise.hpp>
|
|
122
137
|
#include <NitroModules/Result.hpp>
|
|
@@ -74,6 +74,16 @@ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorBuilding; }
|
|
|
74
74
|
namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
|
|
75
75
|
// Forward declaration of `RNRegion` to properly resolve imports.
|
|
76
76
|
namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
|
|
77
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
78
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
79
|
+
// Forward declaration of `RNSnapshotOptions` to properly resolve imports.
|
|
80
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNSnapshotOptions; }
|
|
81
|
+
// Forward declaration of `RNSize` to properly resolve imports.
|
|
82
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
|
|
83
|
+
// Forward declaration of `RNSnapshotFormat` to properly resolve imports.
|
|
84
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
|
|
85
|
+
// Forward declaration of `RNSnapshotResultType` to properly resolve imports.
|
|
86
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
77
87
|
// Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
|
|
78
88
|
namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
|
|
79
89
|
// Forward declaration of `RNAndroidLocationPermissionResult` to properly resolve imports.
|
|
@@ -116,8 +126,13 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
|
116
126
|
#include "RNIndoorBuilding.hpp"
|
|
117
127
|
#include "RNIndoorLevel.hpp"
|
|
118
128
|
#include "RNRegion.hpp"
|
|
119
|
-
#include "
|
|
129
|
+
#include "RNLatLngBounds.hpp"
|
|
120
130
|
#include <NitroModules/Promise.hpp>
|
|
131
|
+
#include "RNSnapshotOptions.hpp"
|
|
132
|
+
#include "RNSize.hpp"
|
|
133
|
+
#include "RNSnapshotFormat.hpp"
|
|
134
|
+
#include "RNSnapshotResultType.hpp"
|
|
135
|
+
#include "RNLocationPermissionResult.hpp"
|
|
121
136
|
#include "RNAndroidLocationPermissionResult.hpp"
|
|
122
137
|
#include "RNIOSPermissionResult.hpp"
|
|
123
138
|
|
|
@@ -406,17 +421,37 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
406
421
|
|
|
407
422
|
public:
|
|
408
423
|
// Methods
|
|
409
|
-
inline void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double>
|
|
410
|
-
auto __result = _swiftPart.setCamera(camera, animated,
|
|
424
|
+
inline void setCamera(const RNCamera& camera, std::optional<bool> animated, std::optional<double> durationMs) override {
|
|
425
|
+
auto __result = _swiftPart.setCamera(camera, animated, durationMs);
|
|
426
|
+
if (__result.hasError()) [[unlikely]] {
|
|
427
|
+
std::rethrow_exception(__result.error());
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
inline void setCameraToCoordinates(const std::vector<RNLatLng>& coordinates, const std::optional<RNMapPadding>& padding, std::optional<bool> animated, std::optional<double> durationMs) override {
|
|
431
|
+
auto __result = _swiftPart.setCameraToCoordinates(coordinates, padding, animated, durationMs);
|
|
432
|
+
if (__result.hasError()) [[unlikely]] {
|
|
433
|
+
std::rethrow_exception(__result.error());
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
inline void setCameraBounds(const std::optional<RNLatLngBounds>& bounds) override {
|
|
437
|
+
auto __result = _swiftPart.setCameraBounds(bounds);
|
|
438
|
+
if (__result.hasError()) [[unlikely]] {
|
|
439
|
+
std::rethrow_exception(__result.error());
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
inline void animateToBounds(const RNLatLngBounds& bounds, std::optional<double> padding, std::optional<double> durationMs, std::optional<bool> lockBounds) override {
|
|
443
|
+
auto __result = _swiftPart.animateToBounds(bounds, padding, durationMs, lockBounds);
|
|
411
444
|
if (__result.hasError()) [[unlikely]] {
|
|
412
445
|
std::rethrow_exception(__result.error());
|
|
413
446
|
}
|
|
414
447
|
}
|
|
415
|
-
inline
|
|
416
|
-
auto __result = _swiftPart.
|
|
448
|
+
inline std::shared_ptr<Promise<std::optional<std::string>>> snapshot(const RNSnapshotOptions& options) override {
|
|
449
|
+
auto __result = _swiftPart.snapshot(options);
|
|
417
450
|
if (__result.hasError()) [[unlikely]] {
|
|
418
451
|
std::rethrow_exception(__result.error());
|
|
419
452
|
}
|
|
453
|
+
auto __value = std::move(__result.value());
|
|
454
|
+
return __value;
|
|
420
455
|
}
|
|
421
456
|
inline void showLocationDialog() override {
|
|
422
457
|
auto __result = _swiftPart.showLocationDialog();
|
|
@@ -49,6 +49,13 @@ using namespace margelo::nitro::rngooglemapsplus::views;
|
|
|
49
49
|
return self;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/// added by nitrogen-patch.js
|
|
53
|
+
+ (BOOL)shouldBeRecycled
|
|
54
|
+
{
|
|
55
|
+
return NO;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
52
59
|
- (void) updateView {
|
|
53
60
|
// 1. Get Swift part
|
|
54
61
|
RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
|
|
@@ -48,8 +48,11 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
|
|
|
48
48
|
var onCameraChangeComplete: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
|
|
49
49
|
|
|
50
50
|
// Methods
|
|
51
|
-
func setCamera(camera: RNCamera, animated: Bool?,
|
|
52
|
-
func setCameraToCoordinates(coordinates: [RNLatLng], padding: RNMapPadding?, animated: Bool?,
|
|
51
|
+
func setCamera(camera: RNCamera, animated: Bool?, durationMs: Double?) throws -> Void
|
|
52
|
+
func setCameraToCoordinates(coordinates: [RNLatLng], padding: RNMapPadding?, animated: Bool?, durationMs: Double?) throws -> Void
|
|
53
|
+
func setCameraBounds(bounds: RNLatLngBounds?) throws -> Void
|
|
54
|
+
func animateToBounds(bounds: RNLatLngBounds, padding: Double?, durationMs: Double?, lockBounds: Bool?) throws -> Void
|
|
55
|
+
func snapshot(options: RNSnapshotOptions) throws -> Promise<String?>
|
|
53
56
|
func showLocationDialog() throws -> Void
|
|
54
57
|
func openLocationSettings() throws -> Void
|
|
55
58
|
func requestLocationPermission() throws -> Promise<RNLocationPermissionResult>
|