react-native-google-maps-plus 1.7.0-dev.3 → 1.7.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/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +52 -1
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +31 -0
- package/ios/GoogleMapViewImpl.swift +52 -1
- package/ios/RNGoogleMapsPlusView.swift +24 -0
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +6 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +6 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/RNGoogleMapsPlusOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_std__string_RNLatLng.hpp +77 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +115 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +12 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/Func_void_std__string_std__string_RNLatLng.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +84 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +52 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +42 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +30 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +6 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +210 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +12 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +72 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +6 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +6 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +6 -0
|
@@ -2,6 +2,7 @@ package com.rngooglemapsplus
|
|
|
2
2
|
|
|
3
3
|
import android.annotation.SuppressLint
|
|
4
4
|
import android.graphics.Bitmap
|
|
5
|
+
import android.location.Location
|
|
5
6
|
import android.util.Base64
|
|
6
7
|
import android.util.Size
|
|
7
8
|
import android.widget.FrameLayout
|
|
@@ -24,6 +25,7 @@ import com.google.android.gms.maps.model.MapColorScheme
|
|
|
24
25
|
import com.google.android.gms.maps.model.MapStyleOptions
|
|
25
26
|
import com.google.android.gms.maps.model.Marker
|
|
26
27
|
import com.google.android.gms.maps.model.MarkerOptions
|
|
28
|
+
import com.google.android.gms.maps.model.PointOfInterest
|
|
27
29
|
import com.google.android.gms.maps.model.Polygon
|
|
28
30
|
import com.google.android.gms.maps.model.PolygonOptions
|
|
29
31
|
import com.google.android.gms.maps.model.Polyline
|
|
@@ -59,12 +61,18 @@ class GoogleMapsViewImpl(
|
|
|
59
61
|
GoogleMap.OnCameraIdleListener,
|
|
60
62
|
GoogleMap.OnMapClickListener,
|
|
61
63
|
GoogleMap.OnMapLongClickListener,
|
|
64
|
+
GoogleMap.OnPoiClickListener,
|
|
62
65
|
GoogleMap.OnMarkerClickListener,
|
|
63
66
|
GoogleMap.OnPolylineClickListener,
|
|
64
67
|
GoogleMap.OnPolygonClickListener,
|
|
65
68
|
GoogleMap.OnCircleClickListener,
|
|
66
69
|
GoogleMap.OnMarkerDragListener,
|
|
67
70
|
GoogleMap.OnIndoorStateChangeListener,
|
|
71
|
+
GoogleMap.OnInfoWindowClickListener,
|
|
72
|
+
GoogleMap.OnInfoWindowCloseListener,
|
|
73
|
+
GoogleMap.OnInfoWindowLongClickListener,
|
|
74
|
+
GoogleMap.OnMyLocationClickListener,
|
|
75
|
+
GoogleMap.OnMyLocationButtonClickListener,
|
|
68
76
|
LifecycleEventListener {
|
|
69
77
|
private var initialized = false
|
|
70
78
|
private var destroyed = false
|
|
@@ -131,7 +139,13 @@ class GoogleMapsViewImpl(
|
|
|
131
139
|
googleMap?.setOnCircleClickListener(this@GoogleMapsViewImpl)
|
|
132
140
|
googleMap?.setOnMapClickListener(this@GoogleMapsViewImpl)
|
|
133
141
|
googleMap?.setOnMapLongClickListener(this@GoogleMapsViewImpl)
|
|
142
|
+
googleMap?.setOnPoiClickListener(this@GoogleMapsViewImpl)
|
|
134
143
|
googleMap?.setOnMarkerDragListener(this@GoogleMapsViewImpl)
|
|
144
|
+
googleMap?.setOnInfoWindowClickListener(this@GoogleMapsViewImpl)
|
|
145
|
+
googleMap?.setOnInfoWindowCloseListener(this@GoogleMapsViewImpl)
|
|
146
|
+
googleMap?.setOnInfoWindowLongClickListener(this@GoogleMapsViewImpl)
|
|
147
|
+
googleMap?.setOnMyLocationClickListener(this@GoogleMapsViewImpl)
|
|
148
|
+
googleMap?.setOnMyLocationButtonClickListener(this@GoogleMapsViewImpl)
|
|
135
149
|
onMapLoaded?.invoke(true)
|
|
136
150
|
}
|
|
137
151
|
applyProps()
|
|
@@ -393,6 +407,7 @@ class GoogleMapsViewImpl(
|
|
|
393
407
|
var onLocationError: ((RNLocationErrorCode) -> Unit)? = null
|
|
394
408
|
var onMapPress: ((RNLatLng) -> Unit)? = null
|
|
395
409
|
var onMapLongPress: ((RNLatLng) -> Unit)? = null
|
|
410
|
+
var onPoiPress: ((String, String, RNLatLng) -> Unit)? = null
|
|
396
411
|
var onMarkerPress: ((String?) -> Unit)? = null
|
|
397
412
|
var onPolylinePress: ((String?) -> Unit)? = null
|
|
398
413
|
var onPolygonPress: ((String?) -> Unit)? = null
|
|
@@ -402,6 +417,11 @@ class GoogleMapsViewImpl(
|
|
|
402
417
|
var onMarkerDragEnd: ((String?, RNLatLng) -> Unit)? = null
|
|
403
418
|
var onIndoorBuildingFocused: ((RNIndoorBuilding) -> Unit)? = null
|
|
404
419
|
var onIndoorLevelActivated: ((RNIndoorLevel) -> Unit)? = null
|
|
420
|
+
var onInfoWindowPress: ((String?) -> Unit)? = null
|
|
421
|
+
var onInfoWindowClose: ((String?) -> Unit)? = null
|
|
422
|
+
var onInfoWindowLongPress: ((String?) -> Unit)? = null
|
|
423
|
+
var onMyLocationPress: ((RNLocation) -> Unit)? = null
|
|
424
|
+
var onMyLocationButtonPress: ((Boolean) -> Unit)? = null
|
|
405
425
|
var onCameraChangeStart: ((RNRegion, RNCamera, Boolean) -> Unit)? = null
|
|
406
426
|
var onCameraChange: ((RNRegion, RNCamera, Boolean) -> Unit)? = null
|
|
407
427
|
var onCameraChangeComplete: ((RNRegion, RNCamera, Boolean) -> Unit)? = null
|
|
@@ -930,7 +950,13 @@ class GoogleMapsViewImpl(
|
|
|
930
950
|
setOnCircleClickListener(null)
|
|
931
951
|
setOnMapClickListener(null)
|
|
932
952
|
setOnMapLongClickListener(null)
|
|
953
|
+
setOnPoiClickListener(null)
|
|
933
954
|
setOnMarkerDragListener(null)
|
|
955
|
+
setOnInfoWindowClickListener(null)
|
|
956
|
+
setOnInfoWindowCloseListener(null)
|
|
957
|
+
setOnInfoWindowLongClickListener(null)
|
|
958
|
+
setOnMyLocationClickListener(null)
|
|
959
|
+
setOnMyLocationButtonClickListener(null)
|
|
934
960
|
}
|
|
935
961
|
googleMap = null
|
|
936
962
|
mapView?.apply {
|
|
@@ -988,7 +1014,7 @@ class GoogleMapsViewImpl(
|
|
|
988
1014
|
override fun onMarkerClick(marker: Marker): Boolean {
|
|
989
1015
|
marker.showInfoWindow()
|
|
990
1016
|
onMarkerPress?.invoke(marker.tag?.toString())
|
|
991
|
-
return
|
|
1017
|
+
return false
|
|
992
1018
|
}
|
|
993
1019
|
|
|
994
1020
|
override fun onPolylineClick(polyline: Polyline) {
|
|
@@ -1050,6 +1076,31 @@ class GoogleMapsViewImpl(
|
|
|
1050
1076
|
),
|
|
1051
1077
|
)
|
|
1052
1078
|
}
|
|
1079
|
+
|
|
1080
|
+
override fun onPoiClick(poi: PointOfInterest) {
|
|
1081
|
+
onPoiPress?.invoke(poi.placeId, poi.name, poi.latLng.toRnLatLng())
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
override fun onInfoWindowClick(marker: Marker) {
|
|
1085
|
+
onInfoWindowPress?.invoke(marker.tag?.toString())
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
override fun onInfoWindowClose(marker: Marker) {
|
|
1089
|
+
onInfoWindowClose?.invoke(marker.tag?.toString())
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
override fun onInfoWindowLongClick(marker: Marker) {
|
|
1093
|
+
onInfoWindowLongPress?.invoke(marker.tag?.toString())
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
override fun onMyLocationClick(location: Location) {
|
|
1097
|
+
onMyLocationPress?.invoke(location.toRnLocation())
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
override fun onMyLocationButtonClick(): Boolean {
|
|
1101
|
+
onMyLocationButtonPress?.invoke(true)
|
|
1102
|
+
return false
|
|
1103
|
+
}
|
|
1053
1104
|
}
|
|
1054
1105
|
|
|
1055
1106
|
private inline fun onUi(crossinline block: () -> Unit) {
|
|
@@ -263,6 +263,7 @@ class RNGoogleMapsPlusView(
|
|
|
263
263
|
view.addKmlLayer(id, next.kmlString)
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
+
|
|
266
267
|
override var urlTileOverlays: Array<RNUrlTileOverlay>? = null
|
|
267
268
|
set(value) {
|
|
268
269
|
if (field.contentEquals(value)) return
|
|
@@ -325,6 +326,11 @@ class RNGoogleMapsPlusView(
|
|
|
325
326
|
view.onMarkerPress = cb
|
|
326
327
|
}
|
|
327
328
|
|
|
329
|
+
override var onPoiPress: ((String, String, RNLatLng) -> Unit)? = null
|
|
330
|
+
set(cb) {
|
|
331
|
+
view.onPoiPress = cb
|
|
332
|
+
}
|
|
333
|
+
|
|
328
334
|
override var onPolylinePress: ((String?) -> Unit)? = null
|
|
329
335
|
set(cb) {
|
|
330
336
|
view.onPolylinePress = cb
|
|
@@ -365,6 +371,31 @@ class RNGoogleMapsPlusView(
|
|
|
365
371
|
view.onIndoorLevelActivated = cb
|
|
366
372
|
}
|
|
367
373
|
|
|
374
|
+
override var onInfoWindowPress: ((String?) -> Unit)? = null
|
|
375
|
+
set(cb) {
|
|
376
|
+
view.onInfoWindowPress = cb
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
override var onInfoWindowClose: ((String?) -> Unit)? = null
|
|
380
|
+
set(cb) {
|
|
381
|
+
view.onInfoWindowClose = cb
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
override var onInfoWindowLongPress: ((String?) -> Unit)? = null
|
|
385
|
+
set(cb) {
|
|
386
|
+
view.onInfoWindowLongPress = cb
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
override var onMyLocationPress: ((RNLocation) -> Unit)? = null
|
|
390
|
+
set(cb) {
|
|
391
|
+
view.onMyLocationPress = cb
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
override var onMyLocationButtonPress: ((Boolean) -> Unit)? = null
|
|
395
|
+
set(cb) {
|
|
396
|
+
view.onMyLocationButtonPress = cb
|
|
397
|
+
}
|
|
398
|
+
|
|
368
399
|
override var onCameraChangeStart: ((RNRegion, RNCamera, Boolean) -> Unit)? = null
|
|
369
400
|
set(cb) {
|
|
370
401
|
view.onCameraChangeStart = cb
|
|
@@ -267,6 +267,7 @@ GMSIndoorDisplayDelegate {
|
|
|
267
267
|
var onLocationError: ((_ error: RNLocationErrorCode) -> Void)?
|
|
268
268
|
var onMapPress: ((RNLatLng) -> Void)?
|
|
269
269
|
var onMapLongPress: ((RNLatLng) -> Void)?
|
|
270
|
+
var onPoiPress: ((String, String, RNLatLng) -> Void)?
|
|
270
271
|
var onMarkerPress: ((String?) -> Void)?
|
|
271
272
|
var onPolylinePress: ((String?) -> Void)?
|
|
272
273
|
var onPolygonPress: ((String?) -> Void)?
|
|
@@ -276,6 +277,11 @@ GMSIndoorDisplayDelegate {
|
|
|
276
277
|
var onMarkerDragEnd: ((String?, RNLatLng) -> Void)?
|
|
277
278
|
var onIndoorBuildingFocused: ((RNIndoorBuilding) -> Void)?
|
|
278
279
|
var onIndoorLevelActivated: ((RNIndoorLevel) -> Void)?
|
|
280
|
+
var onInfoWindowPress: ((String?) -> Void)?
|
|
281
|
+
var onInfoWindowClose: ((String?) -> Void)?
|
|
282
|
+
var onInfoWindowLongPress: ((String?) -> Void)?
|
|
283
|
+
var onMyLocationPress: ((RNLocation) -> Void)?
|
|
284
|
+
var onMyLocationButtonPress: ((Bool) -> Void)?
|
|
279
285
|
var onCameraChangeStart: ((RNRegion, RNCamera, Bool) -> Void)?
|
|
280
286
|
var onCameraChange: ((RNRegion, RNCamera, Bool) -> Void)?
|
|
281
287
|
var onCameraChangeComplete: ((RNRegion, RNCamera, Bool) -> Void)?
|
|
@@ -770,12 +776,18 @@ GMSIndoorDisplayDelegate {
|
|
|
770
776
|
}
|
|
771
777
|
}
|
|
772
778
|
|
|
779
|
+
func mapView(_ mapView: GMSMapView, didTapPOIWithPlaceID placeID: String, name: String, location: CLLocationCoordinate2D) {
|
|
780
|
+
onMain {
|
|
781
|
+
self.onPoiPress?(placeID, name, location.toRNLatLng())
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
773
785
|
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
|
|
774
786
|
onMain {
|
|
775
787
|
mapView.selectedMarker = marker
|
|
776
788
|
self.onMarkerPress?(marker.userData as? String, )
|
|
777
789
|
}
|
|
778
|
-
return
|
|
790
|
+
return false
|
|
779
791
|
}
|
|
780
792
|
|
|
781
793
|
func mapView(_ mapView: GMSMapView, didTap overlay: GMSOverlay) {
|
|
@@ -848,4 +860,43 @@ GMSIndoorDisplayDelegate {
|
|
|
848
860
|
)
|
|
849
861
|
}
|
|
850
862
|
}
|
|
863
|
+
|
|
864
|
+
func mapView(_ mapView: GMSMapView, didTapInfoWindowOf marker: GMSMarker) {
|
|
865
|
+
onMain {
|
|
866
|
+
self.onInfoWindowPress?(marker.userData as? String)
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
func mapView(_ mapView: GMSMapView, didCloseInfoWindowOf marker: GMSMarker) {
|
|
871
|
+
onMain {
|
|
872
|
+
self.onInfoWindowClose?(marker.userData as? String)
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
func mapView(
|
|
877
|
+
_ mapView: GMSMapView,
|
|
878
|
+
didLongPressInfoWindowOf marker: GMSMarker
|
|
879
|
+
) {
|
|
880
|
+
onMain {
|
|
881
|
+
self.onInfoWindowLongPress?(marker.userData as? String)
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
func mapView(
|
|
886
|
+
_ mapView: GMSMapView,
|
|
887
|
+
didTapMyLocation location: CLLocationCoordinate2D
|
|
888
|
+
) {
|
|
889
|
+
onMain {
|
|
890
|
+
self.mapView?.myLocation.map {
|
|
891
|
+
self.onMyLocationPress?($0.toRnLocation())
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
func didTapMyLocationButton(for mapView: GMSMapView) -> Bool {
|
|
897
|
+
onMain {
|
|
898
|
+
self.onMyLocationButtonPress?(true)
|
|
899
|
+
}
|
|
900
|
+
return false
|
|
901
|
+
}
|
|
851
902
|
}
|
|
@@ -345,6 +345,10 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
345
345
|
didSet { impl.onMapLongPress = onMapLongPress }
|
|
346
346
|
}
|
|
347
347
|
@MainActor
|
|
348
|
+
var onPoiPress: ((String, String, RNLatLng) -> Void)? {
|
|
349
|
+
didSet { impl.onPoiPress = onPoiPress }
|
|
350
|
+
}
|
|
351
|
+
@MainActor
|
|
348
352
|
var onMarkerPress: ((String?) -> Void)? {
|
|
349
353
|
didSet { impl.onMarkerPress = onMarkerPress }
|
|
350
354
|
}
|
|
@@ -381,6 +385,26 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
|
|
|
381
385
|
didSet { impl.onIndoorLevelActivated = onIndoorLevelActivated }
|
|
382
386
|
}
|
|
383
387
|
@MainActor
|
|
388
|
+
var onInfoWindowPress: ((String?) -> Void)?{
|
|
389
|
+
didSet { impl.onInfoWindowPress = onInfoWindowPress }
|
|
390
|
+
}
|
|
391
|
+
@MainActor
|
|
392
|
+
var onInfoWindowClose: ((String?) -> Void)?{
|
|
393
|
+
didSet { impl.onInfoWindowClose = onInfoWindowClose }
|
|
394
|
+
}
|
|
395
|
+
@MainActor
|
|
396
|
+
var onInfoWindowLongPress: ((String?) -> Void)?{
|
|
397
|
+
didSet { impl.onInfoWindowLongPress = onInfoWindowLongPress }
|
|
398
|
+
}
|
|
399
|
+
@MainActor
|
|
400
|
+
var onMyLocationPress: ((RNLocation) -> Void)?{
|
|
401
|
+
didSet { impl.onMyLocationPress = onMyLocationPress }
|
|
402
|
+
}
|
|
403
|
+
@MainActor
|
|
404
|
+
var onMyLocationButtonPress: ((Bool) -> Void)? {
|
|
405
|
+
didSet { impl.onMyLocationButtonPress = onMyLocationButtonPress }
|
|
406
|
+
}
|
|
407
|
+
@MainActor
|
|
384
408
|
var onCameraChangeStart: ((RNRegion, RNCamera, Bool) -> Void)? {
|
|
385
409
|
didSet { impl.onCameraChangeStart = onCameraChangeStart }
|
|
386
410
|
}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"onLocationError": true,
|
|
31
31
|
"onMapPress": true,
|
|
32
32
|
"onMapLongPress": true,
|
|
33
|
+
"onPoiPress": true,
|
|
33
34
|
"onMarkerPress": true,
|
|
34
35
|
"onPolylinePress": true,
|
|
35
36
|
"onPolygonPress": true,
|
|
@@ -39,6 +40,11 @@
|
|
|
39
40
|
"onMarkerDragEnd": true,
|
|
40
41
|
"onIndoorBuildingFocused": true,
|
|
41
42
|
"onIndoorLevelActivated": true,
|
|
43
|
+
"onInfoWindowPress": true,
|
|
44
|
+
"onInfoWindowClose": true,
|
|
45
|
+
"onInfoWindowLongPress": true,
|
|
46
|
+
"onMyLocationPress": true,
|
|
47
|
+
"onMyLocationButtonPress": true,
|
|
42
48
|
"onCameraChangeStart": true,
|
|
43
49
|
"onCameraChange": true,
|
|
44
50
|
"onCameraChangeComplete": true,
|
|
@@ -27,6 +27,7 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
27
27
|
onLocationError?: (error: RNLocationErrorCode) => void;
|
|
28
28
|
onMapPress?: (coordinate: RNLatLng) => void;
|
|
29
29
|
onMapLongPress?: (coordinate: RNLatLng) => void;
|
|
30
|
+
onPoiPress?: (placeId: string, name: string, coordinate: RNLatLng) => void;
|
|
30
31
|
onMarkerPress?: (id?: string | undefined) => void;
|
|
31
32
|
onPolylinePress?: (id?: string | undefined) => void;
|
|
32
33
|
onPolygonPress?: (id?: string | undefined) => void;
|
|
@@ -36,6 +37,11 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
36
37
|
onMarkerDragEnd?: (id: string | undefined, location: RNLatLng) => void;
|
|
37
38
|
onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
|
|
38
39
|
onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
|
|
40
|
+
onInfoWindowPress?: (id?: string) => void;
|
|
41
|
+
onInfoWindowClose?: (id?: string) => void;
|
|
42
|
+
onInfoWindowLongPress?: (id?: string) => void;
|
|
43
|
+
onMyLocationPress?: (location: RNLocation) => void;
|
|
44
|
+
onMyLocationButtonPress?: (pressed: boolean) => void;
|
|
39
45
|
onCameraChangeStart?: (region: RNRegion, camera: RNCamera, isGesture: boolean) => void;
|
|
40
46
|
onCameraChange?: (region: RNRegion, camera: RNCamera, isGesture: boolean) => void;
|
|
41
47
|
onCameraChangeComplete?: (region: RNRegion, camera: RNCamera, isGesture: 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,EAChB,eAAe,EACf,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,aAAa,CAAC,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EAAE,QAAQ,EAChB,SAAS,EAAE,OAAO,KACf,IAAI,CAAC;IACV,sBAAsB,CAAC,EAAE,CACvB,MAAM,EAAE,QAAQ,EAChB,MAAM,EAAE,QAAQ,EAChB,SAAS,EAAE,OAAO,KACf,IAAI,CAAC;CACX;AAED,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3E,sBAAsB,CACpB,WAAW,EAAE,QAAQ,EAAE,EACvB,OAAO,CAAC,EAAE,YAAY,EACtB,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,CAAC;IAER,eAAe,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAE/C,eAAe,CACb,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,OAAO,GACnB,IAAI,CAAC;IAER,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAElE,kBAAkB,IAAI,IAAI,CAAC;IAE3B,oBAAoB,IAAI,IAAI,CAAC;IAE7B,yBAAyB,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEjE,6BAA6B,IAAI,OAAO,CAAC;CAC1C;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC3C,yBAAyB,EACzB,2BAA2B,CAC5B,CAAC"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
#include "JFunc_void_RNLocation.hpp"
|
|
23
23
|
#include "JFunc_void_RNLocationErrorCode.hpp"
|
|
24
24
|
#include "JFunc_void_RNLatLng.hpp"
|
|
25
|
+
#include "JFunc_void_std__string_std__string_RNLatLng.hpp"
|
|
25
26
|
#include "JFunc_void_std__optional_std__string_.hpp"
|
|
26
27
|
#include "JFunc_void_std__optional_std__string__RNLatLng.hpp"
|
|
27
28
|
#include "JFunc_void_RNIndoorBuilding.hpp"
|
|
@@ -46,6 +47,7 @@ int initialize(JavaVM* vm) {
|
|
|
46
47
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNLocation_cxx::registerNatives();
|
|
47
48
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNLocationErrorCode_cxx::registerNatives();
|
|
48
49
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNLatLng_cxx::registerNatives();
|
|
50
|
+
margelo::nitro::rngooglemapsplus::JFunc_void_std__string_std__string_RNLatLng_cxx::registerNatives();
|
|
49
51
|
margelo::nitro::rngooglemapsplus::JFunc_void_std__optional_std__string__cxx::registerNatives();
|
|
50
52
|
margelo::nitro::rngooglemapsplus::JFunc_void_std__optional_std__string__RNLatLng_cxx::registerNatives();
|
|
51
53
|
margelo::nitro::rngooglemapsplus::JFunc_void_RNIndoorBuilding_cxx::registerNatives();
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_std__string_std__string_RNLatLng.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
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <string>
|
|
14
|
+
#include "RNLatLng.hpp"
|
|
15
|
+
#include <functional>
|
|
16
|
+
#include "JRNLatLng.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(placeId: String, name: String, coordinate: RNLatLng) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_std__string_std__string_RNLatLng: public jni::JavaClass<JFunc_void_std__string_std__string_RNLatLng> {
|
|
27
|
+
public:
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string_std__string_RNLatLng;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_std__string_std__string_RNLatLng` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(const std::string& placeId, const std::string& name, const RNLatLng& coordinate) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* placeId */, jni::alias_ref<jni::JString> /* name */, jni::alias_ref<JRNLatLng> /* coordinate */)>("invoke");
|
|
36
|
+
method(self(), jni::make_jstring(placeId), jni::make_jstring(name), JRNLatLng::fromCpp(coordinate));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_std__string_std__string_RNLatLng that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
struct JFunc_void_std__string_std__string_RNLatLng_cxx final: public jni::HybridClass<JFunc_void_std__string_std__string_RNLatLng_cxx, JFunc_void_std__string_std__string_RNLatLng> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_std__string_std__string_RNLatLng::javaobject> fromCpp(const std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>& func) {
|
|
46
|
+
return JFunc_void_std__string_std__string_RNLatLng_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_std__string_std__string_RNLatLng_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<jni::JString> placeId, jni::alias_ref<jni::JString> name, jni::alias_ref<JRNLatLng> coordinate) {
|
|
54
|
+
_func(placeId->toStdString(), name->toStdString(), coordinate->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static auto constexpr kJavaDescriptor = "Lcom/rngooglemapsplus/Func_void_std__string_std__string_RNLatLng_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_std__string_std__string_RNLatLng_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_std__string_std__string_RNLatLng_cxx(const std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -167,6 +167,7 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNSnapshotResultType; }
|
|
|
167
167
|
#include "JFunc_void_RNLocationErrorCode.hpp"
|
|
168
168
|
#include "JRNLocationErrorCode.hpp"
|
|
169
169
|
#include "JFunc_void_RNLatLng.hpp"
|
|
170
|
+
#include "JFunc_void_std__string_std__string_RNLatLng.hpp"
|
|
170
171
|
#include "JFunc_void_std__optional_std__string_.hpp"
|
|
171
172
|
#include "JFunc_void_std__optional_std__string__RNLatLng.hpp"
|
|
172
173
|
#include "RNIndoorBuilding.hpp"
|
|
@@ -643,6 +644,25 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
643
644
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNLatLng::javaobject> /* onMapLongPress */)>("setOnMapLongPress_cxx");
|
|
644
645
|
method(_javaPart, onMapLongPress.has_value() ? JFunc_void_RNLatLng_cxx::fromCpp(onMapLongPress.value()) : nullptr);
|
|
645
646
|
}
|
|
647
|
+
std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> JHybridRNGoogleMapsPlusViewSpec::getOnPoiPress() {
|
|
648
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string_std__string_RNLatLng::javaobject>()>("getOnPoiPress_cxx");
|
|
649
|
+
auto __result = method(_javaPart);
|
|
650
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)> {
|
|
651
|
+
if (__result->isInstanceOf(JFunc_void_std__string_std__string_RNLatLng_cxx::javaClassStatic())) [[likely]] {
|
|
652
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__string_std__string_RNLatLng_cxx::javaobject>(__result);
|
|
653
|
+
return downcast->cthis()->getFunction();
|
|
654
|
+
} else {
|
|
655
|
+
auto __resultRef = jni::make_global(__result);
|
|
656
|
+
return [__resultRef](std::string placeId, std::string name, RNLatLng coordinate) -> void {
|
|
657
|
+
return __resultRef->invoke(placeId,name,coordinate);
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
}()) : std::nullopt;
|
|
661
|
+
}
|
|
662
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnPoiPress(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& onPoiPress) {
|
|
663
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string_std__string_RNLatLng::javaobject> /* onPoiPress */)>("setOnPoiPress_cxx");
|
|
664
|
+
method(_javaPart, onPoiPress.has_value() ? JFunc_void_std__string_std__string_RNLatLng_cxx::fromCpp(onPoiPress.value()) : nullptr);
|
|
665
|
+
}
|
|
646
666
|
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMarkerPress() {
|
|
647
667
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnMarkerPress_cxx");
|
|
648
668
|
auto __result = method(_javaPart);
|
|
@@ -814,6 +834,101 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
814
834
|
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNIndoorLevel::javaobject> /* onIndoorLevelActivated */)>("setOnIndoorLevelActivated_cxx");
|
|
815
835
|
method(_javaPart, onIndoorLevelActivated.has_value() ? JFunc_void_RNIndoorLevel_cxx::fromCpp(onIndoorLevelActivated.value()) : nullptr);
|
|
816
836
|
}
|
|
837
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowPress() {
|
|
838
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowPress_cxx");
|
|
839
|
+
auto __result = method(_javaPart);
|
|
840
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
841
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
842
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
843
|
+
return downcast->cthis()->getFunction();
|
|
844
|
+
} else {
|
|
845
|
+
auto __resultRef = jni::make_global(__result);
|
|
846
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
847
|
+
return __resultRef->invoke(id);
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
}()) : std::nullopt;
|
|
851
|
+
}
|
|
852
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) {
|
|
853
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowPress */)>("setOnInfoWindowPress_cxx");
|
|
854
|
+
method(_javaPart, onInfoWindowPress.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowPress.value()) : nullptr);
|
|
855
|
+
}
|
|
856
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowClose() {
|
|
857
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowClose_cxx");
|
|
858
|
+
auto __result = method(_javaPart);
|
|
859
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
860
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
861
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
862
|
+
return downcast->cthis()->getFunction();
|
|
863
|
+
} else {
|
|
864
|
+
auto __resultRef = jni::make_global(__result);
|
|
865
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
866
|
+
return __resultRef->invoke(id);
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
}()) : std::nullopt;
|
|
870
|
+
}
|
|
871
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) {
|
|
872
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowClose */)>("setOnInfoWindowClose_cxx");
|
|
873
|
+
method(_javaPart, onInfoWindowClose.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowClose.value()) : nullptr);
|
|
874
|
+
}
|
|
875
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> JHybridRNGoogleMapsPlusViewSpec::getOnInfoWindowLongPress() {
|
|
876
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__optional_std__string_::javaobject>()>("getOnInfoWindowLongPress_cxx");
|
|
877
|
+
auto __result = method(_javaPart);
|
|
878
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::optional<std::string>& /* id */)> {
|
|
879
|
+
if (__result->isInstanceOf(JFunc_void_std__optional_std__string__cxx::javaClassStatic())) [[likely]] {
|
|
880
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__optional_std__string__cxx::javaobject>(__result);
|
|
881
|
+
return downcast->cthis()->getFunction();
|
|
882
|
+
} else {
|
|
883
|
+
auto __resultRef = jni::make_global(__result);
|
|
884
|
+
return [__resultRef](std::optional<std::string> id) -> void {
|
|
885
|
+
return __resultRef->invoke(id);
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
}()) : std::nullopt;
|
|
889
|
+
}
|
|
890
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) {
|
|
891
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__optional_std__string_::javaobject> /* onInfoWindowLongPress */)>("setOnInfoWindowLongPress_cxx");
|
|
892
|
+
method(_javaPart, onInfoWindowLongPress.has_value() ? JFunc_void_std__optional_std__string__cxx::fromCpp(onInfoWindowLongPress.value()) : nullptr);
|
|
893
|
+
}
|
|
894
|
+
std::optional<std::function<void(const RNLocation& /* location */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMyLocationPress() {
|
|
895
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNLocation::javaobject>()>("getOnMyLocationPress_cxx");
|
|
896
|
+
auto __result = method(_javaPart);
|
|
897
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const RNLocation& /* location */)> {
|
|
898
|
+
if (__result->isInstanceOf(JFunc_void_RNLocation_cxx::javaClassStatic())) [[likely]] {
|
|
899
|
+
auto downcast = jni::static_ref_cast<JFunc_void_RNLocation_cxx::javaobject>(__result);
|
|
900
|
+
return downcast->cthis()->getFunction();
|
|
901
|
+
} else {
|
|
902
|
+
auto __resultRef = jni::make_global(__result);
|
|
903
|
+
return [__resultRef](RNLocation location) -> void {
|
|
904
|
+
return __resultRef->invoke(location);
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
}()) : std::nullopt;
|
|
908
|
+
}
|
|
909
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) {
|
|
910
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_RNLocation::javaobject> /* onMyLocationPress */)>("setOnMyLocationPress_cxx");
|
|
911
|
+
method(_javaPart, onMyLocationPress.has_value() ? JFunc_void_RNLocation_cxx::fromCpp(onMyLocationPress.value()) : nullptr);
|
|
912
|
+
}
|
|
913
|
+
std::optional<std::function<void(bool /* pressed */)>> JHybridRNGoogleMapsPlusViewSpec::getOnMyLocationButtonPress() {
|
|
914
|
+
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_bool::javaobject>()>("getOnMyLocationButtonPress_cxx");
|
|
915
|
+
auto __result = method(_javaPart);
|
|
916
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(bool /* pressed */)> {
|
|
917
|
+
if (__result->isInstanceOf(JFunc_void_bool_cxx::javaClassStatic())) [[likely]] {
|
|
918
|
+
auto downcast = jni::static_ref_cast<JFunc_void_bool_cxx::javaobject>(__result);
|
|
919
|
+
return downcast->cthis()->getFunction();
|
|
920
|
+
} else {
|
|
921
|
+
auto __resultRef = jni::make_global(__result);
|
|
922
|
+
return [__resultRef](bool pressed) -> void {
|
|
923
|
+
return __resultRef->invoke(pressed);
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
}()) : std::nullopt;
|
|
927
|
+
}
|
|
928
|
+
void JHybridRNGoogleMapsPlusViewSpec::setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) {
|
|
929
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_bool::javaobject> /* onMyLocationButtonPress */)>("setOnMyLocationButtonPress_cxx");
|
|
930
|
+
method(_javaPart, onMyLocationButtonPress.has_value() ? JFunc_void_bool_cxx::fromCpp(onMyLocationButtonPress.value()) : nullptr);
|
|
931
|
+
}
|
|
817
932
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> JHybridRNGoogleMapsPlusViewSpec::getOnCameraChangeStart() {
|
|
818
933
|
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JFunc_void_RNRegion_RNCamera_bool::javaobject>()>("getOnCameraChangeStart_cxx");
|
|
819
934
|
auto __result = method(_javaPart);
|
|
@@ -101,6 +101,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
101
101
|
void setOnMapPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapPress) override;
|
|
102
102
|
std::optional<std::function<void(const RNLatLng& /* coordinate */)>> getOnMapLongPress() override;
|
|
103
103
|
void setOnMapLongPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapLongPress) override;
|
|
104
|
+
std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> getOnPoiPress() override;
|
|
105
|
+
void setOnPoiPress(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& onPoiPress) override;
|
|
104
106
|
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnMarkerPress() override;
|
|
105
107
|
void setOnMarkerPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onMarkerPress) override;
|
|
106
108
|
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnPolylinePress() override;
|
|
@@ -119,6 +121,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
119
121
|
void setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) override;
|
|
120
122
|
std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> getOnIndoorLevelActivated() override;
|
|
121
123
|
void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) override;
|
|
124
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowPress() override;
|
|
125
|
+
void setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) override;
|
|
126
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowClose() override;
|
|
127
|
+
void setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) override;
|
|
128
|
+
std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowLongPress() override;
|
|
129
|
+
void setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) override;
|
|
130
|
+
std::optional<std::function<void(const RNLocation& /* location */)>> getOnMyLocationPress() override;
|
|
131
|
+
void setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) override;
|
|
132
|
+
std::optional<std::function<void(bool /* pressed */)>> getOnMyLocationButtonPress() override;
|
|
133
|
+
void setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) override;
|
|
122
134
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() override;
|
|
123
135
|
void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) override;
|
|
124
136
|
std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() override;
|
|
@@ -140,6 +140,10 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
140
140
|
view->setOnMapLongPress(props.onMapLongPress.value);
|
|
141
141
|
// TODO: Set isDirty = false
|
|
142
142
|
}
|
|
143
|
+
if (props.onPoiPress.isDirty) {
|
|
144
|
+
view->setOnPoiPress(props.onPoiPress.value);
|
|
145
|
+
// TODO: Set isDirty = false
|
|
146
|
+
}
|
|
143
147
|
if (props.onMarkerPress.isDirty) {
|
|
144
148
|
view->setOnMarkerPress(props.onMarkerPress.value);
|
|
145
149
|
// TODO: Set isDirty = false
|
|
@@ -176,6 +180,26 @@ void JHybridRNGoogleMapsPlusViewStateUpdater::updateViewProps(jni::alias_ref<jni
|
|
|
176
180
|
view->setOnIndoorLevelActivated(props.onIndoorLevelActivated.value);
|
|
177
181
|
// TODO: Set isDirty = false
|
|
178
182
|
}
|
|
183
|
+
if (props.onInfoWindowPress.isDirty) {
|
|
184
|
+
view->setOnInfoWindowPress(props.onInfoWindowPress.value);
|
|
185
|
+
// TODO: Set isDirty = false
|
|
186
|
+
}
|
|
187
|
+
if (props.onInfoWindowClose.isDirty) {
|
|
188
|
+
view->setOnInfoWindowClose(props.onInfoWindowClose.value);
|
|
189
|
+
// TODO: Set isDirty = false
|
|
190
|
+
}
|
|
191
|
+
if (props.onInfoWindowLongPress.isDirty) {
|
|
192
|
+
view->setOnInfoWindowLongPress(props.onInfoWindowLongPress.value);
|
|
193
|
+
// TODO: Set isDirty = false
|
|
194
|
+
}
|
|
195
|
+
if (props.onMyLocationPress.isDirty) {
|
|
196
|
+
view->setOnMyLocationPress(props.onMyLocationPress.value);
|
|
197
|
+
// TODO: Set isDirty = false
|
|
198
|
+
}
|
|
199
|
+
if (props.onMyLocationButtonPress.isDirty) {
|
|
200
|
+
view->setOnMyLocationButtonPress(props.onMyLocationButtonPress.value);
|
|
201
|
+
// TODO: Set isDirty = false
|
|
202
|
+
}
|
|
179
203
|
if (props.onCameraChangeStart.isDirty) {
|
|
180
204
|
view->setOnCameraChangeStart(props.onCameraChangeStart.value);
|
|
181
205
|
// TODO: Set isDirty = false
|