react-native-google-maps-plus 1.3.0-dev.1 → 1.3.0-dev.3

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.
Files changed (74) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +107 -5
  2. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +0 -1
  3. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +48 -4
  4. package/android/src/main/java/com/rngooglemapsplus/extensions/IndoorBuildingExtension.kt +33 -0
  5. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +17 -0
  6. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSize.kt +7 -0
  7. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotFormat.kt +16 -0
  8. package/android/src/main/java/com/rngooglemapsplus/extensions/RNSnapshotResultType.kt +9 -0
  9. package/ios/GoogleMapViewImpl.swift +277 -121
  10. package/ios/RNGoogleMapsPlusView.swift +78 -27
  11. package/ios/extensions/IndoorBuilding+Extension.swift +33 -0
  12. package/ios/extensions/RNLatLngBounds+Extension.swift +16 -0
  13. package/ios/extensions/RNSize+Extension.swift +7 -0
  14. package/ios/extensions/RNSnapshotFormat+Extension.swift +28 -0
  15. package/ios/extensions/RNSnapshotResultType+Extension.swift +12 -0
  16. package/lib/module/types.js.map +1 -1
  17. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +8 -3
  18. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  19. package/lib/typescript/src/types.d.ts +25 -1
  20. package/lib/typescript/src/types.d.ts.map +1 -1
  21. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +4 -0
  22. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorBuilding.hpp +81 -0
  23. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorLevel.hpp +78 -0
  24. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +99 -7
  25. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +9 -2
  26. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +86 -0
  27. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +66 -0
  28. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +58 -0
  29. package/nitrogen/generated/android/c++/JRNSize.hpp +57 -0
  30. package/nitrogen/generated/android/c++/JRNSnapshotFormat.hpp +62 -0
  31. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +71 -0
  32. package/nitrogen/generated/android/c++/JRNSnapshotResultType.hpp +59 -0
  33. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +8 -0
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorBuilding.kt +81 -0
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorLevel.kt +81 -0
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +42 -2
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +38 -0
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +38 -0
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +32 -0
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +32 -0
  41. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotFormat.kt +22 -0
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +38 -0
  43. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotResultType.kt +21 -0
  44. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +16 -0
  45. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +148 -0
  46. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +21 -0
  47. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +60 -5
  48. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +10 -0
  49. package/nitrogen/generated/ios/swift/Func_void_RNIndoorBuilding.swift +47 -0
  50. package/nitrogen/generated/ios/swift/Func_void_RNIndoorLevel.swift +47 -0
  51. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +7 -2
  52. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +122 -4
  53. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +116 -0
  54. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +118 -0
  55. package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +46 -0
  56. package/nitrogen/generated/ios/swift/RNSize.swift +46 -0
  57. package/nitrogen/generated/ios/swift/RNSnapshotFormat.swift +44 -0
  58. package/nitrogen/generated/ios/swift/RNSnapshotOptions.swift +87 -0
  59. package/nitrogen/generated/ios/swift/RNSnapshotResultType.swift +40 -0
  60. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +7 -0
  61. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +22 -3
  62. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +82 -0
  63. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +80 -0
  64. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +72 -0
  65. package/nitrogen/generated/shared/c++/RNSize.hpp +71 -0
  66. package/nitrogen/generated/shared/c++/RNSnapshotFormat.hpp +80 -0
  67. package/nitrogen/generated/shared/c++/RNSnapshotOptions.hpp +87 -0
  68. package/nitrogen/generated/shared/c++/RNSnapshotResultType.hpp +76 -0
  69. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +24 -0
  70. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -0
  71. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -0
  72. package/package.json +1 -1
  73. package/src/RNGoogleMapsPlusView.nitro.ts +19 -2
  74. package/src/types.ts +38 -2
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// RNIndoorLevel.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
+ #include <string>
24
+ #include <optional>
25
+
26
+ namespace margelo::nitro::rngooglemapsplus {
27
+
28
+ /**
29
+ * A struct which can be represented as a JavaScript object (RNIndoorLevel).
30
+ */
31
+ struct RNIndoorLevel {
32
+ public:
33
+ double index SWIFT_PRIVATE;
34
+ std::optional<std::string> name SWIFT_PRIVATE;
35
+ std::optional<std::string> shortName SWIFT_PRIVATE;
36
+ std::optional<bool> active SWIFT_PRIVATE;
37
+
38
+ public:
39
+ RNIndoorLevel() = default;
40
+ explicit RNIndoorLevel(double index, std::optional<std::string> name, std::optional<std::string> shortName, std::optional<bool> active): index(index), name(name), shortName(shortName), active(active) {}
41
+ };
42
+
43
+ } // namespace margelo::nitro::rngooglemapsplus
44
+
45
+ namespace margelo::nitro {
46
+
47
+ // C++ RNIndoorLevel <> JS RNIndoorLevel (object)
48
+ template <>
49
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIndoorLevel> final {
50
+ static inline margelo::nitro::rngooglemapsplus::RNIndoorLevel fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
51
+ jsi::Object obj = arg.asObject(runtime);
52
+ return margelo::nitro::rngooglemapsplus::RNIndoorLevel(
53
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "index")),
54
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "name")),
55
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "shortName")),
56
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "active"))
57
+ );
58
+ }
59
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNIndoorLevel& arg) {
60
+ jsi::Object obj(runtime);
61
+ obj.setProperty(runtime, "index", JSIConverter<double>::toJSI(runtime, arg.index));
62
+ obj.setProperty(runtime, "name", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.name));
63
+ obj.setProperty(runtime, "shortName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.shortName));
64
+ obj.setProperty(runtime, "active", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.active));
65
+ return obj;
66
+ }
67
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
68
+ if (!value.isObject()) {
69
+ return false;
70
+ }
71
+ jsi::Object obj = value.getObject(runtime);
72
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "index"))) return false;
73
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
74
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "shortName"))) return false;
75
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "active"))) return false;
76
+ return true;
77
+ }
78
+ };
79
+
80
+ } // namespace margelo::nitro
@@ -0,0 +1,72 @@
1
+ ///
2
+ /// RNLatLngBounds.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+ // Forward declaration of `RNLatLng` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
23
+
24
+ #include "RNLatLng.hpp"
25
+
26
+ namespace margelo::nitro::rngooglemapsplus {
27
+
28
+ /**
29
+ * A struct which can be represented as a JavaScript object (RNLatLngBounds).
30
+ */
31
+ struct RNLatLngBounds {
32
+ public:
33
+ RNLatLng northEast SWIFT_PRIVATE;
34
+ RNLatLng southWest SWIFT_PRIVATE;
35
+
36
+ public:
37
+ RNLatLngBounds() = default;
38
+ explicit RNLatLngBounds(RNLatLng northEast, RNLatLng southWest): northEast(northEast), southWest(southWest) {}
39
+ };
40
+
41
+ } // namespace margelo::nitro::rngooglemapsplus
42
+
43
+ namespace margelo::nitro {
44
+
45
+ // C++ RNLatLngBounds <> JS RNLatLngBounds (object)
46
+ template <>
47
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds> final {
48
+ static inline margelo::nitro::rngooglemapsplus::RNLatLngBounds fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
49
+ jsi::Object obj = arg.asObject(runtime);
50
+ return margelo::nitro::rngooglemapsplus::RNLatLngBounds(
51
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "northEast")),
52
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "southWest"))
53
+ );
54
+ }
55
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLatLngBounds& arg) {
56
+ jsi::Object obj(runtime);
57
+ obj.setProperty(runtime, "northEast", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.northEast));
58
+ obj.setProperty(runtime, "southWest", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.southWest));
59
+ return obj;
60
+ }
61
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
62
+ if (!value.isObject()) {
63
+ return false;
64
+ }
65
+ jsi::Object obj = value.getObject(runtime);
66
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "northEast"))) return false;
67
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "southWest"))) return false;
68
+ return true;
69
+ }
70
+ };
71
+
72
+ } // namespace margelo::nitro
@@ -0,0 +1,71 @@
1
+ ///
2
+ /// RNSize.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+
22
+
23
+
24
+
25
+ namespace margelo::nitro::rngooglemapsplus {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (RNSize).
29
+ */
30
+ struct RNSize {
31
+ public:
32
+ double width SWIFT_PRIVATE;
33
+ double height SWIFT_PRIVATE;
34
+
35
+ public:
36
+ RNSize() = default;
37
+ explicit RNSize(double width, double height): width(width), height(height) {}
38
+ };
39
+
40
+ } // namespace margelo::nitro::rngooglemapsplus
41
+
42
+ namespace margelo::nitro {
43
+
44
+ // C++ RNSize <> JS RNSize (object)
45
+ template <>
46
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNSize> final {
47
+ static inline margelo::nitro::rngooglemapsplus::RNSize fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
48
+ jsi::Object obj = arg.asObject(runtime);
49
+ return margelo::nitro::rngooglemapsplus::RNSize(
50
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
51
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height"))
52
+ );
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNSize& arg) {
55
+ jsi::Object obj(runtime);
56
+ obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
57
+ obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
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, "width"))) return false;
66
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
67
+ return true;
68
+ }
69
+ };
70
+
71
+ } // namespace margelo::nitro
@@ -0,0 +1,80 @@
1
+ ///
2
+ /// RNSnapshotFormat.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::rngooglemapsplus {
27
+
28
+ /**
29
+ * An enum which can be represented as a JavaScript union (RNSnapshotFormat).
30
+ */
31
+ enum class RNSnapshotFormat {
32
+ PNG SWIFT_NAME(png) = 0,
33
+ JPG SWIFT_NAME(jpg) = 1,
34
+ JPEG SWIFT_NAME(jpeg) = 2,
35
+ } CLOSED_ENUM;
36
+
37
+ } // namespace margelo::nitro::rngooglemapsplus
38
+
39
+ namespace margelo::nitro {
40
+
41
+ // C++ RNSnapshotFormat <> JS RNSnapshotFormat (union)
42
+ template <>
43
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotFormat> final {
44
+ static inline margelo::nitro::rngooglemapsplus::RNSnapshotFormat 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("png"): return margelo::nitro::rngooglemapsplus::RNSnapshotFormat::PNG;
48
+ case hashString("jpg"): return margelo::nitro::rngooglemapsplus::RNSnapshotFormat::JPG;
49
+ case hashString("jpeg"): return margelo::nitro::rngooglemapsplus::RNSnapshotFormat::JPEG;
50
+ default: [[unlikely]]
51
+ throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNSnapshotFormat - invalid value!");
52
+ }
53
+ }
54
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNSnapshotFormat arg) {
55
+ switch (arg) {
56
+ case margelo::nitro::rngooglemapsplus::RNSnapshotFormat::PNG: return JSIConverter<std::string>::toJSI(runtime, "png");
57
+ case margelo::nitro::rngooglemapsplus::RNSnapshotFormat::JPG: return JSIConverter<std::string>::toJSI(runtime, "jpg");
58
+ case margelo::nitro::rngooglemapsplus::RNSnapshotFormat::JPEG: return JSIConverter<std::string>::toJSI(runtime, "jpeg");
59
+ default: [[unlikely]]
60
+ throw std::invalid_argument("Cannot convert RNSnapshotFormat 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("png"):
71
+ case hashString("jpg"):
72
+ case hashString("jpeg"):
73
+ return true;
74
+ default:
75
+ return false;
76
+ }
77
+ }
78
+ };
79
+
80
+ } // namespace margelo::nitro
@@ -0,0 +1,87 @@
1
+ ///
2
+ /// RNSnapshotOptions.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 `RNSize` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNSize; }
23
+ // Forward declaration of `RNSnapshotFormat` to properly resolve imports.
24
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotFormat; }
25
+ // Forward declaration of `RNSnapshotResultType` to properly resolve imports.
26
+ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
27
+
28
+ #include "RNSize.hpp"
29
+ #include <optional>
30
+ #include "RNSnapshotFormat.hpp"
31
+ #include "RNSnapshotResultType.hpp"
32
+
33
+ namespace margelo::nitro::rngooglemapsplus {
34
+
35
+ /**
36
+ * A struct which can be represented as a JavaScript object (RNSnapshotOptions).
37
+ */
38
+ struct RNSnapshotOptions {
39
+ public:
40
+ std::optional<RNSize> size SWIFT_PRIVATE;
41
+ RNSnapshotFormat format SWIFT_PRIVATE;
42
+ double quality SWIFT_PRIVATE;
43
+ RNSnapshotResultType resultType SWIFT_PRIVATE;
44
+
45
+ public:
46
+ RNSnapshotOptions() = default;
47
+ explicit RNSnapshotOptions(std::optional<RNSize> size, RNSnapshotFormat format, double quality, RNSnapshotResultType resultType): size(size), format(format), quality(quality), resultType(resultType) {}
48
+ };
49
+
50
+ } // namespace margelo::nitro::rngooglemapsplus
51
+
52
+ namespace margelo::nitro {
53
+
54
+ // C++ RNSnapshotOptions <> JS RNSnapshotOptions (object)
55
+ template <>
56
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotOptions> final {
57
+ static inline margelo::nitro::rngooglemapsplus::RNSnapshotOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
58
+ jsi::Object obj = arg.asObject(runtime);
59
+ return margelo::nitro::rngooglemapsplus::RNSnapshotOptions(
60
+ JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNSize>>::fromJSI(runtime, obj.getProperty(runtime, "size")),
61
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotFormat>::fromJSI(runtime, obj.getProperty(runtime, "format")),
62
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "quality")),
63
+ JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotResultType>::fromJSI(runtime, obj.getProperty(runtime, "resultType"))
64
+ );
65
+ }
66
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNSnapshotOptions& arg) {
67
+ jsi::Object obj(runtime);
68
+ obj.setProperty(runtime, "size", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNSize>>::toJSI(runtime, arg.size));
69
+ obj.setProperty(runtime, "format", JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotFormat>::toJSI(runtime, arg.format));
70
+ obj.setProperty(runtime, "quality", JSIConverter<double>::toJSI(runtime, arg.quality));
71
+ obj.setProperty(runtime, "resultType", JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotResultType>::toJSI(runtime, arg.resultType));
72
+ return obj;
73
+ }
74
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
75
+ if (!value.isObject()) {
76
+ return false;
77
+ }
78
+ jsi::Object obj = value.getObject(runtime);
79
+ if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNSize>>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
80
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotFormat>::canConvert(runtime, obj.getProperty(runtime, "format"))) return false;
81
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "quality"))) return false;
82
+ if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotResultType>::canConvert(runtime, obj.getProperty(runtime, "resultType"))) return false;
83
+ return true;
84
+ }
85
+ };
86
+
87
+ } // namespace margelo::nitro
@@ -0,0 +1,76 @@
1
+ ///
2
+ /// RNSnapshotResultType.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::rngooglemapsplus {
27
+
28
+ /**
29
+ * An enum which can be represented as a JavaScript union (RNSnapshotResultType).
30
+ */
31
+ enum class RNSnapshotResultType {
32
+ BASE64 SWIFT_NAME(base64) = 0,
33
+ FILE SWIFT_NAME(file) = 1,
34
+ } CLOSED_ENUM;
35
+
36
+ } // namespace margelo::nitro::rngooglemapsplus
37
+
38
+ namespace margelo::nitro {
39
+
40
+ // C++ RNSnapshotResultType <> JS RNSnapshotResultType (union)
41
+ template <>
42
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNSnapshotResultType> final {
43
+ static inline margelo::nitro::rngooglemapsplus::RNSnapshotResultType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
44
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
45
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
46
+ case hashString("base64"): return margelo::nitro::rngooglemapsplus::RNSnapshotResultType::BASE64;
47
+ case hashString("file"): return margelo::nitro::rngooglemapsplus::RNSnapshotResultType::FILE;
48
+ default: [[unlikely]]
49
+ throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNSnapshotResultType - invalid value!");
50
+ }
51
+ }
52
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNSnapshotResultType arg) {
53
+ switch (arg) {
54
+ case margelo::nitro::rngooglemapsplus::RNSnapshotResultType::BASE64: return JSIConverter<std::string>::toJSI(runtime, "base64");
55
+ case margelo::nitro::rngooglemapsplus::RNSnapshotResultType::FILE: return JSIConverter<std::string>::toJSI(runtime, "file");
56
+ default: [[unlikely]]
57
+ throw std::invalid_argument("Cannot convert RNSnapshotResultType to JS - invalid value: "
58
+ + std::to_string(static_cast<int>(arg)) + "!");
59
+ }
60
+ }
61
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
62
+ if (!value.isString()) {
63
+ return false;
64
+ }
65
+ std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
66
+ switch (hashString(unionValue.c_str(), unionValue.size())) {
67
+ case hashString("base64"):
68
+ case hashString("file"):
69
+ return true;
70
+ default:
71
+ return false;
72
+ }
73
+ }
74
+ };
75
+
76
+ } // namespace margelo::nitro
@@ -325,6 +325,26 @@ namespace margelo::nitro::rngooglemapsplus::views {
325
325
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMarkerDragEnd: ") + exc.what());
326
326
  }
