react-native-google-maps-plus 1.1.0-dev.1 → 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/RNGoogleMapsPlus.podspec +2 -0
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +38 -103
- 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 +48 -27
- 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 +48 -72
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNMarkerExtension.kt +17 -0
- 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 +55 -48
- package/ios/MapPolygonBuilder.swift +25 -7
- package/ios/MapPolylineBuilder.swift +27 -11
- package/ios/RNGoogleMapsPlusView.swift +9 -15
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- package/ios/extensions/RNMarker+Extension.swift +6 -5
- 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 +9 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +14 -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++/JRNMarker.hpp +6 -12
- package/nitrogen/generated/android/c++/JRNMarkerSvg.hpp +61 -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/RNMarker.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarkerSvg.kt +35 -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 +75 -33
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +6 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +11 -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 +18 -35
- package/nitrogen/generated/ios/swift/RNMarkerSvg.swift +57 -0
- 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++/RNMarker.hpp +8 -13
- package/nitrogen/generated/shared/c++/RNMarkerSvg.hpp +75 -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 +11 -2
|
@@ -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
|
+
}
|
|
@@ -18,7 +18,7 @@ public extension RNMarker {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNMarker`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, zIndex: Double?, coordinate: RNLatLng, anchor: RNPosition?,
|
|
21
|
+
init(id: String, zIndex: Double?, coordinate: RNLatLng, anchor: RNPosition?, iconSvg: RNMarkerSvg?) {
|
|
22
22
|
self.init(std.string(id), { () -> bridge.std__optional_double_ in
|
|
23
23
|
if let __unwrappedValue = zIndex {
|
|
24
24
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
@@ -31,7 +31,13 @@ public extension RNMarker {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(),
|
|
34
|
+
}(), { () -> bridge.std__optional_RNMarkerSvg_ in
|
|
35
|
+
if let __unwrappedValue = iconSvg {
|
|
36
|
+
return bridge.create_std__optional_RNMarkerSvg_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}())
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
var id: String {
|
|
@@ -76,14 +82,7 @@ public extension RNMarker {
|
|
|
76
82
|
var anchor: RNPosition? {
|
|
77
83
|
@inline(__always)
|
|
78
84
|
get {
|
|
79
|
-
return
|
|
80
|
-
if bridge.has_value_std__optional_RNPosition_(self.__anchor) {
|
|
81
|
-
let __unwrapped = bridge.get_std__optional_RNPosition_(self.__anchor)
|
|
82
|
-
return __unwrapped
|
|
83
|
-
} else {
|
|
84
|
-
return nil
|
|
85
|
-
}
|
|
86
|
-
}()
|
|
85
|
+
return self.__anchor.value
|
|
87
86
|
}
|
|
88
87
|
@inline(__always)
|
|
89
88
|
set {
|
|
@@ -97,36 +96,20 @@ public extension RNMarker {
|
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
var
|
|
101
|
-
@inline(__always)
|
|
102
|
-
get {
|
|
103
|
-
return self.__width
|
|
104
|
-
}
|
|
105
|
-
@inline(__always)
|
|
106
|
-
set {
|
|
107
|
-
self.__width = newValue
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
var height: Double {
|
|
99
|
+
var iconSvg: RNMarkerSvg? {
|
|
112
100
|
@inline(__always)
|
|
113
101
|
get {
|
|
114
|
-
return self.
|
|
102
|
+
return self.__iconSvg.value
|
|
115
103
|
}
|
|
116
104
|
@inline(__always)
|
|
117
105
|
set {
|
|
118
|
-
self.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return String(self.__iconSvg)
|
|
126
|
-
}
|
|
127
|
-
@inline(__always)
|
|
128
|
-
set {
|
|
129
|
-
self.__iconSvg = std.string(newValue)
|
|
106
|
+
self.__iconSvg = { () -> bridge.std__optional_RNMarkerSvg_ in
|
|
107
|
+
if let __unwrappedValue = newValue {
|
|
108
|
+
return bridge.create_std__optional_RNMarkerSvg_(__unwrappedValue)
|
|
109
|
+
} else {
|
|
110
|
+
return .init()
|
|
111
|
+
}
|
|
112
|
+
}()
|
|
130
113
|
}
|
|
131
114
|
}
|
|
132
115
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMarkerSvg.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 `RNMarkerSvg`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNMarkerSvg = margelo.nitro.rngooglemapsplus.RNMarkerSvg
|
|
14
|
+
|
|
15
|
+
public extension RNMarkerSvg {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNMarkerSvg`.
|
|
20
|
+
*/
|
|
21
|
+
init(width: Double, height: Double, svgString: String) {
|
|
22
|
+
self.init(width, height, std.string(svgString))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var width: Double {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__width
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__width = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var height: Double {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__height
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__height = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var svgString: String {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return String(self.__svgString)
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__svgString = std.string(newValue)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapZoomConfig.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 <optional>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (RNMapZoomConfig).
|
|
29
|
+
*/
|
|
30
|
+
struct RNMapZoomConfig {
|
|
31
|
+
public:
|
|
32
|
+
std::optional<double> min SWIFT_PRIVATE;
|
|
33
|
+
std::optional<double> max SWIFT_PRIVATE;
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
RNMapZoomConfig() = default;
|
|
37
|
+
explicit RNMapZoomConfig(std::optional<double> min, std::optional<double> max): min(min), max(max) {}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
41
|
+
|
|
42
|
+
namespace margelo::nitro {
|
|
43
|
+
|
|
44
|
+
// C++ RNMapZoomConfig <> JS RNMapZoomConfig (object)
|
|
45
|
+
template <>
|
|
46
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMapZoomConfig> final {
|
|
47
|
+
static inline margelo::nitro::rngooglemapsplus::RNMapZoomConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
49
|
+
return margelo::nitro::rngooglemapsplus::RNMapZoomConfig(
|
|
50
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "min")),
|
|
51
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "max"))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMapZoomConfig& arg) {
|
|
55
|
+
jsi::Object obj(runtime);
|
|
56
|
+
obj.setProperty(runtime, "min", JSIConverter<std::optional<double>>::toJSI(runtime, arg.min));
|
|
57
|
+
obj.setProperty(runtime, "max", JSIConverter<std::optional<double>>::toJSI(runtime, arg.max));
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
61
|
+
if (!value.isObject()) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
jsi::Object obj = value.getObject(runtime);
|
|
65
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "min"))) return false;
|
|
66
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "max"))) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // namespace margelo::nitro
|
|
@@ -22,11 +22,14 @@
|
|
|
22
22
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
23
23
|
// Forward declaration of `RNPosition` to properly resolve imports.
|
|
24
24
|
namespace margelo::nitro::rngooglemapsplus { struct RNPosition; }
|
|
25
|
+
// Forward declaration of `RNMarkerSvg` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMarkerSvg; }
|
|
25
27
|
|
|
26
28
|
#include <string>
|
|
27
29
|
#include <optional>
|
|
28
30
|
#include "RNLatLng.hpp"
|
|
29
31
|
#include "RNPosition.hpp"
|
|
32
|
+
#include "RNMarkerSvg.hpp"
|
|
30
33
|
|
|
31
34
|
namespace margelo::nitro::rngooglemapsplus {
|
|
32
35
|
|
|
@@ -39,13 +42,11 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
39
42
|
std::optional<double> zIndex SWIFT_PRIVATE;
|
|
40
43
|
RNLatLng coordinate SWIFT_PRIVATE;
|
|
41
44
|
std::optional<RNPosition> anchor SWIFT_PRIVATE;
|
|
42
|
-
|
|
43
|
-
double height SWIFT_PRIVATE;
|
|
44
|
-
std::string iconSvg SWIFT_PRIVATE;
|
|
45
|
+
std::optional<RNMarkerSvg> iconSvg SWIFT_PRIVATE;
|
|
45
46
|
|
|
46
47
|
public:
|
|
47
48
|
RNMarker() = default;
|
|
48
|
-
explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor,
|
|
49
|
+
explicit RNMarker(std::string id, std::optional<double> zIndex, RNLatLng coordinate, std::optional<RNPosition> anchor, std::optional<RNMarkerSvg> iconSvg): id(id), zIndex(zIndex), coordinate(coordinate), anchor(anchor), iconSvg(iconSvg) {}
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -62,9 +63,7 @@ namespace margelo::nitro {
|
|
|
62
63
|
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
63
64
|
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "coordinate")),
|
|
64
65
|
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::fromJSI(runtime, obj.getProperty(runtime, "anchor")),
|
|
65
|
-
JSIConverter<
|
|
66
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height")),
|
|
67
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
|
|
66
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::fromJSI(runtime, obj.getProperty(runtime, "iconSvg"))
|
|
68
67
|
);
|
|
69
68
|
}
|
|
70
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMarker& arg) {
|
|
@@ -73,9 +72,7 @@ namespace margelo::nitro {
|
|
|
73
72
|
obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
|
|
74
73
|
obj.setProperty(runtime, "coordinate", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.coordinate));
|
|
75
74
|
obj.setProperty(runtime, "anchor", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::toJSI(runtime, arg.anchor));
|
|
76
|
-
obj.setProperty(runtime, "
|
|
77
|
-
obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
|
|
78
|
-
obj.setProperty(runtime, "iconSvg", JSIConverter<std::string>::toJSI(runtime, arg.iconSvg));
|
|
75
|
+
obj.setProperty(runtime, "iconSvg", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::toJSI(runtime, arg.iconSvg));
|
|
79
76
|
return obj;
|
|
80
77
|
}
|
|
81
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -87,9 +84,7 @@ namespace margelo::nitro {
|
|
|
87
84
|
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
88
85
|
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "coordinate"))) return false;
|
|
89
86
|
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNPosition>>::canConvert(runtime, obj.getProperty(runtime, "anchor"))) return false;
|
|
90
|
-
if (!JSIConverter<
|
|
91
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
|
|
92
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
|
|
87
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNMarkerSvg>>::canConvert(runtime, obj.getProperty(runtime, "iconSvg"))) return false;
|
|
93
88
|
return true;
|
|
94
89
|
}
|
|
95
90
|
};
|