react-native-google-maps-plus 1.0.3-dev.1 → 1.1.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +122 -29
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +44 -44
- package/android/src/main/java/com/rngooglemapsplus/{MapCircle.kt → MapCircleBuilder.kt} +2 -12
- package/android/src/main/java/com/rngooglemapsplus/{MapMarker.kt → MapMarkerBuilder.kt} +1 -1
- package/android/src/main/java/com/rngooglemapsplus/{MapPolygon.kt → MapPolygonBuilder.kt} +2 -18
- package/android/src/main/java/com/rngooglemapsplus/{MapPolyline.kt → MapPolylineBuilder.kt.kt} +2 -19
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +43 -54
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNCameraExtension.kt +19 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLocationPriorityExtension.kt +12 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNMapCircleExtension.kt +14 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolygonExtension.kt +20 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNPolylineExtension.kt +21 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNUserInterfaceExtension.kt +12 -0
- package/android/src/main/java/com/rngooglemapsplus/{Color.kt → extensions/StringExtension.kt} +1 -1
- package/android/src/main/java/com/rngooglemapsplus/extensions/ThrowableExtension.kt +38 -0
- package/ios/GoogleMapViewImpl.swift +165 -22
- package/ios/LocationHandler.swift +29 -69
- package/ios/MapCircleBuilder.swift +20 -0
- package/ios/{MapMarker.swift → MapMarkerBuilder.swift} +1 -25
- package/ios/MapPolygonBuilder.swift +20 -0
- package/ios/MapPolylineBuilder.swift +24 -0
- package/ios/RNGoogleMapsPlusView.swift +63 -115
- package/ios/extensions/RNCamera+Extension.swift +22 -0
- package/ios/{MapCircle.swift → extensions/RNCircle+Extension.swift} +0 -19
- package/ios/extensions/RNIOSLocationAccuracy+Extensions.swift +19 -0
- package/ios/extensions/RNMarker+Extension.swift +24 -0
- package/ios/{MapPolygon.swift → extensions/RNPolygon+Extension.swift.swift} +0 -19
- package/ios/{MapPolyline.swift → extensions/RNPolyline+Extension.swift.swift} +16 -39
- package/ios/extensions/RNUserInterface+Extension.swift +16 -0
- package/lib/module/types.js +14 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +5 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +39 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +60 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +8 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +63 -0
- package/nitrogen/generated/android/c++/JRNAndroidLocationPriority.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNIOSLocationAccuracy.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +59 -0
- package/nitrogen/generated/android/c++/JRNInitialProps.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +65 -0
- package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +93 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +16 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationConfig.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationPriority.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationAccuracy.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +59 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +108 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +46 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +20 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +82 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationConfig.swift +93 -0
- package/nitrogen/generated/ios/swift/RNAndroidLocationPriority.swift +48 -0
- package/nitrogen/generated/ios/swift/RNIOSLocationAccuracy.swift +48 -0
- package/nitrogen/generated/ios/swift/RNIOSLocationConfig.swift +70 -0
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +6 -6
- package/nitrogen/generated/ios/swift/RNLocationConfig.swift +84 -0
- package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +277 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +8 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +14 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationConfig.hpp +77 -0
- package/nitrogen/generated/shared/c++/RNAndroidLocationPriority.hpp +64 -0
- package/nitrogen/generated/shared/c++/RNIOSLocationAccuracy.hpp +64 -0
- package/nitrogen/generated/shared/c++/RNIOSLocationConfig.hpp +73 -0
- package/nitrogen/generated/shared/c++/RNInitialProps.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNLocationConfig.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNMapUiSettings.hpp +107 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +48 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +6 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +4 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +6 -0
- package/src/types.ts +44 -1
- /package/ios/{Color.swift → extensions/String+Extensions.swift} +0 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapUiSettings.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 `RNMapUiSettings`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNMapUiSettings = margelo.nitro.rngooglemapsplus.RNMapUiSettings
|
|
14
|
+
|
|
15
|
+
public extension RNMapUiSettings {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNMapUiSettings`.
|
|
20
|
+
*/
|
|
21
|
+
init(allGesturesEnabled: Bool?, compassEnabled: Bool?, indoorLevelPickerEnabled: Bool?, mapToolbarEnabled: Bool?, myLocationButtonEnabled: Bool?, rotateEnabled: Bool?, scrollEnabled: Bool?, scrollDuringRotateOrZoomEnabled: Bool?, tiltEnabled: Bool?, zoomControlsEnabled: Bool?, zoomGesturesEnabled: Bool?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_bool_ in
|
|
23
|
+
if let __unwrappedValue = allGesturesEnabled {
|
|
24
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
29
|
+
if let __unwrappedValue = compassEnabled {
|
|
30
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
35
|
+
if let __unwrappedValue = indoorLevelPickerEnabled {
|
|
36
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
41
|
+
if let __unwrappedValue = mapToolbarEnabled {
|
|
42
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
47
|
+
if let __unwrappedValue = myLocationButtonEnabled {
|
|
48
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
53
|
+
if let __unwrappedValue = rotateEnabled {
|
|
54
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
59
|
+
if let __unwrappedValue = scrollEnabled {
|
|
60
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
65
|
+
if let __unwrappedValue = scrollDuringRotateOrZoomEnabled {
|
|
66
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
70
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
71
|
+
if let __unwrappedValue = tiltEnabled {
|
|
72
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
77
|
+
if let __unwrappedValue = zoomControlsEnabled {
|
|
78
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
83
|
+
if let __unwrappedValue = zoomGesturesEnabled {
|
|
84
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
85
|
+
} else {
|
|
86
|
+
return .init()
|
|
87
|
+
}
|
|
88
|
+
}())
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var allGesturesEnabled: Bool? {
|
|
92
|
+
@inline(__always)
|
|
93
|
+
get {
|
|
94
|
+
return self.__allGesturesEnabled.value
|
|
95
|
+
}
|
|
96
|
+
@inline(__always)
|
|
97
|
+
set {
|
|
98
|
+
self.__allGesturesEnabled = { () -> bridge.std__optional_bool_ in
|
|
99
|
+
if let __unwrappedValue = newValue {
|
|
100
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
101
|
+
} else {
|
|
102
|
+
return .init()
|
|
103
|
+
}
|
|
104
|
+
}()
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var compassEnabled: Bool? {
|
|
109
|
+
@inline(__always)
|
|
110
|
+
get {
|
|
111
|
+
return self.__compassEnabled.value
|
|
112
|
+
}
|
|
113
|
+
@inline(__always)
|
|
114
|
+
set {
|
|
115
|
+
self.__compassEnabled = { () -> bridge.std__optional_bool_ in
|
|
116
|
+
if let __unwrappedValue = newValue {
|
|
117
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
118
|
+
} else {
|
|
119
|
+
return .init()
|
|
120
|
+
}
|
|
121
|
+
}()
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
var indoorLevelPickerEnabled: Bool? {
|
|
126
|
+
@inline(__always)
|
|
127
|
+
get {
|
|
128
|
+
return self.__indoorLevelPickerEnabled.value
|
|
129
|
+
}
|
|
130
|
+
@inline(__always)
|
|
131
|
+
set {
|
|
132
|
+
self.__indoorLevelPickerEnabled = { () -> bridge.std__optional_bool_ in
|
|
133
|
+
if let __unwrappedValue = newValue {
|
|
134
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
135
|
+
} else {
|
|
136
|
+
return .init()
|
|
137
|
+
}
|
|
138
|
+
}()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var mapToolbarEnabled: Bool? {
|
|
143
|
+
@inline(__always)
|
|
144
|
+
get {
|
|
145
|
+
return self.__mapToolbarEnabled.value
|
|
146
|
+
}
|
|
147
|
+
@inline(__always)
|
|
148
|
+
set {
|
|
149
|
+
self.__mapToolbarEnabled = { () -> bridge.std__optional_bool_ in
|
|
150
|
+
if let __unwrappedValue = newValue {
|
|
151
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
152
|
+
} else {
|
|
153
|
+
return .init()
|
|
154
|
+
}
|
|
155
|
+
}()
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
var myLocationButtonEnabled: Bool? {
|
|
160
|
+
@inline(__always)
|
|
161
|
+
get {
|
|
162
|
+
return self.__myLocationButtonEnabled.value
|
|
163
|
+
}
|
|
164
|
+
@inline(__always)
|
|
165
|
+
set {
|
|
166
|
+
self.__myLocationButtonEnabled = { () -> bridge.std__optional_bool_ in
|
|
167
|
+
if let __unwrappedValue = newValue {
|
|
168
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
169
|
+
} else {
|
|
170
|
+
return .init()
|
|
171
|
+
}
|
|
172
|
+
}()
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
var rotateEnabled: Bool? {
|
|
177
|
+
@inline(__always)
|
|
178
|
+
get {
|
|
179
|
+
return self.__rotateEnabled.value
|
|
180
|
+
}
|
|
181
|
+
@inline(__always)
|
|
182
|
+
set {
|
|
183
|
+
self.__rotateEnabled = { () -> bridge.std__optional_bool_ in
|
|
184
|
+
if let __unwrappedValue = newValue {
|
|
185
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
186
|
+
} else {
|
|
187
|
+
return .init()
|
|
188
|
+
}
|
|
189
|
+
}()
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
var scrollEnabled: Bool? {
|
|
194
|
+
@inline(__always)
|
|
195
|
+
get {
|
|
196
|
+
return self.__scrollEnabled.value
|
|
197
|
+
}
|
|
198
|
+
@inline(__always)
|
|
199
|
+
set {
|
|
200
|
+
self.__scrollEnabled = { () -> bridge.std__optional_bool_ in
|
|
201
|
+
if let __unwrappedValue = newValue {
|
|
202
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
203
|
+
} else {
|
|
204
|
+
return .init()
|
|
205
|
+
}
|
|
206
|
+
}()
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
var scrollDuringRotateOrZoomEnabled: Bool? {
|
|
211
|
+
@inline(__always)
|
|
212
|
+
get {
|
|
213
|
+
return self.__scrollDuringRotateOrZoomEnabled.value
|
|
214
|
+
}
|
|
215
|
+
@inline(__always)
|
|
216
|
+
set {
|
|
217
|
+
self.__scrollDuringRotateOrZoomEnabled = { () -> bridge.std__optional_bool_ in
|
|
218
|
+
if let __unwrappedValue = newValue {
|
|
219
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
220
|
+
} else {
|
|
221
|
+
return .init()
|
|
222
|
+
}
|
|
223
|
+
}()
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
var tiltEnabled: Bool? {
|
|
228
|
+
@inline(__always)
|
|
229
|
+
get {
|
|
230
|
+
return self.__tiltEnabled.value
|
|
231
|
+
}
|
|
232
|
+
@inline(__always)
|
|
233
|
+
set {
|
|
234
|
+
self.__tiltEnabled = { () -> bridge.std__optional_bool_ in
|
|
235
|
+
if let __unwrappedValue = newValue {
|
|
236
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
237
|
+
} else {
|
|
238
|
+
return .init()
|
|
239
|
+
}
|
|
240
|
+
}()
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var zoomControlsEnabled: Bool? {
|
|
245
|
+
@inline(__always)
|
|
246
|
+
get {
|
|
247
|
+
return self.__zoomControlsEnabled.value
|
|
248
|
+
}
|
|
249
|
+
@inline(__always)
|
|
250
|
+
set {
|
|
251
|
+
self.__zoomControlsEnabled = { () -> bridge.std__optional_bool_ in
|
|
252
|
+
if let __unwrappedValue = newValue {
|
|
253
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
254
|
+
} else {
|
|
255
|
+
return .init()
|
|
256
|
+
}
|
|
257
|
+
}()
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
var zoomGesturesEnabled: Bool? {
|
|
262
|
+
@inline(__always)
|
|
263
|
+
get {
|
|
264
|
+
return self.__zoomGesturesEnabled.value
|
|
265
|
+
}
|
|
266
|
+
@inline(__always)
|
|
267
|
+
set {
|
|
268
|
+
self.__zoomGesturesEnabled = { () -> bridge.std__optional_bool_ in
|
|
269
|
+
if let __unwrappedValue = newValue {
|
|
270
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
271
|
+
} else {
|
|
272
|
+
return .init()
|
|
273
|
+
}
|
|
274
|
+
}()
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
@@ -16,10 +16,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
16
16
|
registerHybrids(this, [](Prototype& prototype) {
|
|
17
17
|
prototype.registerHybridGetter("initialProps", &HybridRNGoogleMapsPlusViewSpec::getInitialProps);
|
|
18
18
|
prototype.registerHybridSetter("initialProps", &HybridRNGoogleMapsPlusViewSpec::setInitialProps);
|
|
19
|
+
prototype.registerHybridGetter("uiSettings", &HybridRNGoogleMapsPlusViewSpec::getUiSettings);
|
|
20
|
+
prototype.registerHybridSetter("uiSettings", &HybridRNGoogleMapsPlusViewSpec::setUiSettings);
|
|
21
|
+
prototype.registerHybridGetter("myLocationEnabled", &HybridRNGoogleMapsPlusViewSpec::getMyLocationEnabled);
|
|
22
|
+
prototype.registerHybridSetter("myLocationEnabled", &HybridRNGoogleMapsPlusViewSpec::setMyLocationEnabled);
|
|
19
23
|
prototype.registerHybridGetter("buildingEnabled", &HybridRNGoogleMapsPlusViewSpec::getBuildingEnabled);
|
|
20
24
|
prototype.registerHybridSetter("buildingEnabled", &HybridRNGoogleMapsPlusViewSpec::setBuildingEnabled);
|
|
21
25
|
prototype.registerHybridGetter("trafficEnabled", &HybridRNGoogleMapsPlusViewSpec::getTrafficEnabled);
|
|
22
26
|
prototype.registerHybridSetter("trafficEnabled", &HybridRNGoogleMapsPlusViewSpec::setTrafficEnabled);
|
|
27
|
+
prototype.registerHybridGetter("indoorEnabled", &HybridRNGoogleMapsPlusViewSpec::getIndoorEnabled);
|
|
28
|
+
prototype.registerHybridSetter("indoorEnabled", &HybridRNGoogleMapsPlusViewSpec::setIndoorEnabled);
|
|
23
29
|
prototype.registerHybridGetter("customMapStyle", &HybridRNGoogleMapsPlusViewSpec::getCustomMapStyle);
|
|
24
30
|
prototype.registerHybridSetter("customMapStyle", &HybridRNGoogleMapsPlusViewSpec::setCustomMapStyle);
|
|
25
31
|
prototype.registerHybridGetter("userInterfaceStyle", &HybridRNGoogleMapsPlusViewSpec::getUserInterfaceStyle);
|
|
@@ -40,6 +46,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
40
46
|
prototype.registerHybridSetter("polylines", &HybridRNGoogleMapsPlusViewSpec::setPolylines);
|
|
41
47
|
prototype.registerHybridGetter("circles", &HybridRNGoogleMapsPlusViewSpec::getCircles);
|
|
42
48
|
prototype.registerHybridSetter("circles", &HybridRNGoogleMapsPlusViewSpec::setCircles);
|
|
49
|
+
prototype.registerHybridGetter("locationConfig", &HybridRNGoogleMapsPlusViewSpec::getLocationConfig);
|
|
50
|
+
prototype.registerHybridSetter("locationConfig", &HybridRNGoogleMapsPlusViewSpec::setLocationConfig);
|
|
43
51
|
prototype.registerHybridGetter("onMapError", &HybridRNGoogleMapsPlusViewSpec::getOnMapError);
|
|
44
52
|
prototype.registerHybridSetter("onMapError", &HybridRNGoogleMapsPlusViewSpec::setOnMapError);
|
|
45
53
|
prototype.registerHybridGetter("onMapReady", &HybridRNGoogleMapsPlusViewSpec::getOnMapReady);
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
// Forward declaration of `RNInitialProps` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
18
|
+
// Forward declaration of `RNMapUiSettings` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMapUiSettings; }
|
|
18
20
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
20
22
|
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
@@ -29,6 +31,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolygon; }
|
|
|
29
31
|
namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
|
|
30
32
|
// Forward declaration of `RNCircle` to properly resolve imports.
|
|
31
33
|
namespace margelo::nitro::rngooglemapsplus { struct RNCircle; }
|
|
34
|
+
// Forward declaration of `RNLocationConfig` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
|
|
32
36
|
// Forward declaration of `RNMapErrorCode` to properly resolve imports.
|
|
33
37
|
namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
|
|
34
38
|
// Forward declaration of `RNLocation` to properly resolve imports.
|
|
@@ -46,6 +50,7 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
|
|
|
46
50
|
|
|
47
51
|
#include "RNInitialProps.hpp"
|
|
48
52
|
#include <optional>
|
|
53
|
+
#include "RNMapUiSettings.hpp"
|
|
49
54
|
#include <string>
|
|
50
55
|
#include "RNUserInterfaceStyle.hpp"
|
|
51
56
|
#include "RNMapPadding.hpp"
|
|
@@ -55,6 +60,7 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
|
|
|
55
60
|
#include "RNPolygon.hpp"
|
|
56
61
|
#include "RNPolyline.hpp"
|
|
57
62
|
#include "RNCircle.hpp"
|
|
63
|
+
#include "RNLocationConfig.hpp"
|
|
58
64
|
#include "RNMapErrorCode.hpp"
|
|
59
65
|
#include <functional>
|
|
60
66
|
#include "RNLocation.hpp"
|
|
@@ -94,10 +100,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
94
100
|
// Properties
|
|
95
101
|
virtual std::optional<RNInitialProps> getInitialProps() = 0;
|
|
96
102
|
virtual void setInitialProps(const std::optional<RNInitialProps>& initialProps) = 0;
|
|
103
|
+
virtual std::optional<RNMapUiSettings> getUiSettings() = 0;
|
|
104
|
+
virtual void setUiSettings(const std::optional<RNMapUiSettings>& uiSettings) = 0;
|
|
105
|
+
virtual std::optional<bool> getMyLocationEnabled() = 0;
|
|
106
|
+
virtual void setMyLocationEnabled(std::optional<bool> myLocationEnabled) = 0;
|
|
97
107
|
virtual std::optional<bool> getBuildingEnabled() = 0;
|
|
98
108
|
virtual void setBuildingEnabled(std::optional<bool> buildingEnabled) = 0;
|
|
99
109
|
virtual std::optional<bool> getTrafficEnabled() = 0;
|
|
100
110
|
virtual void setTrafficEnabled(std::optional<bool> trafficEnabled) = 0;
|
|
111
|
+
virtual std::optional<bool> getIndoorEnabled() = 0;
|
|
112
|
+
virtual void setIndoorEnabled(std::optional<bool> indoorEnabled) = 0;
|
|
101
113
|
virtual std::optional<std::string> getCustomMapStyle() = 0;
|
|
102
114
|
virtual void setCustomMapStyle(const std::optional<std::string>& customMapStyle) = 0;
|
|
103
115
|
virtual std::optional<RNUserInterfaceStyle> getUserInterfaceStyle() = 0;
|
|
@@ -118,6 +130,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
118
130
|
virtual void setPolylines(const std::optional<std::vector<RNPolyline>>& polylines) = 0;
|
|
119
131
|
virtual std::optional<std::vector<RNCircle>> getCircles() = 0;
|
|
120
132
|
virtual void setCircles(const std::optional<std::vector<RNCircle>>& circles) = 0;
|
|
133
|
+
virtual std::optional<RNLocationConfig> getLocationConfig() = 0;
|
|
134
|
+
virtual void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) = 0;
|
|
121
135
|
virtual std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() = 0;
|
|
122
136
|
virtual void setOnMapError(const std::optional<std::function<void(RNMapErrorCode /* error */)>>& onMapError) = 0;
|
|
123
137
|
virtual std::optional<std::function<void(bool /* ready */)>> getOnMapReady() = 0;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNAndroidLocationConfig.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 `RNAndroidLocationPriority` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNAndroidLocationPriority; }
|
|
23
|
+
|
|
24
|
+
#include "RNAndroidLocationPriority.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (RNAndroidLocationConfig).
|
|
31
|
+
*/
|
|
32
|
+
struct RNAndroidLocationConfig {
|
|
33
|
+
public:
|
|
34
|
+
std::optional<RNAndroidLocationPriority> priority SWIFT_PRIVATE;
|
|
35
|
+
std::optional<double> interval SWIFT_PRIVATE;
|
|
36
|
+
std::optional<double> minUpdateInterval SWIFT_PRIVATE;
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
RNAndroidLocationConfig() = default;
|
|
40
|
+
explicit RNAndroidLocationConfig(std::optional<RNAndroidLocationPriority> priority, std::optional<double> interval, std::optional<double> minUpdateInterval): priority(priority), interval(interval), minUpdateInterval(minUpdateInterval) {}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
44
|
+
|
|
45
|
+
namespace margelo::nitro {
|
|
46
|
+
|
|
47
|
+
// C++ RNAndroidLocationConfig <> JS RNAndroidLocationConfig (object)
|
|
48
|
+
template <>
|
|
49
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig> final {
|
|
50
|
+
static inline margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
52
|
+
return margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig(
|
|
53
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>>::fromJSI(runtime, obj.getProperty(runtime, "priority")),
|
|
54
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "interval")),
|
|
55
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "minUpdateInterval"))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNAndroidLocationConfig& arg) {
|
|
59
|
+
jsi::Object obj(runtime);
|
|
60
|
+
obj.setProperty(runtime, "priority", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>>::toJSI(runtime, arg.priority));
|
|
61
|
+
obj.setProperty(runtime, "interval", JSIConverter<std::optional<double>>::toJSI(runtime, arg.interval));
|
|
62
|
+
obj.setProperty(runtime, "minUpdateInterval", JSIConverter<std::optional<double>>::toJSI(runtime, arg.minUpdateInterval));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>>::canConvert(runtime, obj.getProperty(runtime, "priority"))) return false;
|
|
71
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "interval"))) return false;
|
|
72
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "minUpdateInterval"))) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNAndroidLocationPriority.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An enum which can be represented as a JavaScript enum (RNAndroidLocationPriority).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNAndroidLocationPriority {
|
|
27
|
+
PRIORITY_HIGH_ACCURACY SWIFT_NAME(priorityHighAccuracy) = 0,
|
|
28
|
+
PRIORITY_BALANCED_POWER_ACCURACY SWIFT_NAME(priorityBalancedPowerAccuracy) = 1,
|
|
29
|
+
PRIORITY_LOW_POWER SWIFT_NAME(priorityLowPower) = 2,
|
|
30
|
+
PRIORITY_PASSIVE SWIFT_NAME(priorityPassive) = 3,
|
|
31
|
+
} CLOSED_ENUM;
|
|
32
|
+
|
|
33
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro {
|
|
36
|
+
|
|
37
|
+
// C++ RNAndroidLocationPriority <> JS RNAndroidLocationPriority (enum)
|
|
38
|
+
template <>
|
|
39
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority> final {
|
|
40
|
+
static inline margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
41
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
42
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority>(enumValue);
|
|
43
|
+
}
|
|
44
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNAndroidLocationPriority arg) {
|
|
45
|
+
int enumValue = static_cast<int>(arg);
|
|
46
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
47
|
+
}
|
|
48
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
49
|
+
if (!value.isNumber()) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
double number = value.getNumber();
|
|
53
|
+
int integer = static_cast<int>(number);
|
|
54
|
+
if (number != integer) {
|
|
55
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
56
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
// Check if we are within the bounds of the enum.
|
|
60
|
+
return integer >= 0 && integer <= 3;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNIOSLocationAccuracy.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* An enum which can be represented as a JavaScript enum (RNIOSLocationAccuracy).
|
|
25
|
+
*/
|
|
26
|
+
enum class RNIOSLocationAccuracy {
|
|
27
|
+
ACCURACY_BEST SWIFT_NAME(accuracyBest) = 0,
|
|
28
|
+
ACCURACY_NEAREST_TEN_METER SWIFT_NAME(accuracyNearestTenMeter) = 1,
|
|
29
|
+
ACCURACY_NEAREST_HUNDRED_METER SWIFT_NAME(accuracyNearestHundredMeter) = 2,
|
|
30
|
+
ACCURACY_KILOMETER SWIFT_NAME(accuracyKilometer) = 3,
|
|
31
|
+
} CLOSED_ENUM;
|
|
32
|
+
|
|
33
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro {
|
|
36
|
+
|
|
37
|
+
// C++ RNIOSLocationAccuracy <> JS RNIOSLocationAccuracy (enum)
|
|
38
|
+
template <>
|
|
39
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy> final {
|
|
40
|
+
static inline margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
41
|
+
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
42
|
+
return static_cast<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>(enumValue);
|
|
43
|
+
}
|
|
44
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy arg) {
|
|
45
|
+
int enumValue = static_cast<int>(arg);
|
|
46
|
+
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
47
|
+
}
|
|
48
|
+
static inline bool canConvert(jsi::Runtime&, const jsi::Value& value) {
|
|
49
|
+
if (!value.isNumber()) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
double number = value.getNumber();
|
|
53
|
+
int integer = static_cast<int>(number);
|
|
54
|
+
if (number != integer) {
|
|
55
|
+
// The integer is not the same value as the double - we truncated floating points.
|
|
56
|
+
// Enums are all integers, so the input floating point number is obviously invalid.
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
// Check if we are within the bounds of the enum.
|
|
60
|
+
return integer >= 0 && integer <= 3;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNIOSLocationConfig.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 `RNIOSLocationAccuracy` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { enum class RNIOSLocationAccuracy; }
|
|
23
|
+
|
|
24
|
+
#include "RNIOSLocationAccuracy.hpp"
|
|
25
|
+
#include <optional>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A struct which can be represented as a JavaScript object (RNIOSLocationConfig).
|
|
31
|
+
*/
|
|
32
|
+
struct RNIOSLocationConfig {
|
|
33
|
+
public:
|
|
34
|
+
std::optional<RNIOSLocationAccuracy> desiredAccuracy SWIFT_PRIVATE;
|
|
35
|
+
std::optional<double> distanceFilterMeters SWIFT_PRIVATE;
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
RNIOSLocationConfig() = default;
|
|
39
|
+
explicit RNIOSLocationConfig(std::optional<RNIOSLocationAccuracy> desiredAccuracy, std::optional<double> distanceFilterMeters): desiredAccuracy(desiredAccuracy), distanceFilterMeters(distanceFilterMeters) {}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
43
|
+
|
|
44
|
+
namespace margelo::nitro {
|
|
45
|
+
|
|
46
|
+
// C++ RNIOSLocationConfig <> JS RNIOSLocationConfig (object)
|
|
47
|
+
template <>
|
|
48
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNIOSLocationConfig> final {
|
|
49
|
+
static inline margelo::nitro::rngooglemapsplus::RNIOSLocationConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
+
return margelo::nitro::rngooglemapsplus::RNIOSLocationConfig(
|
|
52
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::fromJSI(runtime, obj.getProperty(runtime, "desiredAccuracy")),
|
|
53
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "distanceFilterMeters"))
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNIOSLocationConfig& arg) {
|
|
57
|
+
jsi::Object obj(runtime);
|
|
58
|
+
obj.setProperty(runtime, "desiredAccuracy", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::toJSI(runtime, arg.desiredAccuracy));
|
|
59
|
+
obj.setProperty(runtime, "distanceFilterMeters", JSIConverter<std::optional<double>>::toJSI(runtime, arg.distanceFilterMeters));
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
63
|
+
if (!value.isObject()) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNIOSLocationAccuracy>>::canConvert(runtime, obj.getProperty(runtime, "desiredAccuracy"))) return false;
|
|
68
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "distanceFilterMeters"))) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
} // namespace margelo::nitro
|
|
@@ -34,11 +34,11 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
34
34
|
public:
|
|
35
35
|
std::optional<std::string> mapId SWIFT_PRIVATE;
|
|
36
36
|
std::optional<bool> liteMode SWIFT_PRIVATE;
|
|
37
|
-
std::optional<RNCamera>
|
|
37
|
+
std::optional<RNCamera> camera SWIFT_PRIVATE;
|
|
38
38
|
|
|
39
39
|
public:
|
|
40
40
|
RNInitialProps() = default;
|
|
41
|
-
explicit RNInitialProps(std::optional<std::string> mapId, std::optional<bool> liteMode, std::optional<RNCamera>
|
|
41
|
+
explicit RNInitialProps(std::optional<std::string> mapId, std::optional<bool> liteMode, std::optional<RNCamera> camera): mapId(mapId), liteMode(liteMode), camera(camera) {}
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -53,14 +53,14 @@ namespace margelo::nitro {
|
|
|
53
53
|
return margelo::nitro::rngooglemapsplus::RNInitialProps(
|
|
54
54
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "mapId")),
|
|
55
55
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "liteMode")),
|
|
56
|
-
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
56
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::fromJSI(runtime, obj.getProperty(runtime, "camera"))
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNInitialProps& arg) {
|
|
60
60
|
jsi::Object obj(runtime);
|
|
61
61
|
obj.setProperty(runtime, "mapId", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.mapId));
|
|
62
62
|
obj.setProperty(runtime, "liteMode", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.liteMode));
|
|
63
|
-
obj.setProperty(runtime, "
|
|
63
|
+
obj.setProperty(runtime, "camera", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::toJSI(runtime, arg.camera));
|
|
64
64
|
return obj;
|
|
65
65
|
}
|
|
66
66
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,7 +70,7 @@ namespace margelo::nitro {
|
|
|
70
70
|
jsi::Object obj = value.getObject(runtime);
|
|
71
71
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "mapId"))) return false;
|
|
72
72
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "liteMode"))) return false;
|
|
73
|
-
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::canConvert(runtime, obj.getProperty(runtime, "
|
|
73
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNCamera>>::canConvert(runtime, obj.getProperty(runtime, "camera"))) return false;
|
|
74
74
|
return true;
|
|
75
75
|
}
|
|
76
76
|
};
|