react-native-google-maps-plus 1.1.0-dev.2 → 1.1.0-dev.4
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 +91 -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/MapHeatmapBuilder.kt +31 -0
- 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 +61 -71
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNHeatmapPointExtension.kt +9 -0
- package/ios/GoogleMapViewImpl.swift +129 -213
- package/ios/LocationHandler.swift +2 -10
- package/ios/MapCircleBuilder.swift +23 -8
- package/ios/MapHeatmapBuilder.swift +27 -0
- 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 +31 -14
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- package/ios/extensions/RNHeatmap+Extension.swift +16 -0
- 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 +3 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +24 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +48 -15
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
- 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++/JRNMapZoomConfig.hpp +57 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +7 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
- 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/RNMapZoomConfig.kt +32 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +101 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +12 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +23 -11
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +9 -9
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +39 -19
- package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
- 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/RNMapZoomConfig.swift +70 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +4 -4
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -4
- package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
- 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++/RNMapZoomConfig.hpp +71 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +19 -19
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -2
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -2
- package/package.json +12 -12
- package/src/RNGoogleMapsPlusView.nitro.ts +4 -2
- package/src/types.ts +28 -1
|
@@ -25,13 +25,49 @@ final class MapMarkerBuilder {
|
|
|
25
25
|
x: m.anchor?.x ?? 0.5,
|
|
26
26
|
y: m.anchor?.y ?? 0.5
|
|
27
27
|
)
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
m.zIndex.map { marker.zIndex = Int32($0) }
|
|
30
|
+
|
|
29
31
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { [weak marker] in
|
|
30
32
|
marker?.tracksViewChanges = false
|
|
31
33
|
}
|
|
34
|
+
|
|
32
35
|
return marker
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
@MainActor
|
|
39
|
+
func update(_ prev: RNMarker, _ next: RNMarker, _ m: GMSMarker) {
|
|
40
|
+
m.position = CLLocationCoordinate2D(
|
|
41
|
+
latitude: next.coordinate.latitude,
|
|
42
|
+
longitude: next.coordinate.longitude
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
m.zIndex = Int32(next.zIndex ?? 0)
|
|
46
|
+
|
|
47
|
+
m.groundAnchor = CGPoint(
|
|
48
|
+
x: next.anchor?.x ?? 0.5,
|
|
49
|
+
y: next.anchor?.y ?? 0.5
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
if !prev.markerStyleEquals(next) {
|
|
53
|
+
buildIconAsync(next.id, next) { img in
|
|
54
|
+
m.tracksViewChanges = true
|
|
55
|
+
m.icon = img
|
|
56
|
+
|
|
57
|
+
if prev.anchor?.x != next.anchor?.x || prev.anchor?.y != next.anchor?.y {
|
|
58
|
+
m.groundAnchor = CGPoint(
|
|
59
|
+
x: next.anchor?.x ?? 0.5,
|
|
60
|
+
y: next.anchor?.y ?? 0.5
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { [weak m] in
|
|
65
|
+
m?.tracksViewChanges = false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
35
71
|
@MainActor
|
|
36
72
|
func buildIconAsync(
|
|
37
73
|
_ id: String,
|
|
@@ -53,14 +89,10 @@ final class MapMarkerBuilder {
|
|
|
53
89
|
|
|
54
90
|
let task = Task(priority: .userInitiated) { [weak self] in
|
|
55
91
|
guard let self else { return }
|
|
56
|
-
defer {
|
|
57
|
-
self.tasks.removeValue(forKey: id)
|
|
58
|
-
}
|
|
92
|
+
defer { self.tasks.removeValue(forKey: id) }
|
|
59
93
|
|
|
60
94
|
let img = await self.renderUIImage(m)
|
|
61
|
-
guard let img, !Task.isCancelled else {
|
|
62
|
-
return
|
|
63
|
-
}
|
|
95
|
+
guard let img, !Task.isCancelled else { return }
|
|
64
96
|
|
|
65
97
|
self.iconCache.setObject(img, forKey: key)
|
|
66
98
|
|
|
@@ -68,44 +100,11 @@ final class MapMarkerBuilder {
|
|
|
68
100
|
guard !Task.isCancelled else { return }
|
|
69
101
|
onReady(img)
|
|
70
102
|
}
|
|
71
|
-
|
|
72
103
|
}
|
|
73
104
|
|
|
74
105
|
tasks[id] = task
|
|
75
106
|
}
|
|
76
107
|
|
|
77
|
-
@MainActor
|
|
78
|
-
func updateMarker(_ prev: RNMarker, _ next: RNMarker, _ m: GMSMarker) {
|
|
79
|
-
m.position = CLLocationCoordinate2D(
|
|
80
|
-
latitude: next.coordinate.latitude,
|
|
81
|
-
longitude: next.coordinate.longitude
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
if let zi = next.zIndex { m.zIndex = Int32(zi) }
|
|
85
|
-
|
|
86
|
-
m.groundAnchor = CGPoint(
|
|
87
|
-
x: next.anchor?.x ?? 0.5,
|
|
88
|
-
y: next.anchor?.y ?? 0.5
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
if !prev.markerStyleEquals(next) {
|
|
92
|
-
buildIconAsync(next.id, next) { img in
|
|
93
|
-
m.tracksViewChanges = true
|
|
94
|
-
m.icon = img
|
|
95
|
-
if prev.anchor?.x != next.anchor?.x || prev.anchor?.y != next.anchor?.y {
|
|
96
|
-
m.groundAnchor = CGPoint(
|
|
97
|
-
x: next.anchor?.x ?? 0.5,
|
|
98
|
-
y: next.anchor?.y ?? 0.5
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { [weak m] in
|
|
103
|
-
m?.tracksViewChanges = false
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
108
|
func cancelIconTask(_ id: String) {
|
|
110
109
|
tasks[id]?.cancel()
|
|
111
110
|
tasks.removeValue(forKey: id)
|
|
@@ -181,5 +180,4 @@ final class MapMarkerBuilder {
|
|
|
181
180
|
onCancel: {}
|
|
182
181
|
)
|
|
183
182
|
}
|
|
184
|
-
|
|
185
183
|
}
|
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
import GoogleMaps
|
|
2
2
|
|
|
3
3
|
final class MapPolygonBuilder {
|
|
4
|
-
|
|
5
|
-
func buildPolygon(_ p: RNPolygon) -> GMSPolygon {
|
|
4
|
+
func build(_ p: RNPolygon) -> GMSPolygon {
|
|
6
5
|
let path = GMSMutablePath()
|
|
7
6
|
p.coordinates.forEach {
|
|
8
7
|
path.add(
|
|
9
8
|
CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude)
|
|
10
9
|
)
|
|
11
10
|
}
|
|
11
|
+
|
|
12
12
|
let pg = GMSPolygon(path: path)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
|
|
14
|
+
p.fillColor.map { pg.fillColor = $0.toUIColor() }
|
|
15
|
+
p.strokeColor.map { pg.strokeColor = $0.toUIColor() }
|
|
16
|
+
p.strokeWidth.map { pg.strokeWidth = CGFloat($0) }
|
|
17
|
+
p.pressable.map { pg.isTappable = $0 }
|
|
18
|
+
p.zIndex.map { pg.zIndex = Int32($0) }
|
|
19
|
+
|
|
18
20
|
return pg
|
|
19
21
|
}
|
|
22
|
+
|
|
23
|
+
func update(_ next: RNPolygon, _ pg: GMSPolygon) {
|
|
24
|
+
let path = GMSMutablePath()
|
|
25
|
+
next.coordinates.forEach {
|
|
26
|
+
path.add(
|
|
27
|
+
CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude)
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
pg.path = path
|
|
31
|
+
|
|
32
|
+
pg.fillColor = next.fillColor?.toUIColor() ?? .clear
|
|
33
|
+
pg.strokeColor = next.strokeColor?.toUIColor() ?? .black
|
|
34
|
+
pg.strokeWidth = CGFloat(next.strokeWidth ?? 1.0)
|
|
35
|
+
pg.isTappable = next.pressable ?? false
|
|
36
|
+
pg.zIndex = Int32(next.zIndex ?? 0)
|
|
37
|
+
}
|
|
20
38
|
}
|
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
import GoogleMaps
|
|
2
2
|
|
|
3
3
|
final class MapPolylineBuilder {
|
|
4
|
-
func
|
|
4
|
+
func build(_ p: RNPolyline) -> GMSPolyline {
|
|
5
5
|
let path = GMSMutablePath()
|
|
6
6
|
p.coordinates.forEach {
|
|
7
7
|
path.add(
|
|
8
8
|
CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude)
|
|
9
9
|
)
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
let pl = GMSPolyline(path: path)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if let pr = p.pressable { pl.isTappable = pr }
|
|
21
|
-
if let zi = p.zIndex { pl.zIndex = Int32(zi) }
|
|
13
|
+
|
|
14
|
+
p.width.map { pl.strokeWidth = CGFloat($0) }
|
|
15
|
+
p.color.map { pl.strokeColor = $0.toUIColor() }
|
|
16
|
+
p.lineCap.map { _ in /* not supported */ }
|
|
17
|
+
p.lineJoin.map { _ in /* not supported */ }
|
|
18
|
+
p.pressable.map { pl.isTappable = $0 }
|
|
19
|
+
p.zIndex.map { pl.zIndex = Int32($0) }
|
|
20
|
+
|
|
22
21
|
return pl
|
|
23
22
|
}
|
|
23
|
+
|
|
24
|
+
func update(_ next: RNPolyline, _ pl: GMSPolyline) {
|
|
25
|
+
let path = GMSMutablePath()
|
|
26
|
+
next.coordinates.forEach {
|
|
27
|
+
path.add(
|
|
28
|
+
CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude)
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
pl.path = path
|
|
32
|
+
|
|
33
|
+
/* lineCap not supported */
|
|
34
|
+
/* lineJoin not supported */
|
|
35
|
+
pl.strokeWidth = CGFloat(next.width ?? 1.0)
|
|
36
|
+
pl.strokeColor = next.color?.toUIColor() ?? .black
|
|
37
|
+
pl.isTappable = next.pressable ?? false
|
|
38
|
+
pl.zIndex = Int32(next.zIndex ?? 0)
|
|
39
|
+
}
|
|
24
40
|
}
|
|
@@ -12,6 +12,7 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
12
12
|
private let polylineBuilder = MapPolylineBuilder()
|
|
13
13
|
private let polygonBuilder = MapPolygonBuilder()
|
|
14
14
|
private let circleBuilder = MapCircleBuilder()
|
|
15
|
+
private let heatmapBuilder = MapHeatmapBuilder()
|
|
15
16
|
|
|
16
17
|
private let impl: GoogleMapsViewImpl
|
|
17
18
|
|
|
@@ -88,13 +89,8 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
@MainActor
|
|
91
|
-
var
|
|
92
|
-
didSet { impl.
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@MainActor
|
|
96
|
-
var maxZoomLevel: Double? {
|
|
97
|
-
didSet { impl.maxZoomLevel = maxZoomLevel }
|
|
92
|
+
var mapZoomConfig: RNMapZoomConfig? {
|
|
93
|
+
didSet { impl.mapZoomConfig = mapZoomConfig }
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
@MainActor
|
|
@@ -135,7 +131,7 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
135
131
|
if let prev = prevById[id] {
|
|
136
132
|
if !prev.markerEquals(next) {
|
|
137
133
|
impl.updateMarker(id: id) { m in
|
|
138
|
-
self.markerBuilder.
|
|
134
|
+
self.markerBuilder.update(prev, next, m)
|
|
139
135
|
}
|
|
140
136
|
}
|
|
141
137
|
} else {
|
|
@@ -168,13 +164,13 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
168
164
|
if let prev = prevById[id] {
|
|
169
165
|
if !prev.polylineEquals(next) {
|
|
170
166
|
impl.updatePolyline(id: id) { pl in
|
|
171
|
-
|
|
167
|
+
self.polylineBuilder.update(next, pl)
|
|
172
168
|
}
|
|
173
169
|
}
|
|
174
170
|
} else {
|
|
175
171
|
impl.addPolyline(
|
|
176
172
|
id: id,
|
|
177
|
-
polyline: polylineBuilder.
|
|
173
|
+
polyline: polylineBuilder.build(next)
|
|
178
174
|
)
|
|
179
175
|
}
|
|
180
176
|
}
|
|
@@ -200,11 +196,11 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
200
196
|
if let prev = prevById[id] {
|
|
201
197
|
if !prev.polygonEquals(next) {
|
|
202
198
|
impl.updatePolygon(id: id) { pg in
|
|
203
|
-
|
|
199
|
+
self.polygonBuilder.update(next, pg)
|
|
204
200
|
}
|
|
205
201
|
}
|
|
206
202
|
} else {
|
|
207
|
-
impl.addPolygon(id: id, polygon: polygonBuilder.
|
|
203
|
+
impl.addPolygon(id: id, polygon: polygonBuilder.build(next))
|
|
208
204
|
}
|
|
209
205
|
}
|
|
210
206
|
}
|
|
@@ -229,16 +225,37 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
229
225
|
if let prev = prevById[id] {
|
|
230
226
|
if !prev.circleEquals(next) {
|
|
231
227
|
impl.updateCircle(id: id) { circle in
|
|
232
|
-
|
|
228
|
+
self.circleBuilder.update(next, circle)
|
|
233
229
|
}
|
|
234
230
|
}
|
|
235
231
|
} else {
|
|
236
|
-
impl.addCircle(id: id, circle: circleBuilder.
|
|
232
|
+
impl.addCircle(id: id, circle: circleBuilder.build(next))
|
|
237
233
|
}
|
|
238
234
|
}
|
|
239
235
|
}
|
|
240
236
|
}
|
|
241
237
|
|
|
238
|
+
@MainActor
|
|
239
|
+
var heatmaps: [RNHeatmap]? {
|
|
240
|
+
didSet {
|
|
241
|
+
let prevById = Dictionary(
|
|
242
|
+
(oldValue ?? []).map { ($0.id, $0) },
|
|
243
|
+
uniquingKeysWith: { _, new in new }
|
|
244
|
+
)
|
|
245
|
+
let nextById = Dictionary(
|
|
246
|
+
(heatmaps ?? []).map { ($0.id, $0) },
|
|
247
|
+
uniquingKeysWith: { _, new in new }
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
let removed = Set(prevById.keys).subtracting(nextById.keys)
|
|
251
|
+
removed.forEach { impl.removeHeatmap(id: $0) }
|
|
252
|
+
|
|
253
|
+
for (id, next) in nextById {
|
|
254
|
+
impl.addHeatmap(id: id, heatmap: heatmapBuilder.build(next))
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
242
259
|
@MainActor var locationConfig: RNLocationConfig? {
|
|
243
260
|
didSet {
|
|
244
261
|
impl.locationConfig = locationConfig
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import GoogleMaps
|
|
2
2
|
|
|
3
3
|
extension RNCircle {
|
|
4
|
-
func updateCircle(_ next: RNCircle, _ c: GMSCircle) {
|
|
5
|
-
c.position = CLLocationCoordinate2D(
|
|
6
|
-
latitude: next.center.latitude,
|
|
7
|
-
longitude: next.center.longitude
|
|
8
|
-
)
|
|
9
|
-
if let r = next.radius { c.radius = r }
|
|
10
|
-
if let fc = next.fillColor?.toUIColor() { c.fillColor = fc }
|
|
11
|
-
if let sc = next.strokeColor?.toUIColor() { c.strokeColor = sc }
|
|
12
|
-
if let sw = next.strokeWidth { c.strokeWidth = CGFloat(sw) }
|
|
13
|
-
if let pr = next.pressable { c.isTappable = pr }
|
|
14
|
-
if let zi = next.zIndex { c.zIndex = Int32(zi) }
|
|
15
|
-
}
|
|
16
|
-
|
|
17
4
|
func circleEquals(_ b: RNCircle) -> Bool {
|
|
18
5
|
zIndex == b.zIndex && pressable == b.pressable
|
|
19
6
|
&& center.latitude == b.center.latitude
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import CoreLocation
|
|
2
|
+
import Foundation
|
|
3
|
+
import GoogleMapsUtils
|
|
4
|
+
|
|
5
|
+
extension RNHeatmapPoint {
|
|
6
|
+
func toWeightedLatLng() -> GMUWeightedLatLng {
|
|
7
|
+
let coord = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
|
|
8
|
+
return GMUWeightedLatLng(coordinate: coord, intensity: Float(weight))
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
extension Array where Element == RNHeatmapPoint {
|
|
13
|
+
func toWeightedLatLngs() -> [GMUWeightedLatLng] {
|
|
14
|
+
map { $0.toWeightedLatLng() }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import GoogleMaps
|
|
2
2
|
|
|
3
3
|
extension RNPolygon {
|
|
4
|
-
func updatePolygon(_ next: RNPolygon, _ pg: GMSPolygon) {
|
|
5
|
-
let path = GMSMutablePath()
|
|
6
|
-
next.coordinates.forEach {
|
|
7
|
-
path.add(
|
|
8
|
-
CLLocationCoordinate2D(
|
|
9
|
-
latitude: $0.latitude,
|
|
10
|
-
longitude: $0.longitude
|
|
11
|
-
)
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
pg.path = path
|
|
15
|
-
|
|
16
|
-
if let fc = next.fillColor?.toUIColor() { pg.fillColor = fc }
|
|
17
|
-
if let sc = next.strokeColor?.toUIColor() { pg.strokeColor = sc }
|
|
18
|
-
if let sw = next.strokeWidth { pg.strokeWidth = CGFloat(sw) }
|
|
19
|
-
if let pr = next.pressable { pg.isTappable = pr }
|
|
20
|
-
if let zi = next.zIndex { pg.zIndex = Int32(zi) }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
4
|
func polygonEquals(_ b: RNPolygon) -> Bool {
|
|
24
5
|
guard zIndex == b.zIndex,
|
|
25
6
|
pressable == b.pressable,
|
|
@@ -28,12 +9,14 @@ extension RNPolygon {
|
|
|
28
9
|
strokeColor == b.strokeColor,
|
|
29
10
|
coordinates.count == b.coordinates.count
|
|
30
11
|
else { return false }
|
|
12
|
+
|
|
31
13
|
for i in 0..<coordinates.count {
|
|
32
14
|
if coordinates[i].latitude != b.coordinates[i].latitude
|
|
33
15
|
|| coordinates[i].longitude != b.coordinates[i].longitude {
|
|
34
16
|
return false
|
|
35
17
|
}
|
|
36
18
|
}
|
|
19
|
+
|
|
37
20
|
return true
|
|
38
21
|
}
|
|
39
22
|
}
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
import GoogleMaps
|
|
2
2
|
|
|
3
3
|
extension RNPolyline {
|
|
4
|
-
func updatePolyline(_ next: RNPolyline, _ pl: GMSPolyline) {
|
|
5
|
-
let path = GMSMutablePath()
|
|
6
|
-
next.coordinates.forEach {
|
|
7
|
-
path.add(
|
|
8
|
-
CLLocationCoordinate2D(
|
|
9
|
-
latitude: $0.latitude,
|
|
10
|
-
longitude: $0.longitude
|
|
11
|
-
)
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
pl.path = path
|
|
15
|
-
if let w = next.width { pl.strokeWidth = CGFloat(w) }
|
|
16
|
-
if let cap = next.lineCap {
|
|
17
|
-
pl.spans = nil
|
|
18
|
-
/// gms.lineCap = mapLineCap(cap)
|
|
19
|
-
}
|
|
20
|
-
if let join = next.lineJoin {
|
|
21
|
-
/// gms.strokeJoin = mapLineJoin(join)
|
|
22
|
-
}
|
|
23
|
-
if let c = next.color?.toUIColor() {
|
|
24
|
-
pl.strokeColor = c
|
|
25
|
-
}
|
|
26
|
-
if let pr = next.pressable { pl.isTappable = pr }
|
|
27
|
-
if let zi = next.zIndex { pl.zIndex = Int32(zi) }
|
|
28
|
-
}
|
|
29
|
-
|
|
30
4
|
func polylineEquals(_ b: RNPolyline) -> Bool {
|
|
31
5
|
guard zIndex == b.zIndex,
|
|
32
6
|
(width ?? 0) == (b.width ?? 0),
|
|
@@ -35,6 +9,7 @@ extension RNPolyline {
|
|
|
35
9
|
color == b.color,
|
|
36
10
|
coordinates.count == b.coordinates.count
|
|
37
11
|
else { return false }
|
|
12
|
+
|
|
38
13
|
for i in 0..<coordinates.count {
|
|
39
14
|
if coordinates[i].latitude != b.coordinates[i].latitude
|
|
40
15
|
|| coordinates[i].longitude != b.coordinates[i].longitude {
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RNAndroidLocationPriority","RNIOSLocationAccuracy","RNAndroidLocationPermissionResult","RNIOSPermissionResult","RNLocationErrorCode","RNMapErrorCode"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["RNAndroidLocationPriority","RNIOSLocationAccuracy","RNAndroidLocationPermissionResult","RNIOSPermissionResult","RNLocationErrorCode","RNMapErrorCode"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AA0CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;;AA0HA,WAAYA,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAzBA,yBAAyB,CAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AAYrC,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAYjC,WAAYC,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC,CAAjCA,iCAAiC;EAAjCA,iCAAiC,CAAjCA,iCAAiC;EAAjCA,iCAAiC,CAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;AAM7C,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAArBA,qBAAqB,CAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAUjC,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAnBA,mBAAmB,CAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAS/B,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridView, HybridViewMethods, HybridViewProps } from 'react-native-nitro-modules';
|
|
2
|
-
import type { RNCamera, RNLatLng, RNMapPadding, RNPolygon, RNPolyline, RNUserInterfaceStyle, RNLocationErrorCode, RNMarker, RNLocationPermissionResult, RNRegion, RNLocation, RNMapErrorCode, RNMapType, RNInitialProps, RNCircle, RNMapUiSettings, RNLocationConfig } from './types';
|
|
2
|
+
import type { RNCamera, RNLatLng, RNMapPadding, RNPolygon, RNPolyline, RNUserInterfaceStyle, RNLocationErrorCode, RNMarker, RNLocationPermissionResult, RNRegion, RNLocation, RNMapErrorCode, RNMapType, RNInitialProps, RNCircle, RNMapUiSettings, RNLocationConfig, RNMapZoomConfig, RNHeatmap } from './types';
|
|
3
3
|
export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
4
4
|
initialProps?: RNInitialProps;
|
|
5
5
|
uiSettings?: RNMapUiSettings;
|
|
@@ -9,14 +9,14 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
9
9
|
indoorEnabled?: boolean;
|
|
10
10
|
customMapStyle?: string;
|
|
11
11
|
userInterfaceStyle?: RNUserInterfaceStyle;
|
|
12
|
-
|
|
13
|
-
maxZoomLevel?: number;
|
|
12
|
+
mapZoomConfig?: RNMapZoomConfig;
|
|
14
13
|
mapPadding?: RNMapPadding;
|
|
15
14
|
mapType?: RNMapType;
|
|
16
15
|
markers?: RNMarker[];
|
|
17
16
|
polygons?: RNPolygon[];
|
|
18
17
|
polylines?: RNPolyline[];
|
|
19
18
|
circles?: RNCircle[];
|
|
19
|
+
heatmaps?: RNHeatmap[];
|
|
20
20
|
locationConfig?: RNLocationConfig;
|
|
21
21
|
onMapError?: (error: RNMapErrorCode) => void;
|
|
22
22
|
onMapReady?: (ready: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RNGoogleMapsPlusView.nitro.d.ts","sourceRoot":"","sources":["../../../src/RNGoogleMapsPlusView.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,QAAQ,EACR,0BAA0B,EAC1B,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,cAAc,EACd,QAAQ,EACR,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"RNGoogleMapsPlusView.nitro.d.ts","sourceRoot":"","sources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AAO,CAAC,0BAA0B,CAAC,CAAC;IAEjE,6BAA6B,IAAI,OAAO,CAAC;CAC1C;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC3C,yBAAyB,EACzB,2BAA2B,CAC5B,CAAC"}
|
|
@@ -67,6 +67,10 @@ export type RNPosition = {
|
|
|
67
67
|
x: number;
|
|
68
68
|
y: number;
|
|
69
69
|
};
|
|
70
|
+
export type RNMapZoomConfig = {
|
|
71
|
+
min?: number;
|
|
72
|
+
max?: number;
|
|
73
|
+
};
|
|
70
74
|
export type RNLineCapType = 'butt' | 'round' | 'square';
|
|
71
75
|
export type RNLineJoinType = 'miter' | 'round' | 'bevel';
|
|
72
76
|
export type RNMarker = {
|
|
@@ -105,11 +109,30 @@ export type RNCircle = {
|
|
|
105
109
|
pressable?: boolean;
|
|
106
110
|
zIndex?: number;
|
|
107
111
|
center: RNLatLng;
|
|
108
|
-
radius
|
|
112
|
+
radius: number;
|
|
109
113
|
strokeWidth?: number;
|
|
110
114
|
strokeColor?: string;
|
|
111
115
|
fillColor?: string;
|
|
112
116
|
};
|
|
117
|
+
export type RNHeatmap = {
|
|
118
|
+
id: string;
|
|
119
|
+
pressable?: boolean;
|
|
120
|
+
zIndex?: number;
|
|
121
|
+
weightedData: RNHeatmapPoint[];
|
|
122
|
+
radius?: number;
|
|
123
|
+
opacity?: number;
|
|
124
|
+
gradient?: RNHeatmapGradient;
|
|
125
|
+
};
|
|
126
|
+
export type RNHeatmapPoint = {
|
|
127
|
+
latitude: number;
|
|
128
|
+
longitude: number;
|
|
129
|
+
weight: number;
|
|
130
|
+
};
|
|
131
|
+
export type RNHeatmapGradient = {
|
|
132
|
+
colors: string[];
|
|
133
|
+
startPoints: number[];
|
|
134
|
+
colorMapSize: number;
|
|
135
|
+
};
|
|
113
136
|
export type RNLocationConfig = {
|
|
114
137
|
android?: RNAndroidLocationConfig;
|
|
115
138
|
ios?: RNIOSLocationConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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C/B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,aAAa,IAAI;IACjB,0BAA0B,IAAI;IAC9B,8BAA8B,IAAI;IAClC,kBAAkB,IAAI;CACvB;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,iCAAiC,CAAC;IAC5C,GAAG,CAAC,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,oBAAY,iCAAiC;IAC3C,OAAO,IAAI;IACX,MAAM,KAAK;IACX,eAAe,KAAK;CACrB;AAED,oBAAY,qBAAqB;IAC/B,MAAM,KAAK;IACX,UAAU,IAAI;CACf;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,mBAAmB;IAC7B,iBAAiB,IAAI;IACrB,oBAAoB,IAAI;IACxB,OAAO,IAAI;IACX,0BAA0B,IAAI;IAC9B,sBAAsB,IAAI;IAC1B,cAAc,KAAK;CACpB;AAED,oBAAY,cAAc;IACxB,qBAAqB,IAAI;IACzB,qBAAqB,IAAI;IACzB,sBAAsB,IAAI;IAC1B,sBAAsB,IAAI;IAC1B,6BAA6B,IAAI;IACjC,qBAAqB,IAAI;IACzB,OAAO,IAAI;CACZ"}
|
|
@@ -17,6 +17,8 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
|
17
17
|
namespace margelo::nitro::rngooglemapsplus { struct RNMapUiSettings; }
|
|
18
18
|
// Forward declaration of `RNUserInterfaceStyle` to properly resolve imports.
|
|
19
19
|
namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
|
|
20
|
+
// Forward declaration of `RNMapZoomConfig` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNMapZoomConfig; }
|
|
20
22
|
// Forward declaration of `RNMapPadding` to properly resolve imports.
|
|
21
23
|
namespace margelo::nitro::rngooglemapsplus { struct RNMapPadding; }
|
|
22
24
|
// Forward declaration of `RNMapType` to properly resolve imports.
|
|
@@ -37,6 +39,12 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNLineCapType; }
|
|
|
37
39
|
namespace margelo::nitro::rngooglemapsplus { enum class RNLineJoinType; }
|
|
38
40
|
// Forward declaration of `RNCircle` to properly resolve imports.
|
|
39
41
|
namespace margelo::nitro::rngooglemapsplus { struct RNCircle; }
|
|
42
|
+
// Forward declaration of `RNHeatmap` to properly resolve imports.
|
|
43
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmap; }
|
|
44
|
+
// Forward declaration of `RNHeatmapPoint` to properly resolve imports.
|
|
45
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmapPoint; }
|
|
46
|
+
// Forward declaration of `RNHeatmapGradient` to properly resolve imports.
|
|
47
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNHeatmapGradient; }
|
|
40
48
|
// Forward declaration of `RNLocationConfig` to properly resolve imports.
|
|
41
49
|
namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
|
|
42
50
|
// Forward declaration of `RNAndroidLocationConfig` to properly resolve imports.
|
|
@@ -74,6 +82,8 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
|
74
82
|
#include "JRNMapUiSettings.hpp"
|
|
75
83
|
#include "RNUserInterfaceStyle.hpp"
|
|
76
84
|
#include "JRNUserInterfaceStyle.hpp"
|
|
85
|
+
#include "RNMapZoomConfig.hpp"
|
|
86
|
+
#include "JRNMapZoomConfig.hpp"
|
|
77
87
|
#include "RNMapPadding.hpp"
|
|
78
88
|
#include "JRNMapPadding.hpp"
|
|
79
89
|
#include "RNMapType.hpp"
|
|
@@ -95,6 +105,12 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
|
|
|
95
105
|
#include "JRNLineJoinType.hpp"
|
|
96
106
|
#include "RNCircle.hpp"
|
|
97
107
|
#include "JRNCircle.hpp"
|
|
108
|
+
#include "RNHeatmap.hpp"
|
|
109
|
+
#include "JRNHeatmap.hpp"
|
|
110
|
+
#include "RNHeatmapPoint.hpp"
|
|
111
|
+
#include "JRNHeatmapPoint.hpp"
|
|
112
|
+
#include "RNHeatmapGradient.hpp"
|
|
113
|
+
#include "JRNHeatmapGradient.hpp"
|
|
98
114
|
#include "RNLocationConfig.hpp"
|
|
99
115
|
#include "JRNLocationConfig.hpp"
|
|
100
116
|
#include "RNAndroidLocationConfig.hpp"
|
|
@@ -225,23 +241,14 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
225
241
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNUserInterfaceStyle> /* userInterfaceStyle */)>("setUserInterfaceStyle");
|
|
226
242
|
method(_javaPart, userInterfaceStyle.has_value() ? JRNUserInterfaceStyle::fromCpp(userInterfaceStyle.value()) : nullptr);
|
|
227
243
|
}
|
|
228
|
-
std::optional<
|
|
229
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<
|
|
244
|
+
std::optional<RNMapZoomConfig> JHybridRNGoogleMapsPlusViewSpec::getMapZoomConfig() {
|
|
245
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JRNMapZoomConfig>()>("getMapZoomConfig");
|
|
230
246
|
auto __result = method(_javaPart);
|
|
231
|
-
return __result != nullptr ? std::make_optional(__result->
|
|
232
|
-
}
|
|
233
|
-
void JHybridRNGoogleMapsPlusViewSpec::setMinZoomLevel(std::optional<double> minZoomLevel) {
|
|
234
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JDouble> /* minZoomLevel */)>("setMinZoomLevel");
|
|
235
|
-
method(_javaPart, minZoomLevel.has_value() ? jni::JDouble::valueOf(minZoomLevel.value()) : nullptr);
|
|
236
|
-
}
|
|
237
|
-
std::optional<double> JHybridRNGoogleMapsPlusViewSpec::getMaxZoomLevel() {
|
|
238
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JDouble>()>("getMaxZoomLevel");
|
|
239
|
-
auto __result = method(_javaPart);
|
|
240
|
-
return __result != nullptr ? std::make_optional(__result->value()) : std::nullopt;
|
|
247
|
+
return __result != nullptr ? std::make_optional(__result->toCpp()) : std::nullopt;
|
|
241
248
|
}
|
|
242
|
-
void JHybridRNGoogleMapsPlusViewSpec::
|
|
243
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<
|
|
244
|
-
method(_javaPart,
|
|
249
|
+
void JHybridRNGoogleMapsPlusViewSpec::setMapZoomConfig(const std::optional<RNMapZoomConfig>& mapZoomConfig) {
|
|
250
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRNMapZoomConfig> /* mapZoomConfig */)>("setMapZoomConfig");
|
|
251
|
+
method(_javaPart, mapZoomConfig.has_value() ? JRNMapZoomConfig::fromCpp(mapZoomConfig.value()) : nullptr);
|
|
245
252
|
}
|
|
246
253
|
std::optional<RNMapPadding> JHybridRNGoogleMapsPlusViewSpec::getMapPadding() {
|
|
247
254
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JRNMapPadding>()>("getMapPadding");
|
|
@@ -365,6 +372,32 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
365
372
|
return __array;
|
|
366
373
|
}() : nullptr);
|
|
367
374
|
}
|
|
375
|
+
std::optional<std::vector<RNHeatmap>> JHybridRNGoogleMapsPlusViewSpec::getHeatmaps() {
|
|
376
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JArrayClass<JRNHeatmap>>()>("getHeatmaps");
|
|
377
|
+
auto __result = method(_javaPart);
|
|
378
|
+
return __result != nullptr ? std::make_optional([&]() {
|
|
379
|
+
size_t __size = __result->size();
|
|
380
|
+
std::vector<RNHeatmap> __vector;
|
|
381
|
+
__vector.reserve(__size);
|
|
382
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
383
|
+
auto __element = __result->getElement(__i);
|
|
384
|
+
__vector.push_back(__element->toCpp());
|
|
385
|
+
}
|
|
386
|
+
return __vector;
|
|
387
|
+
}()) : std::nullopt;
|
|
388
|
+
}
|
|
389
|
+
void JHybridRNGoogleMapsPlusViewSpec::setHeatmaps(const std::optional<std::vector<RNHeatmap>>& heatmaps) {
|
|
390
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JArrayClass<JRNHeatmap>> /* heatmaps */)>("setHeatmaps");
|
|
391
|
+
method(_javaPart, heatmaps.has_value() ? [&]() {
|
|
392
|
+
size_t __size = heatmaps.value().size();
|
|
393
|
+
jni::local_ref<jni::JArrayClass<JRNHeatmap>> __array = jni::JArrayClass<JRNHeatmap>::newArray(__size);
|
|
394
|
+
for (size_t __i = 0; __i < __size; __i++) {
|
|
395
|
+
const auto& __element = heatmaps.value()[__i];
|
|
396
|
+
__array->setElement(__i, *JRNHeatmap::fromCpp(__element));
|
|
397
|
+
}
|
|
398
|
+
return __array;
|
|
399
|
+
}() : nullptr);
|
|
400
|
+
}
|
|
368
401
|
std::optional<RNLocationConfig> JHybridRNGoogleMapsPlusViewSpec::getLocationConfig() {
|
|
369
402
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JRNLocationConfig>()>("getLocationConfig");
|
|
370
403
|
auto __result = method(_javaPart);
|