react-native-google-maps-plus 1.1.0-dev.2 → 1.1.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.
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +37 -102
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -3
- package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +16 -2
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +26 -9
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +46 -72
- package/ios/GoogleMapViewImpl.swift +94 -212
- package/ios/LocationHandler.swift +2 -10
- package/ios/MapCircleBuilder.swift +23 -8
- package/ios/MapHelper.swift +6 -4
- package/ios/MapMarkerBuilder.swift +39 -41
- package/ios/MapPolygonBuilder.swift +25 -7
- package/ios/MapPolylineBuilder.swift +27 -11
- package/ios/RNGoogleMapsPlusView.swift +9 -14
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- package/ios/extensions/RNPolygon+Extension.swift.swift +2 -19
- package/ios/extensions/RNPolyline+Extension.swift.swift +1 -26
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +2 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +5 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +10 -15
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -4
- package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +57 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +2 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +1 -1
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +13 -13
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +57 -33
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +8 -12
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +4 -9
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +46 -94
- package/nitrogen/generated/ios/swift/RNCamera.swift +1 -8
- package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +1 -8
- package/nitrogen/generated/ios/swift/RNLocationConfig.swift +2 -16
- package/nitrogen/generated/ios/swift/RNMapZoomConfig.swift +70 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +2 -16
- package/nitrogen/generated/ios/swift/RNPolygon.swift +11 -15
- package/nitrogen/generated/ios/swift/RNPolyline.swift +11 -15
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +2 -4
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +5 -4
- package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +71 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +7 -19
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +2 -2
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -2
- package/package.json +13 -13
- package/src/RNGoogleMapsPlusView.nitro.ts +2 -2
- package/src/types.ts +6 -1
|
@@ -119,14 +119,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
119
119
|
}
|
|
120
120
|
@inline(__always)
|
|
121
121
|
set {
|
|
122
|
-
self.__implementation.initialProps =
|
|
123
|
-
if bridge.has_value_std__optional_RNInitialProps_(newValue) {
|
|
124
|
-
let __unwrapped = bridge.get_std__optional_RNInitialProps_(newValue)
|
|
125
|
-
return __unwrapped
|
|
126
|
-
} else {
|
|
127
|
-
return nil
|
|
128
|
-
}
|
|
129
|
-
}()
|
|
122
|
+
self.__implementation.initialProps = newValue.value
|
|
130
123
|
}
|
|
131
124
|
}
|
|
132
125
|
|
|
@@ -143,14 +136,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
143
136
|
}
|
|
144
137
|
@inline(__always)
|
|
145
138
|
set {
|
|
146
|
-
self.__implementation.uiSettings =
|
|
147
|
-
if bridge.has_value_std__optional_RNMapUiSettings_(newValue) {
|
|
148
|
-
let __unwrapped = bridge.get_std__optional_RNMapUiSettings_(newValue)
|
|
149
|
-
return __unwrapped
|
|
150
|
-
} else {
|
|
151
|
-
return nil
|
|
152
|
-
}
|
|
153
|
-
}()
|
|
139
|
+
self.__implementation.uiSettings = newValue.value
|
|
154
140
|
}
|
|
155
141
|
}
|
|
156
142
|
|
|
@@ -263,29 +249,12 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
263
249
|
}
|
|
264
250
|
}
|
|
265
251
|
|
|
266
|
-
public final var
|
|
267
|
-
@inline(__always)
|
|
268
|
-
get {
|
|
269
|
-
return { () -> bridge.std__optional_double_ in
|
|
270
|
-
if let __unwrappedValue = self.__implementation.minZoomLevel {
|
|
271
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
272
|
-
} else {
|
|
273
|
-
return .init()
|
|
274
|
-
}
|
|
275
|
-
}()
|
|
276
|
-
}
|
|
277
|
-
@inline(__always)
|
|
278
|
-
set {
|
|
279
|
-
self.__implementation.minZoomLevel = newValue.value
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
public final var maxZoomLevel: bridge.std__optional_double_ {
|
|
252
|
+
public final var mapZoomConfig: bridge.std__optional_RNMapZoomConfig_ {
|
|
284
253
|
@inline(__always)
|
|
285
254
|
get {
|
|
286
|
-
return { () -> bridge.
|
|
287
|
-
if let __unwrappedValue = self.__implementation.
|
|
288
|
-
return bridge.
|
|
255
|
+
return { () -> bridge.std__optional_RNMapZoomConfig_ in
|
|
256
|
+
if let __unwrappedValue = self.__implementation.mapZoomConfig {
|
|
257
|
+
return bridge.create_std__optional_RNMapZoomConfig_(__unwrappedValue)
|
|
289
258
|
} else {
|
|
290
259
|
return .init()
|
|
291
260
|
}
|
|
@@ -293,7 +262,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
293
262
|
}
|
|
294
263
|
@inline(__always)
|
|
295
264
|
set {
|
|
296
|
-
self.__implementation.
|
|
265
|
+
self.__implementation.mapZoomConfig = newValue.value
|
|
297
266
|
}
|
|
298
267
|
}
|
|
299
268
|
|
|
@@ -310,14 +279,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
310
279
|
}
|
|
311
280
|
@inline(__always)
|
|
312
281
|
set {
|
|
313
|
-
self.__implementation.mapPadding =
|
|
314
|
-
if bridge.has_value_std__optional_RNMapPadding_(newValue) {
|
|
315
|
-
let __unwrapped = bridge.get_std__optional_RNMapPadding_(newValue)
|
|
316
|
-
return __unwrapped
|
|
317
|
-
} else {
|
|
318
|
-
return nil
|
|
319
|
-
}
|
|
320
|
-
}()
|
|
282
|
+
self.__implementation.mapPadding = newValue.value
|
|
321
283
|
}
|
|
322
284
|
}
|
|
323
285
|
|
|
@@ -343,13 +305,9 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
343
305
|
get {
|
|
344
306
|
return { () -> bridge.std__optional_std__vector_RNMarker__ in
|
|
345
307
|
if let __unwrappedValue = self.__implementation.markers {
|
|
346
|
-
return bridge.create_std__optional_std__vector_RNMarker__({
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
__vector.push_back(__item)
|
|
350
|
-
}
|
|
351
|
-
return __vector
|
|
352
|
-
}())
|
|
308
|
+
return bridge.create_std__optional_std__vector_RNMarker__(__unwrappedValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNMarker_ in
|
|
309
|
+
return bridge.copy_std__vector_RNMarker_(__pointer.baseAddress!, __unwrappedValue.count)
|
|
310
|
+
})
|
|
353
311
|
} else {
|
|
354
312
|
return .init()
|
|
355
313
|
}
|
|
@@ -360,7 +318,11 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
360
318
|
self.__implementation.markers = { () -> [RNMarker]? in
|
|
361
319
|
if bridge.has_value_std__optional_std__vector_RNMarker__(newValue) {
|
|
362
320
|
let __unwrapped = bridge.get_std__optional_std__vector_RNMarker__(newValue)
|
|
363
|
-
return
|
|
321
|
+
return { () -> [RNMarker] in
|
|
322
|
+
let __data = bridge.get_data_std__vector_RNMarker_(__unwrapped)
|
|
323
|
+
let __size = __unwrapped.size()
|
|
324
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
325
|
+
}()
|
|
364
326
|
} else {
|
|
365
327
|
return nil
|
|
366
328
|
}
|
|
@@ -373,13 +335,9 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
373
335
|
get {
|
|
374
336
|
return { () -> bridge.std__optional_std__vector_RNPolygon__ in
|
|
375
337
|
if let __unwrappedValue = self.__implementation.polygons {
|
|
376
|
-
return bridge.create_std__optional_std__vector_RNPolygon__({
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
__vector.push_back(__item)
|
|
380
|
-
}
|
|
381
|
-
return __vector
|
|
382
|
-
}())
|
|
338
|
+
return bridge.create_std__optional_std__vector_RNPolygon__(__unwrappedValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNPolygon_ in
|
|
339
|
+
return bridge.copy_std__vector_RNPolygon_(__pointer.baseAddress!, __unwrappedValue.count)
|
|
340
|
+
})
|
|
383
341
|
} else {
|
|
384
342
|
return .init()
|
|
385
343
|
}
|
|
@@ -390,7 +348,11 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
390
348
|
self.__implementation.polygons = { () -> [RNPolygon]? in
|
|
391
349
|
if bridge.has_value_std__optional_std__vector_RNPolygon__(newValue) {
|
|
392
350
|
let __unwrapped = bridge.get_std__optional_std__vector_RNPolygon__(newValue)
|
|
393
|
-
return
|
|
351
|
+
return { () -> [RNPolygon] in
|
|
352
|
+
let __data = bridge.get_data_std__vector_RNPolygon_(__unwrapped)
|
|
353
|
+
let __size = __unwrapped.size()
|
|
354
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
355
|
+
}()
|
|
394
356
|
} else {
|
|
395
357
|
return nil
|
|
396
358
|
}
|
|
@@ -403,13 +365,9 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
403
365
|
get {
|
|
404
366
|
return { () -> bridge.std__optional_std__vector_RNPolyline__ in
|
|
405
367
|
if let __unwrappedValue = self.__implementation.polylines {
|
|
406
|
-
return bridge.create_std__optional_std__vector_RNPolyline__({
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
__vector.push_back(__item)
|
|
410
|
-
}
|
|
411
|
-
return __vector
|
|
412
|
-
}())
|
|
368
|
+
return bridge.create_std__optional_std__vector_RNPolyline__(__unwrappedValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNPolyline_ in
|
|
369
|
+
return bridge.copy_std__vector_RNPolyline_(__pointer.baseAddress!, __unwrappedValue.count)
|
|
370
|
+
})
|
|
413
371
|
} else {
|
|
414
372
|
return .init()
|
|
415
373
|
}
|
|
@@ -420,7 +378,11 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
420
378
|
self.__implementation.polylines = { () -> [RNPolyline]? in
|
|
421
379
|
if bridge.has_value_std__optional_std__vector_RNPolyline__(newValue) {
|
|
422
380
|
let __unwrapped = bridge.get_std__optional_std__vector_RNPolyline__(newValue)
|
|
423
|
-
return
|
|
381
|
+
return { () -> [RNPolyline] in
|
|
382
|
+
let __data = bridge.get_data_std__vector_RNPolyline_(__unwrapped)
|
|
383
|
+
let __size = __unwrapped.size()
|
|
384
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
385
|
+
}()
|
|
424
386
|
} else {
|
|
425
387
|
return nil
|
|
426
388
|
}
|
|
@@ -433,13 +395,9 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
433
395
|
get {
|
|
434
396
|
return { () -> bridge.std__optional_std__vector_RNCircle__ in
|
|
435
397
|
if let __unwrappedValue = self.__implementation.circles {
|
|
436
|
-
return bridge.create_std__optional_std__vector_RNCircle__({
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
__vector.push_back(__item)
|
|
440
|
-
}
|
|
441
|
-
return __vector
|
|
442
|
-
}())
|
|
398
|
+
return bridge.create_std__optional_std__vector_RNCircle__(__unwrappedValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNCircle_ in
|
|
399
|
+
return bridge.copy_std__vector_RNCircle_(__pointer.baseAddress!, __unwrappedValue.count)
|
|
400
|
+
})
|
|
443
401
|
} else {
|
|
444
402
|
return .init()
|
|
445
403
|
}
|
|
@@ -450,7 +408,11 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
450
408
|
self.__implementation.circles = { () -> [RNCircle]? in
|
|
451
409
|
if bridge.has_value_std__optional_std__vector_RNCircle__(newValue) {
|
|
452
410
|
let __unwrapped = bridge.get_std__optional_std__vector_RNCircle__(newValue)
|
|
453
|
-
return
|
|
411
|
+
return { () -> [RNCircle] in
|
|
412
|
+
let __data = bridge.get_data_std__vector_RNCircle_(__unwrapped)
|
|
413
|
+
let __size = __unwrapped.size()
|
|
414
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
415
|
+
}()
|
|
454
416
|
} else {
|
|
455
417
|
return nil
|
|
456
418
|
}
|
|
@@ -471,14 +433,7 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
471
433
|
}
|
|
472
434
|
@inline(__always)
|
|
473
435
|
set {
|
|
474
|
-
self.__implementation.locationConfig =
|
|
475
|
-
if bridge.has_value_std__optional_RNLocationConfig_(newValue) {
|
|
476
|
-
let __unwrapped = bridge.get_std__optional_RNLocationConfig_(newValue)
|
|
477
|
-
return __unwrapped
|
|
478
|
-
} else {
|
|
479
|
-
return nil
|
|
480
|
-
}
|
|
481
|
-
}()
|
|
436
|
+
self.__implementation.locationConfig = newValue.value
|
|
482
437
|
}
|
|
483
438
|
}
|
|
484
439
|
|
|
@@ -881,14 +836,11 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
881
836
|
@inline(__always)
|
|
882
837
|
public final func setCameraToCoordinates(coordinates: bridge.std__vector_RNLatLng_, padding: bridge.std__optional_RNMapPadding_, animated: bridge.std__optional_bool_, durationMS: bridge.std__optional_double_) -> bridge.Result_void_ {
|
|
883
838
|
do {
|
|
884
|
-
try self.__implementation.setCameraToCoordinates(coordinates:
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
return nil
|
|
890
|
-
}
|
|
891
|
-
}(), animated: animated.value, durationMS: durationMS.value)
|
|
839
|
+
try self.__implementation.setCameraToCoordinates(coordinates: { () -> [RNLatLng] in
|
|
840
|
+
let __data = bridge.get_data_std__vector_RNLatLng_(coordinates)
|
|
841
|
+
let __size = coordinates.size()
|
|
842
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
843
|
+
}(), padding: padding.value, animated: animated.value, durationMS: durationMS.value)
|
|
892
844
|
return bridge.create_Result_void_()
|
|
893
845
|
} catch (let __error) {
|
|
894
846
|
let __exceptionPtr = __error.toCpp()
|
|
@@ -49,14 +49,7 @@ public extension RNCamera {
|
|
|
49
49
|
var center: RNLatLng? {
|
|
50
50
|
@inline(__always)
|
|
51
51
|
get {
|
|
52
|
-
return
|
|
53
|
-
if bridge.has_value_std__optional_RNLatLng_(self.__center) {
|
|
54
|
-
let __unwrapped = bridge.get_std__optional_RNLatLng_(self.__center)
|
|
55
|
-
return __unwrapped
|
|
56
|
-
} else {
|
|
57
|
-
return nil
|
|
58
|
-
}
|
|
59
|
-
}()
|
|
52
|
+
return self.__center.value
|
|
60
53
|
}
|
|
61
54
|
@inline(__always)
|
|
62
55
|
set {
|
|
@@ -18,7 +18,7 @@ public extension RNCircle {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNCircle`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, pressable: Bool?, zIndex: Double?, center: RNLatLng, radius: Double
|
|
21
|
+
init(id: String, pressable: Bool?, zIndex: Double?, center: RNLatLng, radius: Double, strokeWidth: Double?, strokeColor: String?, fillColor: String?) {
|
|
22
22
|
self.init(std.string(id), { () -> bridge.std__optional_bool_ in
|
|
23
23
|
if let __unwrappedValue = pressable {
|
|
24
24
|
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
@@ -31,13 +31,7 @@ public extension RNCircle {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(), center, { () -> bridge.std__optional_double_ in
|
|
35
|
-
if let __unwrappedValue = radius {
|
|
36
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
37
|
-
} else {
|
|
38
|
-
return .init()
|
|
39
|
-
}
|
|
40
|
-
}(), { () -> bridge.std__optional_double_ in
|
|
34
|
+
}(), center, radius, { () -> bridge.std__optional_double_ in
|
|
41
35
|
if let __unwrappedValue = strokeWidth {
|
|
42
36
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
43
37
|
} else {
|
|
@@ -114,20 +108,14 @@ public extension RNCircle {
|
|
|
114
108
|
}
|
|
115
109
|
}
|
|
116
110
|
|
|
117
|
-
var radius: Double
|
|
111
|
+
var radius: Double {
|
|
118
112
|
@inline(__always)
|
|
119
113
|
get {
|
|
120
|
-
return self.__radius
|
|
114
|
+
return self.__radius
|
|
121
115
|
}
|
|
122
116
|
@inline(__always)
|
|
123
117
|
set {
|
|
124
|
-
self.__radius =
|
|
125
|
-
if let __unwrappedValue = newValue {
|
|
126
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
127
|
-
} else {
|
|
128
|
-
return .init()
|
|
129
|
-
}
|
|
130
|
-
}()
|
|
118
|
+
self.__radius = newValue
|
|
131
119
|
}
|
|
132
120
|
}
|
|
133
121
|
|
|
@@ -84,14 +84,7 @@ public extension RNInitialProps {
|
|
|
84
84
|
var camera: RNCamera? {
|
|
85
85
|
@inline(__always)
|
|
86
86
|
get {
|
|
87
|
-
return
|
|
88
|
-
if bridge.has_value_std__optional_RNCamera_(self.__camera) {
|
|
89
|
-
let __unwrapped = bridge.get_std__optional_RNCamera_(self.__camera)
|
|
90
|
-
return __unwrapped
|
|
91
|
-
} else {
|
|
92
|
-
return nil
|
|
93
|
-
}
|
|
94
|
-
}()
|
|
87
|
+
return self.__camera.value
|
|
95
88
|
}
|
|
96
89
|
@inline(__always)
|
|
97
90
|
set {
|
|
@@ -37,14 +37,7 @@ public extension RNLocationConfig {
|
|
|
37
37
|
var android: RNAndroidLocationConfig? {
|
|
38
38
|
@inline(__always)
|
|
39
39
|
get {
|
|
40
|
-
return
|
|
41
|
-
if bridge.has_value_std__optional_RNAndroidLocationConfig_(self.__android) {
|
|
42
|
-
let __unwrapped = bridge.get_std__optional_RNAndroidLocationConfig_(self.__android)
|
|
43
|
-
return __unwrapped
|
|
44
|
-
} else {
|
|
45
|
-
return nil
|
|
46
|
-
}
|
|
47
|
-
}()
|
|
40
|
+
return self.__android.value
|
|
48
41
|
}
|
|
49
42
|
@inline(__always)
|
|
50
43
|
set {
|
|
@@ -61,14 +54,7 @@ public extension RNLocationConfig {
|
|
|
61
54
|
var ios: RNIOSLocationConfig? {
|
|
62
55
|
@inline(__always)
|
|
63
56
|
get {
|
|
64
|
-
return
|
|
65
|
-
if bridge.has_value_std__optional_RNIOSLocationConfig_(self.__ios) {
|
|
66
|
-
let __unwrapped = bridge.get_std__optional_RNIOSLocationConfig_(self.__ios)
|
|
67
|
-
return __unwrapped
|
|
68
|
-
} else {
|
|
69
|
-
return nil
|
|
70
|
-
}
|
|
71
|
-
}()
|
|
57
|
+
return self.__ios.value
|
|
72
58
|
}
|
|
73
59
|
@inline(__always)
|
|
74
60
|
set {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapZoomConfig.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 `RNMapZoomConfig`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNMapZoomConfig = margelo.nitro.rngooglemapsplus.RNMapZoomConfig
|
|
14
|
+
|
|
15
|
+
public extension RNMapZoomConfig {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNMapZoomConfig`.
|
|
20
|
+
*/
|
|
21
|
+
init(min: Double?, max: Double?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_double_ in
|
|
23
|
+
if let __unwrappedValue = min {
|
|
24
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
29
|
+
if let __unwrappedValue = max {
|
|
30
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}())
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var min: Double? {
|
|
38
|
+
@inline(__always)
|
|
39
|
+
get {
|
|
40
|
+
return self.__min.value
|
|
41
|
+
}
|
|
42
|
+
@inline(__always)
|
|
43
|
+
set {
|
|
44
|
+
self.__min = { () -> bridge.std__optional_double_ in
|
|
45
|
+
if let __unwrappedValue = newValue {
|
|
46
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
47
|
+
} else {
|
|
48
|
+
return .init()
|
|
49
|
+
}
|
|
50
|
+
}()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var max: Double? {
|
|
55
|
+
@inline(__always)
|
|
56
|
+
get {
|
|
57
|
+
return self.__max.value
|
|
58
|
+
}
|
|
59
|
+
@inline(__always)
|
|
60
|
+
set {
|
|
61
|
+
self.__max = { () -> bridge.std__optional_double_ in
|
|
62
|
+
if let __unwrappedValue = newValue {
|
|
63
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
64
|
+
} else {
|
|
65
|
+
return .init()
|
|
66
|
+
}
|
|
67
|
+
}()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -82,14 +82,7 @@ public extension RNMarker {
|
|
|
82
82
|
var anchor: RNPosition? {
|
|
83
83
|
@inline(__always)
|
|
84
84
|
get {
|
|
85
|
-
return
|
|
86
|
-
if bridge.has_value_std__optional_RNPosition_(self.__anchor) {
|
|
87
|
-
let __unwrapped = bridge.get_std__optional_RNPosition_(self.__anchor)
|
|
88
|
-
return __unwrapped
|
|
89
|
-
} else {
|
|
90
|
-
return nil
|
|
91
|
-
}
|
|
92
|
-
}()
|
|
85
|
+
return self.__anchor.value
|
|
93
86
|
}
|
|
94
87
|
@inline(__always)
|
|
95
88
|
set {
|
|
@@ -106,14 +99,7 @@ public extension RNMarker {
|
|
|
106
99
|
var iconSvg: RNMarkerSvg? {
|
|
107
100
|
@inline(__always)
|
|
108
101
|
get {
|
|
109
|
-
return
|
|
110
|
-
if bridge.has_value_std__optional_RNMarkerSvg_(self.__iconSvg) {
|
|
111
|
-
let __unwrapped = bridge.get_std__optional_RNMarkerSvg_(self.__iconSvg)
|
|
112
|
-
return __unwrapped
|
|
113
|
-
} else {
|
|
114
|
-
return nil
|
|
115
|
-
}
|
|
116
|
-
}()
|
|
102
|
+
return self.__iconSvg.value
|
|
117
103
|
}
|
|
118
104
|
@inline(__always)
|
|
119
105
|
set {
|
|
@@ -31,13 +31,9 @@ public extension RNPolygon {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(), {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__vector.push_back(__item)
|
|
38
|
-
}
|
|
39
|
-
return __vector
|
|
40
|
-
}(), { () -> bridge.std__optional_std__string_ in
|
|
34
|
+
}(), coordinates.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNLatLng_ in
|
|
35
|
+
return bridge.copy_std__vector_RNLatLng_(__pointer.baseAddress!, coordinates.count)
|
|
36
|
+
}, { () -> bridge.std__optional_std__string_ in
|
|
41
37
|
if let __unwrappedValue = fillColor {
|
|
42
38
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
39
|
} else {
|
|
@@ -106,17 +102,17 @@ public extension RNPolygon {
|
|
|
106
102
|
var coordinates: [RNLatLng] {
|
|
107
103
|
@inline(__always)
|
|
108
104
|
get {
|
|
109
|
-
return
|
|
105
|
+
return { () -> [RNLatLng] in
|
|
106
|
+
let __data = bridge.get_data_std__vector_RNLatLng_(self.__coordinates)
|
|
107
|
+
let __size = self.__coordinates.size()
|
|
108
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
109
|
+
}()
|
|
110
110
|
}
|
|
111
111
|
@inline(__always)
|
|
112
112
|
set {
|
|
113
|
-
self.__coordinates = {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
__vector.push_back(__item)
|
|
117
|
-
}
|
|
118
|
-
return __vector
|
|
119
|
-
}()
|
|
113
|
+
self.__coordinates = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNLatLng_ in
|
|
114
|
+
return bridge.copy_std__vector_RNLatLng_(__pointer.baseAddress!, newValue.count)
|
|
115
|
+
}
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
118
|
|
|
@@ -31,13 +31,9 @@ public extension RNPolyline {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(), {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__vector.push_back(__item)
|
|
38
|
-
}
|
|
39
|
-
return __vector
|
|
40
|
-
}(), { () -> bridge.std__optional_RNLineCapType_ in
|
|
34
|
+
}(), coordinates.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNLatLng_ in
|
|
35
|
+
return bridge.copy_std__vector_RNLatLng_(__pointer.baseAddress!, coordinates.count)
|
|
36
|
+
}, { () -> bridge.std__optional_RNLineCapType_ in
|
|
41
37
|
if let __unwrappedValue = lineCap {
|
|
42
38
|
return bridge.create_std__optional_RNLineCapType_(__unwrappedValue)
|
|
43
39
|
} else {
|
|
@@ -112,17 +108,17 @@ public extension RNPolyline {
|
|
|
112
108
|
var coordinates: [RNLatLng] {
|
|
113
109
|
@inline(__always)
|
|
114
110
|
get {
|
|
115
|
-
return
|
|
111
|
+
return { () -> [RNLatLng] in
|
|
112
|
+
let __data = bridge.get_data_std__vector_RNLatLng_(self.__coordinates)
|
|
113
|
+
let __size = self.__coordinates.size()
|
|
114
|
+
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
115
|
+
}()
|
|
116
116
|
}
|
|
117
117
|
@inline(__always)
|
|
118
118
|
set {
|
|
119
|
-
self.__coordinates = {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
__vector.push_back(__item)
|
|
123
|
-
}
|
|
124
|
-
return __vector
|
|
125
|
-
}()
|
|
119
|
+
self.__coordinates = newValue.withUnsafeBufferPointer { __pointer -> bridge.std__vector_RNLatLng_ in
|
|
120
|
+
return bridge.copy_std__vector_RNLatLng_(__pointer.baseAddress!, newValue.count)
|
|
121
|
+
}
|
|
126
122
|
}
|
|
127
123
|
}
|
|
128
124
|
|
|
@@ -30,10 +30,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
30
30
|
prototype.registerHybridSetter("customMapStyle", &HybridRNGoogleMapsPlusViewSpec::setCustomMapStyle);
|
|
31
31
|
prototype.registerHybridGetter("userInterfaceStyle", &HybridRNGoogleMapsPlusViewSpec::getUserInterfaceStyle);
|
|
32
32
|
prototype.registerHybridSetter("userInterfaceStyle", &HybridRNGoogleMapsPlusViewSpec::setUserInterfaceStyle);
|
|
33
|
-
prototype.registerHybridGetter("
|
|
34
|
-
prototype.registerHybridSetter("
|
|
35
|
-
prototype.registerHybridGetter("maxZoomLevel", &HybridRNGoogleMapsPlusViewSpec::getMaxZoomLevel);
|
|
36
|
-
prototype.registerHybridSetter("maxZoomLevel", &HybridRNGoogleMapsPlusViewSpec::setMaxZoomLevel);
|
|
33
|
+
prototype.registerHybridGetter("mapZoomConfig", &HybridRNGoogleMapsPlusViewSpec::getMapZoomConfig);
|
|
34
|
+
prototype.registerHybridSetter("mapZoomConfig", &HybridRNGoogleMapsPlusViewSpec::setMapZoomConfig);
|
|
37
35
|
prototype.registerHybridGetter("mapPadding", &HybridRNGoogleMapsPlusViewSpec::getMapPadding);
|
|
38
36
|
prototype.registerHybridSetter("mapPadding", &HybridRNGoogleMapsPlusViewSpec::setMapPadding);
|
|
39
37
|
prototype.registerHybridGetter("mapType", &HybridRNGoogleMapsPlusViewSpec::getMapType);
|
|
@@ -19,6 +19,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNInitialProps; }
|
|
|
19
19
|
namespace margelo::nitro::rngooglemapsplus { struct RNMapUiSettings; }
|
|
20
20
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
21
21
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
22
|
+
// Forward declaration of `RNMapZoomConfig` to properly resolve imports.
|
|
23
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMapZoomConfig; }
|
|
22
24
|
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
23
25
|
namespace margelo::nitro::rngooglemapsplus { struct RNMapPadding; }
|
|
24
26
|
// Forward declaration of `RNMapType` to properly resolve imports.
|
|
@@ -53,6 +55,7 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
|
|
|
53
55
|
#include "RNMapUiSettings.hpp"
|
|
54
56
|
#include <string>
|
|
55
57
|
#include "RNUserInterfaceStyle.hpp"
|
|
58
|
+
#include "RNMapZoomConfig.hpp"
|
|
56
59
|
#include "RNMapPadding.hpp"
|
|
57
60
|
#include "RNMapType.hpp"
|
|
58
61
|
#include "RNMarker.hpp"
|
|
@@ -114,10 +117,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
114
117
|
virtual void setCustomMapStyle(const std::optional<std::string>& customMapStyle) = 0;
|
|
115
118
|
virtual std::optional<RNUserInterfaceStyle> getUserInterfaceStyle() = 0;
|
|
116
119
|
virtual void setUserInterfaceStyle(std::optional<RNUserInterfaceStyle> userInterfaceStyle) = 0;
|
|
117
|
-
virtual std::optional<
|
|
118
|
-
virtual void
|
|
119
|
-
virtual std::optional<double> getMaxZoomLevel() = 0;
|
|
120
|
-
virtual void setMaxZoomLevel(std::optional<double> maxZoomLevel) = 0;
|
|
120
|
+
virtual std::optional<RNMapZoomConfig> getMapZoomConfig() = 0;
|
|
121
|
+
virtual void setMapZoomConfig(const std::optional<RNMapZoomConfig>& mapZoomConfig) = 0;
|
|
121
122
|
virtual std::optional<RNMapPadding> getMapPadding() = 0;
|
|
122
123
|
virtual void setMapPadding(const std::optional<RNMapPadding>& mapPadding) = 0;
|
|
123
124
|
virtual std::optional<RNMapType> getMapType() = 0;
|
|
@@ -36,14 +36,14 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
36
36
|
std::optional<bool> pressable SWIFT_PRIVATE;
|
|
37
37
|
std::optional<double> zIndex SWIFT_PRIVATE;
|
|
38
38
|
RNLatLng center SWIFT_PRIVATE;
|
|
39
|
-
|
|
39
|
+
double radius SWIFT_PRIVATE;
|
|
40
40
|
std::optional<double> strokeWidth SWIFT_PRIVATE;
|
|
41
41
|
std::optional<std::string> strokeColor SWIFT_PRIVATE;
|
|
42
42
|
std::optional<std::string> fillColor SWIFT_PRIVATE;
|
|
43
43
|
|
|
44
44
|
public:
|
|
45
45
|
RNCircle() = default;
|
|
46
|
-
explicit RNCircle(std::string id, std::optional<bool> pressable, std::optional<double> zIndex, RNLatLng center,
|
|
46
|
+
explicit RNCircle(std::string id, std::optional<bool> pressable, std::optional<double> zIndex, RNLatLng center, double radius, std::optional<double> strokeWidth, std::optional<std::string> strokeColor, std::optional<std::string> fillColor): id(id), pressable(pressable), zIndex(zIndex), center(center), radius(radius), strokeWidth(strokeWidth), strokeColor(strokeColor), fillColor(fillColor) {}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -60,7 +60,7 @@ namespace margelo::nitro {
|
|
|
60
60
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "pressable")),
|
|
61
61
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
62
62
|
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "center")),
|
|
63
|
-
JSIConverter<
|
|
63
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "radius")),
|
|
64
64
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "strokeWidth")),
|
|
65
65
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "strokeColor")),
|
|
66
66
|
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "fillColor"))
|
|
@@ -72,7 +72,7 @@ namespace margelo::nitro {
|
|
|
72
72
|
obj.setProperty(runtime, "pressable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pressable));
|
|
73
73
|
obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
|
|
74
74
|
obj.setProperty(runtime, "center", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.center));
|
|
75
|
-
obj.setProperty(runtime, "radius", JSIConverter<
|
|
75
|
+
obj.setProperty(runtime, "radius", JSIConverter<double>::toJSI(runtime, arg.radius));
|
|
76
76
|
obj.setProperty(runtime, "strokeWidth", JSIConverter<std::optional<double>>::toJSI(runtime, arg.strokeWidth));
|
|
77
77
|
obj.setProperty(runtime, "strokeColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.strokeColor));
|
|
78
78
|
obj.setProperty(runtime, "fillColor", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.fillColor));
|
|
@@ -87,7 +87,7 @@ namespace margelo::nitro {
|
|
|
87
87
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
|
|
88
88
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
89
89
|
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "center"))) return false;
|
|
90
|
-
if (!JSIConverter<
|
|
90
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "radius"))) return false;
|
|
91
91
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "strokeWidth"))) return false;
|
|
92
92
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "strokeColor"))) return false;
|
|
93
93
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "fillColor"))) return false;
|