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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +21 -0
  2. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +10 -0
  3. package/android/src/main/java/com/rngooglemapsplus/extensions/IndoorBuildingExtension.kt +33 -0
  4. package/ios/GoogleMapViewImpl.swift +28 -2
  5. package/ios/RNGoogleMapsPlusView.swift +6 -0
  6. package/ios/extensions/IndoorBuilding+Extension.swift +33 -0
  7. package/lib/module/types.js.map +1 -1
  8. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +3 -1
  9. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  10. package/lib/typescript/src/types.d.ts +12 -0
  11. package/lib/typescript/src/types.d.ts.map +1 -1
  12. package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +4 -0
  13. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorBuilding.hpp +81 -0
  14. package/nitrogen/generated/android/c++/JFunc_void_RNIndoorLevel.hpp +78 -0
  15. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +48 -0
  16. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +4 -0
  17. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +86 -0
  18. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +66 -0
  19. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +8 -0
  20. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorBuilding.kt +81 -0
  21. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_RNIndoorLevel.kt +81 -0
  22. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +28 -0
  23. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +38 -0
  24. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +38 -0
  25. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +16 -0
  26. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +91 -0
  27. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +6 -0
  28. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +20 -0
  29. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +10 -0
  30. package/nitrogen/generated/ios/swift/Func_void_RNIndoorBuilding.swift +47 -0
  31. package/nitrogen/generated/ios/swift/Func_void_RNIndoorLevel.swift +47 -0
  32. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +2 -0
  33. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +64 -0
  34. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +116 -0
  35. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +118 -0
  36. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +4 -0
  37. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -0
  38. package/nitrogen/generated/shared/c++/RNIndoorBuilding.hpp +82 -0
  39. package/nitrogen/generated/shared/c++/RNIndoorLevel.hpp +80 -0
  40. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +24 -0
  41. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -0
  42. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -0
  43. package/package.json +1 -1
  44. package/src/RNGoogleMapsPlusView.nitro.ts +4 -0
  45. package/src/types.ts +14 -0
@@ -41,6 +41,8 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
41
41
  var onMarkerDragStart: ((_ id: String?, _ location: RNLatLng) -> Void)? { get set }
42
42
  var onMarkerDrag: ((_ id: String?, _ location: RNLatLng) -> Void)? { get set }
43
43
  var onMarkerDragEnd: ((_ id: String?, _ location: RNLatLng) -> Void)? { get set }
44
+ var onIndoorBuildingFocused: ((_ indoorBuilding: RNIndoorBuilding) -> Void)? { get set }
45
+ var onIndoorLevelActivated: ((_ indoorLevel: RNIndoorLevel) -> Void)? { get set }
44
46
  var onCameraChangeStart: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
45
47
  var onCameraChange: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
46
48
  var onCameraChangeComplete: ((_ region: RNRegion, _ camera: RNCamera, _ isGesture: Bool) -> Void)? { get set }
@@ -958,6 +958,70 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
958
958
  }
959
959
  }
960
960
 
