react-native-google-maps-plus 1.1.0-dev.3 → 1.1.0-dev.5
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/README.md +7 -5
- package/RNGoogleMapsPlus.podspec +2 -1
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +54 -0
- package/android/src/main/java/com/rngooglemapsplus/MapHeatmapBuilder.kt +31 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +16 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNHeatmapPointExtension.kt +9 -0
- package/ios/GoogleMapViewImpl.swift +38 -4
- package/ios/MapHeatmapBuilder.swift +27 -0
- package/ios/RNGoogleMapsPlusView.swift +22 -0
- package/ios/extensions/RNHeatmap+Extension.swift +16 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +2 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +19 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +38 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JRNHeatmap.hpp +100 -0
- package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +89 -0
- package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +4 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +6 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmap.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.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 +116 -39
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +17 -1
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +5 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +110 -42
- package/nitrogen/generated/ios/swift/RNCamera.swift +8 -1
- package/nitrogen/generated/ios/swift/RNHeatmap.swift +180 -0
- package/nitrogen/generated/ios/swift/RNHeatmapGradient.swift +81 -0
- package/nitrogen/generated/ios/swift/RNHeatmapPoint.swift +57 -0
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +8 -1
- package/nitrogen/generated/ios/swift/RNLocationConfig.swift +16 -2
- package/nitrogen/generated/ios/swift/RNMarker.swift +16 -2
- package/nitrogen/generated/ios/swift/RNPolygon.swift +15 -11
- package/nitrogen/generated/ios/swift/RNPolyline.swift +15 -11
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +5 -0
- package/nitrogen/generated/shared/c++/RNHeatmap.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNHeatmapGradient.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNHeatmapPoint.hpp +75 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +2 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -0
- package/package.json +2 -2
- package/src/RNGoogleMapsPlusView.nitro.ts +2 -0
- package/src/types.ts +22 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmap.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 `RNHeatmap`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNHeatmap = margelo.nitro.rngooglemapsplus.RNHeatmap
|
|
14
|
+
|
|
15
|
+
public extension RNHeatmap {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNHeatmap`.
|
|
20
|
+
*/
|
|
21
|
+
init(id: String, pressable: Bool?, zIndex: Double?, weightedData: [RNHeatmapPoint], radius: Double?, opacity: Double?, gradient: RNHeatmapGradient?) {
|
|
22
|
+
self.init(std.string(id), { () -> bridge.std__optional_bool_ in
|
|
23
|
+
if let __unwrappedValue = pressable {
|
|
24
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
29
|
+
if let __unwrappedValue = zIndex {
|
|
30
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__vector_RNHeatmapPoint_ in
|
|
35
|
+
var __vector = bridge.create_std__vector_RNHeatmapPoint_(weightedData.count)
|
|
36
|
+
for __item in weightedData {
|
|
37
|
+
__vector.push_back(__item)
|
|
38
|
+
}
|
|
39
|
+
return __vector
|
|
40
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
41
|
+
if let __unwrappedValue = radius {
|
|
42
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
47
|
+
if let __unwrappedValue = opacity {
|
|
48
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_RNHeatmapGradient_ in
|
|
53
|
+
if let __unwrappedValue = gradient {
|
|
54
|
+
return bridge.create_std__optional_RNHeatmapGradient_(__unwrappedValue)
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}())
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var id: String {
|
|
62
|
+
@inline(__always)
|
|
63
|
+
get {
|
|
64
|
+
return String(self.__id)
|
|
65
|
+
}
|
|
66
|
+
@inline(__always)
|
|
67
|
+
set {
|
|
68
|
+
self.__id = std.string(newValue)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var pressable: Bool? {
|
|
73
|
+
@inline(__always)
|
|
74
|
+
get {
|
|
75
|
+
return self.__pressable.value
|
|
76
|
+
}
|
|
77
|
+
@inline(__always)
|
|
78
|
+
set {
|
|
79
|
+
self.__pressable = { () -> bridge.std__optional_bool_ in
|
|
80
|
+
if let __unwrappedValue = newValue {
|
|
81
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
82
|
+
} else {
|
|
83
|
+
return .init()
|
|
84
|
+
}
|
|
85
|
+
}()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
var zIndex: Double? {
|
|
90
|
+
@inline(__always)
|
|
91
|
+
get {
|
|
92
|
+
return self.__zIndex.value
|
|
93
|
+
}
|
|
94
|
+
@inline(__always)
|
|
95
|
+
set {
|
|
96
|
+
self.__zIndex = { () -> bridge.std__optional_double_ in
|
|
97
|
+
if let __unwrappedValue = newValue {
|
|
98
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
99
|
+
} else {
|
|
100
|
+
return .init()
|
|
101
|
+
}
|
|
102
|
+
}()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var weightedData: [RNHeatmapPoint] {
|
|
107
|
+
@inline(__always)
|
|
108
|
+
get {
|
|
109
|
+
return self.__weightedData.map({ __item in __item })
|
|
110
|
+
}
|
|
111
|
+
@inline(__always)
|
|
112
|
+
set {
|
|
113
|
+
self.__weightedData = { () -> bridge.std__vector_RNHeatmapPoint_ in
|
|
114
|
+
var __vector = bridge.create_std__vector_RNHeatmapPoint_(newValue.count)
|
|
115
|
+
for __item in newValue {
|
|
116
|
+
__vector.push_back(__item)
|
|
117
|
+
}
|
|
118
|
+
return __vector
|
|
119
|
+
}()
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var radius: Double? {
|
|
124
|
+
@inline(__always)
|
|
125
|
+
get {
|
|
126
|
+
return self.__radius.value
|
|
127
|
+
}
|
|
128
|
+
@inline(__always)
|
|
129
|
+
set {
|
|
130
|
+
self.__radius = { () -> bridge.std__optional_double_ in
|
|
131
|
+
if let __unwrappedValue = newValue {
|
|
132
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
133
|
+
} else {
|
|
134
|
+
return .init()
|
|
135
|
+
}
|
|
136
|
+
}()
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
var opacity: Double? {
|
|
141
|
+
@inline(__always)
|
|
142
|
+
get {
|
|
143
|
+
return self.__opacity.value
|
|
144
|
+
}
|
|
145
|
+
@inline(__always)
|
|
146
|
+
set {
|
|
147
|
+
self.__opacity = { () -> bridge.std__optional_double_ in
|
|
148
|
+
if let __unwrappedValue = newValue {
|
|
149
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
150
|
+
} else {
|
|
151
|
+
return .init()
|
|
152
|
+
}
|
|
153
|
+
}()
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
var gradient: RNHeatmapGradient? {
|
|
158
|
+
@inline(__always)
|
|
159
|
+
get {
|
|
160
|
+
return { () -> RNHeatmapGradient? in
|
|
161
|
+
if bridge.has_value_std__optional_RNHeatmapGradient_(self.__gradient) {
|
|
162
|
+
let __unwrapped = bridge.get_std__optional_RNHeatmapGradient_(self.__gradient)
|
|
163
|
+
return __unwrapped
|
|
164
|
+
} else {
|
|
165
|
+
return nil
|
|
166
|
+
}
|
|
167
|
+
}()
|
|
168
|
+
}
|
|
169
|
+
@inline(__always)
|
|
170
|
+
set {
|
|
171
|
+
self.__gradient = { () -> bridge.std__optional_RNHeatmapGradient_ in
|
|
172
|
+
if let __unwrappedValue = newValue {
|
|
173
|
+
return bridge.create_std__optional_RNHeatmapGradient_(__unwrappedValue)
|
|
174
|
+
} else {
|
|
175
|
+
return .init()
|
|
176
|
+
}
|
|
177
|
+
}()
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmapGradient.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 `RNHeatmapGradient`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNHeatmapGradient = margelo.nitro.rngooglemapsplus.RNHeatmapGradient
|
|
14
|
+
|
|
15
|
+
public extension RNHeatmapGradient {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNHeatmapGradient`.
|
|
20
|
+
*/
|
|
21
|
+
init(colors: [String], startPoints: [Double], colorMapSize: Double) {
|
|
22
|
+
self.init({ () -> bridge.std__vector_std__string_ in
|
|
23
|
+
var __vector = bridge.create_std__vector_std__string_(colors.count)
|
|
24
|
+
for __item in colors {
|
|
25
|
+
__vector.push_back(std.string(__item))
|
|
26
|
+
}
|
|
27
|
+
return __vector
|
|
28
|
+
}(), { () -> bridge.std__vector_double_ in
|
|
29
|
+
var __vector = bridge.create_std__vector_double_(startPoints.count)
|
|
30
|
+
for __item in startPoints {
|
|
31
|
+
__vector.push_back(__item)
|
|
32
|
+
}
|
|
33
|
+
return __vector
|
|
34
|
+
}(), colorMapSize)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var colors: [String] {
|
|
38
|
+
@inline(__always)
|
|
39
|
+
get {
|
|
40
|
+
return self.__colors.map({ __item in String(__item) })
|
|
41
|
+
}
|
|
42
|
+
@inline(__always)
|
|
43
|
+
set {
|
|
44
|
+
self.__colors = { () -> bridge.std__vector_std__string_ in
|
|
45
|
+
var __vector = bridge.create_std__vector_std__string_(newValue.count)
|
|
46
|
+
for __item in newValue {
|
|
47
|
+
__vector.push_back(std.string(__item))
|
|
48
|
+
}
|
|
49
|
+
return __vector
|
|
50
|
+
}()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var startPoints: [Double] {
|
|
55
|
+
@inline(__always)
|
|
56
|
+
get {
|
|
57
|
+
return self.__startPoints.map({ __item in __item })
|
|
58
|
+
}
|
|
59
|
+
@inline(__always)
|
|
60
|
+
set {
|
|
61
|
+
self.__startPoints = { () -> bridge.std__vector_double_ in
|
|
62
|
+
var __vector = bridge.create_std__vector_double_(newValue.count)
|
|
63
|
+
for __item in newValue {
|
|
64
|
+
__vector.push_back(__item)
|
|
65
|
+
}
|
|
66
|
+
return __vector
|
|
67
|
+
}()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
var colorMapSize: Double {
|
|
72
|
+
@inline(__always)
|
|
73
|
+
get {
|
|
74
|
+
return self.__colorMapSize
|
|
75
|
+
}
|
|
76
|
+
@inline(__always)
|
|
77
|
+
set {
|
|
78
|
+
self.__colorMapSize = newValue
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmapPoint.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 `RNHeatmapPoint`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RNHeatmapPoint = margelo.nitro.rngooglemapsplus.RNHeatmapPoint
|
|
14
|
+
|
|
15
|
+
public extension RNHeatmapPoint {
|
|
16
|
+
private typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RNHeatmapPoint`.
|
|
20
|
+
*/
|
|
21
|
+
init(latitude: Double, longitude: Double, weight: Double) {
|
|
22
|
+
self.init(latitude, longitude, weight)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var latitude: Double {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__latitude
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__latitude = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var longitude: Double {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__longitude
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__longitude = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var weight: Double {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return self.__weight
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__weight = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -84,7 +84,14 @@ public extension RNInitialProps {
|
|
|
84
84
|
var camera: RNCamera? {
|
|
85
85
|
@inline(__always)
|
|
86
86
|
get {
|
|
87
|
-
return
|
|
87
|
+
return { () -> RNCamera? in
|
|
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
|
+
}()
|
|
88
95
|
}
|
|
89
96
|
@inline(__always)
|
|
90
97
|
set {
|
|
@@ -37,7 +37,14 @@ public extension RNLocationConfig {
|
|
|
37
37
|
var android: RNAndroidLocationConfig? {
|
|
38
38
|
@inline(__always)
|
|
39
39
|
get {
|
|
40
|
-
return
|
|
40
|
+
return { () -> RNAndroidLocationConfig? in
|
|
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
|
+
}()
|
|
41
48
|
}
|
|
42
49
|
@inline(__always)
|
|
43
50
|
set {
|
|
@@ -54,7 +61,14 @@ public extension RNLocationConfig {
|
|
|
54
61
|
var ios: RNIOSLocationConfig? {
|
|
55
62
|
@inline(__always)
|
|
56
63
|
get {
|
|
57
|
-
return
|
|
64
|
+
return { () -> RNIOSLocationConfig? in
|
|
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
|
+
}()
|
|
58
72
|
}
|
|
59
73
|
@inline(__always)
|
|
60
74
|
set {
|
|
@@ -82,7 +82,14 @@ public extension RNMarker {
|
|
|
82
82
|
var anchor: RNPosition? {
|
|
83
83
|
@inline(__always)
|
|
84
84
|
get {
|
|
85
|
-
return
|
|
85
|
+
return { () -> RNPosition? in
|
|
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
|
+
}()
|
|
86
93
|
}
|
|
87
94
|
@inline(__always)
|
|
88
95
|
set {
|
|
@@ -99,7 +106,14 @@ public extension RNMarker {
|
|
|
99
106
|
var iconSvg: RNMarkerSvg? {
|
|
100
107
|
@inline(__always)
|
|
101
108
|
get {
|
|
102
|
-
return
|
|
109
|
+
return { () -> RNMarkerSvg? in
|
|
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
|
+
}()
|
|
103
117
|
}
|
|
104
118
|
@inline(__always)
|
|
105
119
|
set {
|
|
@@ -31,9 +31,13 @@ public extension RNPolygon {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(),
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}(), { () -> bridge.std__vector_RNLatLng_ in
|
|
35
|
+
var __vector = bridge.create_std__vector_RNLatLng_(coordinates.count)
|
|
36
|
+
for __item in coordinates {
|
|
37
|
+
__vector.push_back(__item)
|
|
38
|
+
}
|
|
39
|
+
return __vector
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
37
41
|
if let __unwrappedValue = fillColor {
|
|
38
42
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
39
43
|
} else {
|
|
@@ -102,17 +106,17 @@ public extension RNPolygon {
|
|
|
102
106
|
var coordinates: [RNLatLng] {
|
|
103
107
|
@inline(__always)
|
|
104
108
|
get {
|
|
105
|
-
return {
|
|
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
|
-
}()
|
|
109
|
+
return self.__coordinates.map({ __item in __item })
|
|
110
110
|
}
|
|
111
111
|
@inline(__always)
|
|
112
112
|
set {
|
|
113
|
-
self.__coordinates =
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
self.__coordinates = { () -> bridge.std__vector_RNLatLng_ in
|
|
114
|
+
var __vector = bridge.create_std__vector_RNLatLng_(newValue.count)
|
|
115
|
+
for __item in newValue {
|
|
116
|
+
__vector.push_back(__item)
|
|
117
|
+
}
|
|
118
|
+
return __vector
|
|
119
|
+
}()
|
|
116
120
|
}
|
|
117
121
|
}
|
|
118
122
|
|
|
@@ -31,9 +31,13 @@ public extension RNPolyline {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
-
}(),
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
}(), { () -> bridge.std__vector_RNLatLng_ in
|
|
35
|
+
var __vector = bridge.create_std__vector_RNLatLng_(coordinates.count)
|
|
36
|
+
for __item in coordinates {
|
|
37
|
+
__vector.push_back(__item)
|
|
38
|
+
}
|
|
39
|
+
return __vector
|
|
40
|
+
}(), { () -> bridge.std__optional_RNLineCapType_ in
|
|
37
41
|
if let __unwrappedValue = lineCap {
|
|
38
42
|
return bridge.create_std__optional_RNLineCapType_(__unwrappedValue)
|
|
39
43
|
} else {
|
|
@@ -108,17 +112,17 @@ public extension RNPolyline {
|
|
|
108
112
|
var coordinates: [RNLatLng] {
|
|
109
113
|
@inline(__always)
|
|
110
114
|
get {
|
|
111
|
-
return {
|
|
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
|
-
}()
|
|
115
|
+
return self.__coordinates.map({ __item in __item })
|
|
116
116
|
}
|
|
117
117
|
@inline(__always)
|
|
118
118
|
set {
|
|
119
|
-
self.__coordinates =
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
self.__coordinates = { () -> bridge.std__vector_RNLatLng_ in
|
|
120
|
+
var __vector = bridge.create_std__vector_RNLatLng_(newValue.count)
|
|
121
|
+
for __item in newValue {
|
|
122
|
+
__vector.push_back(__item)
|
|
123
|
+
}
|
|
124
|
+
return __vector
|
|
125
|
+
}()
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
|
|
@@ -44,6 +44,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
44
44
|
prototype.registerHybridSetter("polylines", &HybridRNGoogleMapsPlusViewSpec::setPolylines);
|
|
45
45
|
prototype.registerHybridGetter("circles", &HybridRNGoogleMapsPlusViewSpec::getCircles);
|
|
46
46
|
prototype.registerHybridSetter("circles", &HybridRNGoogleMapsPlusViewSpec::setCircles);
|
|
47
|
+
prototype.registerHybridGetter("heatmaps", &HybridRNGoogleMapsPlusViewSpec::getHeatmaps);
|
|
48
|
+
prototype.registerHybridSetter("heatmaps", &HybridRNGoogleMapsPlusViewSpec::setHeatmaps);
|
|
47
49
|
prototype.registerHybridGetter("locationConfig", &HybridRNGoogleMapsPlusViewSpec::getLocationConfig);
|
|
48
50
|
prototype.registerHybridSetter("locationConfig", &HybridRNGoogleMapsPlusViewSpec::setLocationConfig);
|
|
49
51
|
prototype.registerHybridGetter("onMapError", &HybridRNGoogleMapsPlusViewSpec::getOnMapError);
|
|
@@ -33,6 +33,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNPolygon; }
|
|
|
33
33
|
namespace margelo::nitro::rngooglemapsplus { struct RNPolyline; }
|
|
34
34
|
// Forward declaration of `RNCircle` to properly resolve imports.
|
|
35
35
|
namespace margelo::nitro::rngooglemapsplus { struct RNCircle; }
|
|
36
|
+
// Forward declaration of `RNHeatmap` to properly resolve imports.
|
|
37
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmap; }
|
|
36
38
|
// Forward declaration of `RNLocationConfig` to properly resolve imports.
|
|
37
39
|
namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
|
|
38
40
|
// Forward declaration of `RNMapErrorCode` to properly resolve imports.
|
|
@@ -63,6 +65,7 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult;
|
|
|
63
65
|
#include "RNPolygon.hpp"
|
|
64
66
|
#include "RNPolyline.hpp"
|
|
65
67
|
#include "RNCircle.hpp"
|
|
68
|
+
#include "RNHeatmap.hpp"
|
|
66
69
|
#include "RNLocationConfig.hpp"
|
|
67
70
|
#include "RNMapErrorCode.hpp"
|
|
68
71
|
#include <functional>
|
|
@@ -131,6 +134,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
131
134
|
virtual void setPolylines(const std::optional<std::vector<RNPolyline>>& polylines) = 0;
|
|
132
135
|
virtual std::optional<std::vector<RNCircle>> getCircles() = 0;
|
|
133
136
|
virtual void setCircles(const std::optional<std::vector<RNCircle>>& circles) = 0;
|
|
137
|
+
virtual std::optional<std::vector<RNHeatmap>> getHeatmaps() = 0;
|
|
138
|
+
virtual void setHeatmaps(const std::optional<std::vector<RNHeatmap>>& heatmaps) = 0;
|
|
134
139
|
virtual std::optional<RNLocationConfig> getLocationConfig() = 0;
|
|
135
140
|
virtual void setLocationConfig(const std::optional<RNLocationConfig>& locationConfig) = 0;
|
|
136
141
|
virtual std::optional<std::function<void(RNMapErrorCode /* error */)>> getOnMapError() = 0;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNHeatmap.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 `RNHeatmapPoint` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmapPoint; }
|
|
23
|
+
// Forward declaration of `RNHeatmapGradient` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmapGradient; }
|
|
25
|
+
|
|
26
|
+
#include <string>
|
|
27
|
+
#include <optional>
|
|
28
|
+
#include "RNHeatmapPoint.hpp"
|
|
29
|
+
#include <vector>
|
|
30
|
+
#include "RNHeatmapGradient.hpp"
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A struct which can be represented as a JavaScript object (RNHeatmap).
|
|
36
|
+
*/
|
|
37
|
+
struct RNHeatmap {
|
|
38
|
+
public:
|
|
39
|
+
std::string id SWIFT_PRIVATE;
|
|
40
|
+
std::optional<bool> pressable SWIFT_PRIVATE;
|
|
41
|
+
std::optional<double> zIndex SWIFT_PRIVATE;
|
|
42
|
+
std::vector<RNHeatmapPoint> weightedData SWIFT_PRIVATE;
|
|
43
|
+
std::optional<double> radius SWIFT_PRIVATE;
|
|
44
|
+
std::optional<double> opacity SWIFT_PRIVATE;
|
|
45
|
+
std::optional<RNHeatmapGradient> gradient SWIFT_PRIVATE;
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
RNHeatmap() = default;
|
|
49
|
+
explicit RNHeatmap(std::string id, std::optional<bool> pressable, std::optional<double> zIndex, std::vector<RNHeatmapPoint> weightedData, std::optional<double> radius, std::optional<double> opacity, std::optional<RNHeatmapGradient> gradient): id(id), pressable(pressable), zIndex(zIndex), weightedData(weightedData), radius(radius), opacity(opacity), gradient(gradient) {}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
53
|
+
|
|
54
|
+
namespace margelo::nitro {
|
|
55
|
+
|
|
56
|
+
// C++ RNHeatmap <> JS RNHeatmap (object)
|
|
57
|
+
template <>
|
|
58
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNHeatmap> final {
|
|
59
|
+
static inline margelo::nitro::rngooglemapsplus::RNHeatmap fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
60
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
61
|
+
return margelo::nitro::rngooglemapsplus::RNHeatmap(
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "id")),
|
|
63
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "pressable")),
|
|
64
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "zIndex")),
|
|
65
|
+
JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNHeatmapPoint>>::fromJSI(runtime, obj.getProperty(runtime, "weightedData")),
|
|
66
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "radius")),
|
|
67
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "opacity")),
|
|
68
|
+
JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNHeatmapGradient>>::fromJSI(runtime, obj.getProperty(runtime, "gradient"))
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNHeatmap& arg) {
|
|
72
|
+
jsi::Object obj(runtime);
|
|
73
|
+
obj.setProperty(runtime, "id", JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
74
|
+
obj.setProperty(runtime, "pressable", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pressable));
|
|
75
|
+
obj.setProperty(runtime, "zIndex", JSIConverter<std::optional<double>>::toJSI(runtime, arg.zIndex));
|
|
76
|
+
obj.setProperty(runtime, "weightedData", JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNHeatmapPoint>>::toJSI(runtime, arg.weightedData));
|
|
77
|
+
obj.setProperty(runtime, "radius", JSIConverter<std::optional<double>>::toJSI(runtime, arg.radius));
|
|
78
|
+
obj.setProperty(runtime, "opacity", JSIConverter<std::optional<double>>::toJSI(runtime, arg.opacity));
|
|
79
|
+
obj.setProperty(runtime, "gradient", JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNHeatmapGradient>>::toJSI(runtime, arg.gradient));
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
83
|
+
if (!value.isObject()) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
jsi::Object obj = value.getObject(runtime);
|
|
87
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "id"))) return false;
|
|
88
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "pressable"))) return false;
|
|
89
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "zIndex"))) return false;
|
|
90
|
+
if (!JSIConverter<std::vector<margelo::nitro::rngooglemapsplus::RNHeatmapPoint>>::canConvert(runtime, obj.getProperty(runtime, "weightedData"))) return false;
|
|
91
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "radius"))) return false;
|
|
92
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "opacity"))) return false;
|
|
93
|
+
if (!JSIConverter<std::optional<margelo::nitro::rngooglemapsplus::RNHeatmapGradient>>::canConvert(runtime, obj.getProperty(runtime, "gradient"))) return false;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
} // namespace margelo::nitro
|