327
327
  }()),
328
+ onIndoorBuildingFocused([&]() -> CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> {
329
+ try {
330
+ const react::RawValue* rawValue = rawProps.at("onIndoorBuildingFocused", nullptr, nullptr);
331
+ if (rawValue == nullptr) return sourceProps.onIndoorBuildingFocused;
332
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
333
+ return CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onIndoorBuildingFocused);
334
+ } catch (const std::exception& exc) {
335
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorBuildingFocused: ") + exc.what());
336
+ }
337
+ }()),
338
+ onIndoorLevelActivated([&]() -> CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> {
339
+ try {
340
+ const react::RawValue* rawValue = rawProps.at("onIndoorLevelActivated", nullptr, nullptr);
341
+ if (rawValue == nullptr) return sourceProps.onIndoorLevelActivated;
342
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
343
+ return CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onIndoorLevelActivated);
344
+ } catch (const std::exception& exc) {
345
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorLevelActivated: ") + exc.what());
346
+ }
347
+ }()),
328
348
  onCameraChangeStart([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> {
329
349
  try {
330
350
  const react::RawValue* rawValue = rawProps.at("onCameraChangeStart", nullptr, nullptr);
@@ -398,6 +418,8 @@ namespace margelo::nitro::rngooglemapsplus::views {
398
418
  onMarkerDragStart(other.onMarkerDragStart),
399
419
  onMarkerDrag(other.onMarkerDrag),
400
420
  onMarkerDragEnd(other.onMarkerDragEnd),
421
+ onIndoorBuildingFocused(other.onIndoorBuildingFocused),
422
+ onIndoorLevelActivated(other.onIndoorLevelActivated),
401
423
  onCameraChangeStart(other.onCameraChangeStart),
402
424
  onCameraChange(other.onCameraChange),
403
425
  onCameraChangeComplete(other.onCameraChangeComplete),
@@ -435,6 +457,8 @@ namespace margelo::nitro::rngooglemapsplus::views {
435
457
  case hashString("onMarkerDragStart"): return true;
436
458
  case hashString("onMarkerDrag"): return true;
437
459
  case hashString("onMarkerDragEnd"): return true;
460
+ case hashString("onIndoorBuildingFocused"): return true;
461
+ case hashString("onIndoorLevelActivated"): return true;
438
462
  case hashString("onCameraChangeStart"): return true;
439
463
  case hashString("onCameraChange"): return true;
440
464
  case hashString("onCameraChangeComplete"): return true;
@@ -37,6 +37,8 @@
37
37
  #include "RNLocation.hpp"
38
38
  #include "RNLocationErrorCode.hpp"
39
39
  #include "RNLatLng.hpp"
40
+ #include "RNIndoorBuilding.hpp"
41
+ #include "RNIndoorLevel.hpp"
40
42
  #include "RNRegion.hpp"
41
43
  #include "RNCamera.hpp"
42
44
  #include <memory>
@@ -93,6 +95,8 @@ namespace margelo::nitro::rngooglemapsplus::views {
93
95
  CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDragStart;
94
96
  CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDrag;
95
97
  CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDragEnd;
98
+ CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> onIndoorBuildingFocused;
99
+ CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> onIndoorLevelActivated;
96
100
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
97
101
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
98
102
  CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
@@ -34,6 +34,8 @@
34
34
  "onMarkerDragStart": true,
35
35
  "onMarkerDrag": true,
36
36
  "onMarkerDragEnd": true,
37
+ "onIndoorBuildingFocused": true,
38
+ "onIndoorLevelActivated": true,
37
39
  "onCameraChangeStart": true,
38
40
  "onCameraChange": true,
39
41
  "onCameraChangeComplete": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.3.0-dev.1",
3
+ "version": "1.3.0-dev.3",
4
4
  "description": "React-native wrapper for android & IOS google maps sdk",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -24,6 +24,10 @@ import type {
24
24
  RNMapZoomConfig,
25
25
  RNHeatmap,
26
26
  RNKMLayer,
27
+ RNIndoorBuilding,
28
+ RNIndoorLevel,
29
+ RNLatLngBounds,
30
+ RNSnapshotOptions,
27
31
  } from './types';
28
32
 
29
33
  export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
@@ -57,6 +61,8 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
57
61
  onMarkerDragStart?: (id: string | undefined, location: RNLatLng) => void;
58
62
  onMarkerDrag?: (id: string | undefined, location: RNLatLng) => void;
59
63
  onMarkerDragEnd?: (id: string | undefined, location: RNLatLng) => void;
64
+ onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
65
+ onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
60
66
  onCameraChangeStart?: (
61
67
  region: RNRegion,
62
68
  camera: RNCamera,
@@ -75,15 +81,26 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
75
81
  }
76
82
 
77
83
  export interface RNGoogleMapsPlusViewMethods extends HybridViewMethods {
78
- setCamera(camera: RNCamera, animated?: boolean, durationMS?: number): void;
84
+ setCamera(camera: RNCamera, animated?: boolean, durationMs?: number): void;
79
85
 
80
86
  setCameraToCoordinates(
81
87
  coordinates: RNLatLng[],
82
88
  padding?: RNMapPadding,
83
89
  animated?: boolean,
84
- durationMS?: number
90
+ durationMs?: number
85
91
  ): void;
86
92
 
93
+ setCameraBounds(bounds?: RNLatLngBounds): void;
94
+
95
+ animateToBounds(
96
+ bounds: RNLatLngBounds,
97
+ padding?: number,
98
+ durationMs?: number,
99
+ lockBounds?: boolean
100
+ ): void;
101
+
102
+ snapshot(options: RNSnapshotOptions): Promise<string | undefined>;
103
+
87
104
  showLocationDialog(): void;
88
105
 
89
106
  openLocationSettings(): void;
package/src/types.ts CHANGED
@@ -23,9 +23,31 @@ export type RNMapUiSettings = {
23
23
  zoomGesturesEnabled?: boolean;
24
24
  };
25
25
 
26
- export type RNLatLng = { latitude: number; longitude: number };
26
+ export type RNLatLng = {
27
+ latitude: number;
28
+ longitude: number;
29
+ };
30
+
31
+ export type RNLatLngBounds = {
32
+ northEast: RNLatLng;
33
+ southWest: RNLatLng;
34
+ };
35
+
36
+ export type RNSnapshotOptions = {
37
+ size?: RNSize;
38
+ format: RNSnapshotFormat;
39
+ quality: number;
40
+ resultType: RNSnapshotResultType;
41
+ };
42
+
43
+ export type RNSize = {
44
+ width: number;
45
+ height: number;
46
+ };
47
+
48
+ export type RNSnapshotFormat = 'png' | 'jpg' | 'jpeg';
27
49
 
28
- export type RNBoundingBox = { northEast: RNLatLng; southWest: RNLatLng };
50
+ export type RNSnapshotResultType = 'base64' | 'file';
29
51
 
30
52
  export type RNMapPadding = {
31
53
  top: number;
@@ -210,6 +232,20 @@ export type RNKMLayer = {
210
232
  kmlString: string;
211
233
  };
212
234
 
235
+ export type RNIndoorBuilding = {
236
+ activeLevelIndex?: number;
237
+ defaultLevelIndex?: number;
238
+ levels: RNIndoorLevel[];
239
+ underground?: boolean;
240
+ };
241
+
242
+ export type RNIndoorLevel = {
243
+ index: number;
244
+ name?: string;
245
+ shortName?: string;
246
+ active?: boolean;
247
+ };
248
+
213
249
  export type RNLocationConfig = {
214
250
  android?: RNAndroidLocationConfig;
215
251
  ios?: RNIOSLocationConfig;