961
+ public final var onIndoorBuildingFocused: bridge.std__optional_std__function_void_const_RNIndoorBuilding_____indoorBuilding______ {
962
+ @inline(__always)
963
+ get {
964
+ return { () -> bridge.std__optional_std__function_void_const_RNIndoorBuilding_____indoorBuilding______ in
965
+ if let __unwrappedValue = self.__implementation.onIndoorBuildingFocused {
966
+ return bridge.create_std__optional_std__function_void_const_RNIndoorBuilding_____indoorBuilding______({ () -> bridge.Func_void_RNIndoorBuilding in
967
+ let __closureWrapper = Func_void_RNIndoorBuilding(__unwrappedValue)
968
+ return bridge.create_Func_void_RNIndoorBuilding(__closureWrapper.toUnsafe())
969
+ }())
970
+ } else {
971
+ return .init()
972
+ }
973
+ }()
974
+ }
975
+ @inline(__always)
976
+ set {
977
+ self.__implementation.onIndoorBuildingFocused = { () -> ((_ indoorBuilding: RNIndoorBuilding) -> Void)? in
978
+ if bridge.has_value_std__optional_std__function_void_const_RNIndoorBuilding_____indoorBuilding______(newValue) {
979
+ let __unwrapped = bridge.get_std__optional_std__function_void_const_RNIndoorBuilding_____indoorBuilding______(newValue)
980
+ return { () -> (RNIndoorBuilding) -> Void in
981
+ let __wrappedFunction = bridge.wrap_Func_void_RNIndoorBuilding(__unwrapped)
982
+ return { (__indoorBuilding: RNIndoorBuilding) -> Void in
983
+ __wrappedFunction.call(__indoorBuilding)
984
+ }
985
+ }()
986
+ } else {
987
+ return nil
988
+ }
989
+ }()
990
+ }
991
+ }
992
+
993
+ public final var onIndoorLevelActivated: bridge.std__optional_std__function_void_const_RNIndoorLevel_____indoorLevel______ {
994
+ @inline(__always)
995
+ get {
996
+ return { () -> bridge.std__optional_std__function_void_const_RNIndoorLevel_____indoorLevel______ in
997
+ if let __unwrappedValue = self.__implementation.onIndoorLevelActivated {
998
+ return bridge.create_std__optional_std__function_void_const_RNIndoorLevel_____indoorLevel______({ () -> bridge.Func_void_RNIndoorLevel in
999
+ let __closureWrapper = Func_void_RNIndoorLevel(__unwrappedValue)
1000
+ return bridge.create_Func_void_RNIndoorLevel(__closureWrapper.toUnsafe())
1001
+ }())
1002
+ } else {
1003
+ return .init()
1004
+ }
1005
+ }()
1006
+ }
1007
+ @inline(__always)
1008
+ set {
1009
+ self.__implementation.onIndoorLevelActivated = { () -> ((_ indoorLevel: RNIndoorLevel) -> Void)? in
1010
+ if bridge.has_value_std__optional_std__function_void_const_RNIndoorLevel_____indoorLevel______(newValue) {
1011
+ let __unwrapped = bridge.get_std__optional_std__function_void_const_RNIndoorLevel_____indoorLevel______(newValue)
1012
+ return { () -> (RNIndoorLevel) -> Void in
1013
+ let __wrappedFunction = bridge.wrap_Func_void_RNIndoorLevel(__unwrapped)
1014
+ return { (__indoorLevel: RNIndoorLevel) -> Void in
1015
+ __wrappedFunction.call(__indoorLevel)
1016
+ }
1017
+ }()
1018
+ } else {
1019
+ return nil
1020
+ }
1021
+ }()
1022
+ }
1023
+ }
1024
+
961
1025
  public final var onCameraChangeStart: bridge.std__optional_std__function_void_const_RNRegion_____region_____const_RNCamera_____camera_____bool____isGesture______ {
962
1026
  @inline(__always)
963
1027
  get {
@@ -0,0 +1,116 @@
1
+ ///
2
+ /// RNIndoorBuilding.swift
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
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `RNIndoorBuilding`, backed by a C++ struct.
12
+ */
13
+ public typealias RNIndoorBuilding = margelo.nitro.rngooglemapsplus.RNIndoorBuilding
14
+
15
+ public extension RNIndoorBuilding {
16
+ private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `RNIndoorBuilding`.
20
+ */
21
+ init(activeLevelIndex: Double?, defaultLevelIndex: Double?, levels: [RNIndoorLevel], underground: Bool?) {
22
+ self.init({ () -> bridge.std__optional_double_ in
23
+ if let __unwrappedValue = activeLevelIndex {
24
+ return bridge.create_std__optional_double_(__unwrappedValue)
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_double_ in
29
+ if let __unwrappedValue = defaultLevelIndex {
30
+ return bridge.create_std__optional_double_(__unwrappedValue)
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), { () -> bridge.std__vector_RNIndoorLevel_ in
35
+ var __vector = bridge.create_std__vector_RNIndoorLevel_(levels.count)
36
+ for __item in levels {
37
+ __vector.push_back(__item)
38
+ }
39
+ return __vector
40
+ }(), { () -> bridge.std__optional_bool_ in
41
+ if let __unwrappedValue = underground {
42
+ return bridge.create_std__optional_bool_(__unwrappedValue)
43
+ } else {
44
+ return .init()
45
+ }
46
+ }())
47
+ }
48
+
49
+ var activeLevelIndex: Double? {
50
+ @inline(__always)
51
+ get {
52
+ return self.__activeLevelIndex.value
53
+ }
54
+ @inline(__always)
55
+ set {
56
+ self.__activeLevelIndex = { () -> bridge.std__optional_double_ in
57
+ if let __unwrappedValue = newValue {
58
+ return bridge.create_std__optional_double_(__unwrappedValue)
59
+ } else {
60
+ return .init()
61
+ }
62
+ }()
63
+ }
64
+ }
65
+
66
+ var defaultLevelIndex: Double? {
67
+ @inline(__always)
68
+ get {
69
+ return self.__defaultLevelIndex.value
70
+ }
71
+ @inline(__always)
72
+ set {
73
+ self.__defaultLevelIndex = { () -> bridge.std__optional_double_ in
74
+ if let __unwrappedValue = newValue {
75
+ return bridge.create_std__optional_double_(__unwrappedValue)
76
+ } else {
77
+ return .init()
78
+ }
79
+ }()
80
+ }
81
+ }
82
+
83
+ var levels: [RNIndoorLevel] {
84
+ @inline(__always)
85
+ get {
86
+ return self.__levels.map({ __item in __item })
87
+ }
88
+ @inline(__always)
89
+ set {
90
+ self.__levels = { () -> bridge.std__vector_RNIndoorLevel_ in
91
+ var __vector = bridge.create_std__vector_RNIndoorLevel_(newValue.count)
92
+ for __item in newValue {
93
+ __vector.push_back(__item)
94
+ }
95
+ return __vector
96
+ }()
97
+ }
98
+ }
99
+
100
+ var underground: Bool? {
101
+ @inline(__always)
102
+ get {
103
+ return self.__underground.value
104
+ }
105
+ @inline(__always)
106
+ set {
107
+ self.__underground = { () -> bridge.std__optional_bool_ in
108
+ if let __unwrappedValue = newValue {
109
+ return bridge.create_std__optional_bool_(__unwrappedValue)
110
+ } else {
111
+ return .init()
112
+ }
113
+ }()
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,118 @@
1
+ ///
2
+ /// RNIndoorLevel.swift
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
+ import NitroModules
9
+
10
+ /**
11
+ * Represents an instance of `RNIndoorLevel`, backed by a C++ struct.
12
+ */
13
+ public typealias RNIndoorLevel = margelo.nitro.rngooglemapsplus.RNIndoorLevel
14
+
15
+ public extension RNIndoorLevel {
16
+ private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
17
+
18
+ /**
19
+ * Create a new instance of `RNIndoorLevel`.
20
+ */
21
+ init(index: Double, name: String?, shortName: String?, active: Bool?) {
22
+ self.init(index, { () -> bridge.std__optional_std__string_ in
23
+ if let __unwrappedValue = name {
24
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
25
+ } else {
26
+ return .init()
27
+ }
28
+ }(), { () -> bridge.std__optional_std__string_ in
29
+ if let __unwrappedValue = shortName {
30
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
31
+ } else {
32
+ return .init()
33
+ }
34
+ }(), { () -> bridge.std__optional_bool_ in
35
+ if let __unwrappedValue = active {
36
+ return bridge.create_std__optional_bool_(__unwrappedValue)
37
+ } else {
38
+ return .init()
39
+ }
40
+ }())
41
+ }
42
+
43
+ var index: Double {
44
+ @inline(__always)
45
+ get {
46
+ return self.__index
47
+ }
48
+ @inline(__always)
49
+ set {
50
+ self.__index = newValue
51
+ }
52
+ }
53
+
54
+ var name: String? {
55
+ @inline(__always)
56
+ get {
57
+ return { () -> String? in
58
+ if bridge.has_value_std__optional_std__string_(self.__name) {
59
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__name)
60
+ return String(__unwrapped)
61
+ } else {
62
+ return nil
63
+ }
64
+ }()
65
+ }
66
+ @inline(__always)
67
+ set {
68
+ self.__name = { () -> bridge.std__optional_std__string_ in
69
+ if let __unwrappedValue = newValue {
70
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
71
+ } else {
72
+ return .init()
73
+ }
74
+ }()
75
+ }
76
+ }
77
+
78
+ var shortName: String? {
79
+ @inline(__always)
80
+ get {
81
+ return { () -> String? in
82
+ if bridge.has_value_std__optional_std__string_(self.__shortName) {
83
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__shortName)
84
+ return String(__unwrapped)
85
+ } else {
86
+ return nil
87
+ }
88
+ }()
89
+ }
90
+ @inline(__always)
91
+ set {
92
+ self.__shortName = { () -> bridge.std__optional_std__string_ in
93
+ if let __unwrappedValue = newValue {
94
+ return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
95
+ } else {
96
+ return .init()
97
+ }
98
+ }()
99
+ }
100
+ }
101
+
102
+ var active: Bool? {
103
+ @inline(__always)
104
+ get {
105
+ return self.__active.value
106
+ }
107
+ @inline(__always)
108
+ set {
109
+ self.__active = { () -> bridge.std__optional_bool_ in
110
+ if let __unwrappedValue = newValue {
111
+ return bridge.create_std__optional_bool_(__unwrappedValue)
112
+ } else {
113
+ return .init()
114
+ }
115
+ }()
116
+ }
117
+ }
118
+ }
@@ -74,6 +74,10 @@ namespace margelo::nitro::rngooglemapsplus {
74
74
  prototype.registerHybridSetter("onMarkerDrag", &HybridRNGoogleMapsPlusViewSpec::setOnMarkerDrag);
75
75
  prototype.registerHybridGetter("onMarkerDragEnd", &HybridRNGoogleMapsPlusViewSpec::getOnMarkerDragEnd);
76
76
  prototype.registerHybridSetter("onMarkerDragEnd", &HybridRNGoogleMapsPlusViewSpec::setOnMarkerDragEnd);
77
+ prototype.registerHybridGetter("onIndoorBuildingFocused", &HybridRNGoogleMapsPlusViewSpec::getOnIndoorBuildingFocused);
78
+ prototype.registerHybridSetter("onIndoorBuildingFocused", &HybridRNGoogleMapsPlusViewSpec::setOnIndoorBuildingFocused);
79
+ prototype.registerHybridGetter("onIndoorLevelActivated", &HybridRNGoogleMapsPlusViewSpec::getOnIndoorLevelActivated);
80
+ prototype.registerHybridSetter("onIndoorLevelActivated", &HybridRNGoogleMapsPlusViewSpec::setOnIndoorLevelActivated);
77
81
  prototype.registerHybridGetter("onCameraChangeStart", &HybridRNGoogleMapsPlusViewSpec::getOnCameraChangeStart);
78
82
  prototype.registerHybridSetter("onCameraChangeStart", &HybridRNGoogleMapsPlusViewSpec::setOnCameraChangeStart);
79
83
  prototype.registerHybridGetter("onCameraChange", &HybridRNGoogleMapsPlusViewSpec::getOnCameraChange);
@@ -47,6 +47,10 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocation; }
47
47
  namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
48
48
  // Forward declaration of `RNLatLng` to properly resolve imports.
49
49
  namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
50
+ // Forward declaration of `RNIndoorBuilding` to properly resolve imports.
51
+ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorBuilding; }
52
+ // Forward declaration of `RNIndoorLevel` to properly resolve imports.
53
+ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
50
54
  // Forward declaration of `RNRegion` to properly resolve imports.
51
55
  namespace margelo::nitro::rngooglemapsplus { struct RNRegion; }
52
56
  // Forward declaration of `RNCamera` to properly resolve imports.
@@ -75,6 +79,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
75
79
  #include "RNLocation.hpp"
76
80
  #include "RNLocationErrorCode.hpp"
77
81
  #include "RNLatLng.hpp"
82
+ #include "RNIndoorBuilding.hpp"
83
+ #include "RNIndoorLevel.hpp"
78
84
  #include "RNRegion.hpp"
79
85
  #include "RNCamera.hpp"
80
86
  #include "RNLocationPermissionResult.hpp"
@@ -167,6 +173,10 @@ namespace margelo::nitro::rngooglemapsplus {
167
173
  virtual void setOnMarkerDrag(const std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>& onMarkerDrag) = 0;
168
174
  virtual std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>> getOnMarkerDragEnd() = 0;
169
175
  virtual void setOnMarkerDragEnd(const std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>& onMarkerDragEnd) = 0;
176
+ virtual std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>> getOnIndoorBuildingFocused() = 0;
177
+ virtual void setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) = 0;
178
+ virtual std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> getOnIndoorLevelActivated() = 0;
179
+ virtual void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) = 0;
170
180
  virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() = 0;
171
181
  virtual void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) = 0;
172
182
  virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() = 0;
@@ -0,0 +1,82 @@
1
+ ///
2
+ /// RNIndoorBuilding.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 `RNIndoorLevel` to properly resolve imports.
22
+ namespace margelo::nitro::rngooglemapsplus { struct RNIndoorLevel; }
23
+
24
+ #include <optional>
25
+ #include "RNIndoorLevel.hpp"
26
+ #include <vector>
27
+
28
+ namespace margelo::nitro::rngooglemapsplus {
29
+
30
+ /**
31
+ * A struct which can be represented as a JavaScript object (RNIndoorBuilding).
32
+ */
33
+ struct RNIndoorBuilding {
34
+ public:
35
+ std::optional<double> activeLevelIndex SWIFT_PRIVATE;
36
+ std::optional<double> defaultLevelIndex SWIFT_PRIVATE;
37
+ std::vector<RNIndoorLevel> levels SWIFT_PRIVATE;
38
+ std::optional<bool> underground SWIFT_PRIVATE;
39
+
40
+ public:
41
+ RNIndoorBuilding() = default;
42
+ explicit RNIndoorBuilding(std::optional<double> activeLevelIndex, std::optional<double> defaultLevelIndex, std::vector<RNIndoorLevel> levels, std::optional<bool> underground): activeLevelIndex(activeLevelIndex), defaultLevelIndex(defaultLevelIndex), levels(levels), underground(underground) {}
43
+ };
44
+
45
+ } // namespace margelo::nitro::rngooglemapsplus
46
+
47
+ namespace margelo::nitro {
48
+
49
+ // C++ RNIndoorBuilding <> JS RNIndoorBuilding (object)
50
+ template <>
51
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIndoorBuilding> final {
52
+ static inline margelo::nitro::rngooglemapsplus::RNIndoorBuilding fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
53
+ jsi::Object obj = arg.asObject(runtime);
54
+ return margelo::nitro::rngooglemapsplus::RNIndoorBuilding(
55
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "activeLevelIndex")),
56
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "defaultLevelIndex")),
57
+ JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNIndoorLevel>>::fromJSI(runtime, obj.getProperty(runtime, "levels")),
58
+ JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "underground"))
59
+ );
60
+ }
61
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNIndoorBuilding& arg) {
62
+ jsi::Object obj(runtime);
63
+ obj.setProperty(runtime, "activeLevelIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.activeLevelIndex));
64
+ obj.setProperty(runtime, "defaultLevelIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.defaultLevelIndex));
65
+ obj.setProperty(runtime, "levels", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNIndoorLevel>>::toJSI(runtime, arg.levels));
66
+ obj.setProperty(runtime, "underground", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.underground));
67
+ return obj;
68
+ }
69
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
70
+ if (!value.isObject()) {
71
+ return false;
72
+ }
73
+ jsi::Object obj = value.getObject(runtime);
74
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "activeLevelIndex"))) return false;
75
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "defaultLevelIndex"))) return false;
76
+ if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNIndoorLevel>>::canConvert(runtime, obj.getProperty(runtime, "levels"))) return false;
77
+ if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "underground"))) return false;
78
+ return true;
79
+ }
80
+ };
81
+
82
+ } // namespace margelo::nitro
@@ -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
@@ -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.2",
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,8 @@ import type {
24
24
  RNMapZoomConfig,
25
25
  RNHeatmap,
26
26
  RNKMLayer,
27
+ RNIndoorBuilding,
28
+ RNIndoorLevel,
27
29
  } from './types';
28
30
 
29
31
  export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
@@ -57,6 +59,8 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
57
59
  onMarkerDragStart?: (id: string | undefined, location: RNLatLng) => void;
58
60
  onMarkerDrag?: (id: string | undefined, location: RNLatLng) => void;
59
61
  onMarkerDragEnd?: (id: string | undefined, location: RNLatLng) => void;
62
+ onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
63
+ onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
60
64
  onCameraChangeStart?: (
61
65
  region: RNRegion,
62
66
  camera: RNCamera,
package/src/types.ts CHANGED
@@ -210,6 +210,20 @@ export type RNKMLayer = {
210
210
  kmlString: string;
211
211
  };
212
212
 
213
+ export type RNIndoorBuilding = {
214
+ activeLevelIndex?: number;
215
+ defaultLevelIndex?: number;
216
+ levels: RNIndoorLevel[];
217
+ underground?: boolean;
218
+ };
219
+
220
+ export type RNIndoorLevel = {
221
+ index: number;
222
+ name?: string;
223
+ shortName?: string;
224
+ active?: boolean;
225
+ };
226
+
213
227
  export type RNLocationConfig = {
214
228
  android?: RNAndroidLocationConfig;
215
229
  ios?: RNIOSLocationConfig;