react-native-google-maps-plus 1.7.0-dev.2 → 1.7.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/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +9 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +66 -0
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +7 -1
- package/ios/GoogleMapViewImpl.swift +7 -0
- package/ios/RNGoogleMapsPlusView.swift +4 -0
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +1 -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 +20 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +4 -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 +14 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +37 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +7 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +5 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__string_RNLatLng.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +32 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +1 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +1 -0
|
@@ -24,6 +24,7 @@ import com.google.android.gms.maps.model.MapColorScheme
|
|
|
24
24
|
import com.google.android.gms.maps.model.MapStyleOptions
|
|
25
25
|
import com.google.android.gms.maps.model.Marker
|
|
26
26
|
import com.google.android.gms.maps.model.MarkerOptions
|
|
27
|
+
import com.google.android.gms.maps.model.PointOfInterest
|
|
27
28
|
import com.google.android.gms.maps.model.Polygon
|
|
28
29
|
import com.google.android.gms.maps.model.PolygonOptions
|
|
29
30
|
import com.google.android.gms.maps.model.Polyline
|
|
@@ -59,6 +60,7 @@ class GoogleMapsViewImpl(
|
|
|
59
60
|
GoogleMap.OnCameraIdleListener,
|
|
60
61
|
GoogleMap.OnMapClickListener,
|
|
61
62
|
GoogleMap.OnMapLongClickListener,
|
|
63
|
+
GoogleMap.OnPoiClickListener,
|
|
62
64
|
GoogleMap.OnMarkerClickListener,
|
|
63
65
|
GoogleMap.OnPolylineClickListener,
|
|
64
66
|
GoogleMap.OnPolygonClickListener,
|
|
@@ -131,6 +133,7 @@ class GoogleMapsViewImpl(
|
|
|
131
133
|
googleMap?.setOnCircleClickListener(this@GoogleMapsViewImpl)
|
|
132
134
|
googleMap?.setOnMapClickListener(this@GoogleMapsViewImpl)
|
|
133
135
|
googleMap?.setOnMapLongClickListener(this@GoogleMapsViewImpl)
|
|
136
|
+
googleMap?.setOnPoiClickListener(this@GoogleMapsViewImpl)
|
|
134
137
|
googleMap?.setOnMarkerDragListener(this@GoogleMapsViewImpl)
|
|
135
138
|
onMapLoaded?.invoke(true)
|
|
136
139
|
}
|
|
@@ -393,6 +396,7 @@ class GoogleMapsViewImpl(
|
|
|
393
396
|
var onLocationError: ((RNLocationErrorCode) -> Unit)? = null
|
|
394
397
|
var onMapPress: ((RNLatLng) -> Unit)? = null
|
|
395
398
|
var onMapLongPress: ((RNLatLng) -> Unit)? = null
|
|
399
|
+
var onPoiPress: ((String, String, RNLatLng) -> Unit)? = null
|
|
396
400
|
var onMarkerPress: ((String?) -> Unit)? = null
|
|
397
401
|
var onPolylinePress: ((String?) -> Unit)? = null
|
|
398
402
|
var onPolygonPress: ((String?) -> Unit)? = null
|
|
@@ -930,6 +934,7 @@ class GoogleMapsViewImpl(
|
|
|
930
934
|
setOnCircleClickListener(null)
|
|
931
935
|
setOnMapClickListener(null)
|
|
932
936
|
setOnMapLongClickListener(null)
|
|
937
|
+
setOnPoiClickListener(null)
|
|
933
938
|
setOnMarkerDragListener(null)
|
|
934
939
|
}
|
|
935
940
|
googleMap = null
|
|
@@ -1050,6 +1055,10 @@ class GoogleMapsViewImpl(
|
|
|
1050
1055
|
),
|
|
1051
1056
|
)
|
|
1052
1057
|
}
|
|
1058
|
+
|
|
1059
|
+
override fun onPoiClick(poi: PointOfInterest) {
|
|
1060
|
+
onPoiPress?.invoke(poi.placeId, poi.name, poi.latLng.toRnLatLng())
|
|
1061
|
+
}
|
|
1053
1062
|
}
|
|
1054
1063
|
|
|
1055
1064
|
private inline fun onUi(crossinline block: () -> Unit) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
package com.rngooglemapsplus
|
|
2
2
|
|
|
3
3
|
import android.graphics.Bitmap
|
|
4
|
+
import android.graphics.BitmapFactory
|
|
4
5
|
import android.graphics.Canvas
|
|
6
|
+
import android.graphics.Typeface
|
|
5
7
|
import android.util.Base64
|
|
6
8
|
import android.util.LruCache
|
|
7
9
|
import androidx.core.graphics.createBitmap
|
|
8
10
|
import com.caverock.androidsvg.SVG
|
|
9
11
|
import com.caverock.androidsvg.SVGExternalFileResolver
|
|
10
12
|
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
|
13
|
+
import com.facebook.react.uimanager.ThemedReactContext
|
|
11
14
|
import com.google.android.gms.maps.model.BitmapDescriptor
|
|
12
15
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory
|
|
13
16
|
import com.google.android.gms.maps.model.Marker
|
|
@@ -22,10 +25,13 @@ import kotlinx.coroutines.SupervisorJob
|
|
|
22
25
|
import kotlinx.coroutines.ensureActive
|
|
23
26
|
import kotlinx.coroutines.launch
|
|
24
27
|
import kotlinx.coroutines.withContext
|
|
28
|
+
import java.net.HttpURLConnection
|
|
29
|
+
import java.net.URL
|
|
25
30
|
import java.net.URLDecoder
|
|
26
31
|
import kotlin.coroutines.coroutineContext
|
|
27
32
|
|
|
28
33
|
class MapMarkerBuilder(
|
|
34
|
+
val context: ThemedReactContext,
|
|
29
35
|
private val scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default),
|
|
30
36
|
) {
|
|
31
37
|
private val iconCache =
|
|
@@ -39,6 +45,7 @@ class MapMarkerBuilder(
|
|
|
39
45
|
private val jobsById = mutableMapOf<String, Job>()
|
|
40
46
|
|
|
41
47
|
init {
|
|
48
|
+
// / TODO: refactor with androidsvg 1.5 release
|
|
42
49
|
SVG.registerExternalFileResolver(
|
|
43
50
|
object : SVGExternalFileResolver() {
|
|
44
51
|
override fun resolveImage(filename: String?): Bitmap? {
|
|
@@ -64,11 +71,70 @@ class MapMarkerBuilder(
|
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
73
|
|
|
74
|
+
filename.startsWith("http://") || filename.startsWith("https://") -> {
|
|
75
|
+
val conn =
|
|
76
|
+
(URL(filename).openConnection() as HttpURLConnection).apply {
|
|
77
|
+
connectTimeout = 5000
|
|
78
|
+
readTimeout = 5000
|
|
79
|
+
requestMethod = "GET"
|
|
80
|
+
instanceFollowRedirects = true
|
|
81
|
+
}
|
|
82
|
+
conn.connect()
|
|
83
|
+
|
|
84
|
+
val contentType = conn.contentType ?: ""
|
|
85
|
+
val result =
|
|
86
|
+
if (contentType.contains("svg") || filename.endsWith(".svg")) {
|
|
87
|
+
val svgText = conn.inputStream.bufferedReader().use { it.readText() }
|
|
88
|
+
val innerSvg = SVG.getFromString(svgText)
|
|
89
|
+
val w = innerSvg.documentWidth.takeIf { it > 0 } ?: 128f
|
|
90
|
+
val h = innerSvg.documentHeight.takeIf { it > 0 } ?: 128f
|
|
91
|
+
val bmp = createBitmap(w.toInt(), h.toInt())
|
|
92
|
+
val canvas = Canvas(bmp)
|
|
93
|
+
innerSvg.renderToCanvas(canvas)
|
|
94
|
+
bmp
|
|
95
|
+
} else {
|
|
96
|
+
conn.inputStream.use { BitmapFactory.decodeStream(it) }
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
conn.disconnect()
|
|
100
|
+
result
|
|
101
|
+
}
|
|
102
|
+
|
|
67
103
|
else -> null
|
|
68
104
|
}
|
|
69
105
|
}.getOrNull()
|
|
70
106
|
}
|
|
71
107
|
|
|
108
|
+
override fun resolveFont(
|
|
109
|
+
fontFamily: String?,
|
|
110
|
+
fontWeight: Int,
|
|
111
|
+
fontStyle: String?,
|
|
112
|
+
): Typeface? {
|
|
113
|
+
if (fontFamily.isNullOrBlank()) return null
|
|
114
|
+
|
|
115
|
+
return runCatching {
|
|
116
|
+
val assetManager = context.assets
|
|
117
|
+
|
|
118
|
+
val candidates =
|
|
119
|
+
listOf(
|
|
120
|
+
"fonts/$fontFamily.ttf",
|
|
121
|
+
"fonts/$fontFamily.otf",
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
for (path in candidates) {
|
|
125
|
+
try {
|
|
126
|
+
return Typeface.createFromAsset(assetManager, path)
|
|
127
|
+
} catch (_: Throwable) {
|
|
128
|
+
// / ignore
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
Typeface.create(fontFamily, Typeface.NORMAL)
|
|
133
|
+
}.getOrElse {
|
|
134
|
+
Typeface.create(fontFamily, fontWeight)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
72
138
|
override fun isFormatSupported(mimeType: String?): Boolean = mimeType?.startsWith("image/") == true
|
|
73
139
|
},
|
|
74
140
|
)
|
|
@@ -29,7 +29,7 @@ class RNGoogleMapsPlusView(
|
|
|
29
29
|
private var locationHandler = LocationHandler(context)
|
|
30
30
|
private var playServiceHandler = PlayServicesHandler(context)
|
|
31
31
|
|
|
32
|
-
private val markerBuilder = MapMarkerBuilder()
|
|
32
|
+
private val markerBuilder = MapMarkerBuilder(context)
|
|
33
33
|
private val polylineBuilder = MapPolylineBuilder()
|
|
34
34
|
private val polygonBuilder = MapPolygonBuilder()
|
|
35
35
|
private val circleBuilder = MapCircleBuilder()
|
|
@@ -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
|
|
@@ -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)?
|
|
@@ -770,6 +771,12 @@ GMSIndoorDisplayDelegate {
|
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
773
|
|
|
774
|
+
func mapView(_ mapView: GMSMapView, didTapPOIWithPlaceID placeID: String, name: String, location: CLLocationCoordinate2D) {
|
|
775
|
+
onMain {
|
|
776
|
+
self.onPoiPress?(placeID, name, location.toRNLatLng())
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
773
780
|
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
|
|
774
781
|
onMain {
|
|
775
782
|
mapView.selectedMarker = marker
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -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,EAAE,eAAe,CAAC;IAChC,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS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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);
|
|
@@ -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;
|
|
@@ -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
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__string_std__string_RNLatLng.kt
|
|
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
|
+
package com.rngooglemapsplus
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import com.margelo.nitro.core.*
|
|
14
|
+
import dalvik.annotation.optimization.FastNative
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Represents the JavaScript callback `(placeId: string, name: string, coordinate: struct) => void`.
|
|
19
|
+
* This can be either implemented in C++ (in which case it might be a callback coming from JS),
|
|
20
|
+
* or in Kotlin/Java (in which case it is a native callback).
|
|
21
|
+
*/
|
|
22
|
+
@DoNotStrip
|
|
23
|
+
@Keep
|
|
24
|
+
@Suppress("ClassName", "RedundantUnitReturnType")
|
|
25
|
+
fun interface Func_void_std__string_std__string_RNLatLng: (String, String, RNLatLng) -> Unit {
|
|
26
|
+
/**
|
|
27
|
+
* Call the given JS callback.
|
|
28
|
+
* @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
|
|
29
|
+
*/
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
override fun invoke(placeId: String, name: String, coordinate: RNLatLng): Unit
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Represents the JavaScript callback `(placeId: string, name: string, coordinate: struct) => void`.
|
|
37
|
+
* This is implemented in C++, via a `std::function<...>`.
|
|
38
|
+
* The callback might be coming from JS.
|
|
39
|
+
*/
|
|
40
|
+
@DoNotStrip
|
|
41
|
+
@Keep
|
|
42
|
+
@Suppress(
|
|
43
|
+
"KotlinJniMissingFunction", "unused",
|
|
44
|
+
"RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
|
|
45
|
+
"ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
|
|
46
|
+
)
|
|
47
|
+
class Func_void_std__string_std__string_RNLatLng_cxx: Func_void_std__string_std__string_RNLatLng {
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
private val mHybridData: HybridData
|
|
51
|
+
|
|
52
|
+
@DoNotStrip
|
|
53
|
+
@Keep
|
|
54
|
+
private constructor(hybridData: HybridData) {
|
|
55
|
+
mHybridData = hybridData
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@DoNotStrip
|
|
59
|
+
@Keep
|
|
60
|
+
override fun invoke(placeId: String, name: String, coordinate: RNLatLng): Unit
|
|
61
|
+
= invoke_cxx(placeId,name,coordinate)
|
|
62
|
+
|
|
63
|
+
@FastNative
|
|
64
|
+
private external fun invoke_cxx(placeId: String, name: String, coordinate: RNLatLng): Unit
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Represents the JavaScript callback `(placeId: string, name: string, coordinate: struct) => void`.
|
|
69
|
+
* This is implemented in Java/Kotlin, via a `(String, String, RNLatLng) -> Unit`.
|
|
70
|
+
* The callback is always coming from native.
|
|
71
|
+
*/
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
@Keep
|
|
74
|
+
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
75
|
+
class Func_void_std__string_std__string_RNLatLng_java(private val function: (String, String, RNLatLng) -> Unit): Func_void_std__string_std__string_RNLatLng {
|
|
76
|
+
@DoNotStrip
|
|
77
|
+
@Keep
|
|
78
|
+
override fun invoke(placeId: String, name: String, coordinate: RNLatLng): Unit {
|
|
79
|
+
return this.function(placeId, name, coordinate)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -250,6 +250,20 @@ abstract class HybridRNGoogleMapsPlusViewSpec: HybridView() {
|
|
|
250
250
|
onMapLongPress = value?.let { it }
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
abstract var onPoiPress: ((placeId: String, name: String, coordinate: RNLatLng) -> Unit)?
|
|
254
|
+
|
|
255
|
+
private var onPoiPress_cxx: Func_void_std__string_std__string_RNLatLng?
|
|
256
|
+
@Keep
|
|
257
|
+
@DoNotStrip
|
|
258
|
+
get() {
|
|
259
|
+
return onPoiPress?.let { Func_void_std__string_std__string_RNLatLng_java(it) }
|
|
260
|
+
}
|
|
261
|
+
@Keep
|
|
262
|
+
@DoNotStrip
|
|
263
|
+
set(value) {
|
|
264
|
+
onPoiPress = value?.let { it }
|
|
265
|
+
}
|
|
266
|
+
|
|
253
267
|
abstract var onMarkerPress: ((id: String?) -> Unit)?
|
|
254
268
|
|
|
255
269
|
private var onMarkerPress_cxx: Func_void_std__optional_std__string_?
|
|
@@ -86,6 +86,14 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
// pragma MARK: std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>
|
|
90
|
+
Func_void_std__string_std__string_RNLatLng create_Func_void_std__string_std__string_RNLatLng(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
91
|
+
auto swiftClosure = RNGoogleMapsPlus::Func_void_std__string_std__string_RNLatLng::fromUnsafe(swiftClosureWrapper);
|
|
92
|
+
return [swiftClosure = std::move(swiftClosure)](const std::string& placeId, const std::string& name, const RNLatLng& coordinate) mutable -> void {
|
|
93
|
+
swiftClosure.call(placeId, name, coordinate);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
89
97
|
// pragma MARK: std::function<void(const std::optional<std::string>& /* id */)>
|
|
90
98
|
Func_void_std__optional_std__string_ create_Func_void_std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
91
99
|
auto swiftClosure = RNGoogleMapsPlus::Func_void_std__optional_std__string_::fromUnsafe(swiftClosureWrapper);
|
|
@@ -1082,6 +1082,43 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
|
|
|
1082
1082
|
return *optional;
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
|
+
// pragma MARK: std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>
|
|
1086
|
+
/**
|
|
1087
|
+
* Specialized version of `std::function<void(const std::string&, const std::string&, const RNLatLng&)>`.
|
|
1088
|
+
*/
|
|
1089
|
+
using Func_void_std__string_std__string_RNLatLng = std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Wrapper class for a `std::function<void(const std::string& / * placeId * /, const std::string& / * name * /, const RNLatLng& / * coordinate * /)>`, this can be used from Swift.
|
|
1092
|
+
*/
|
|
1093
|
+
class Func_void_std__string_std__string_RNLatLng_Wrapper final {
|
|
1094
|
+
public:
|
|
1095
|
+
explicit Func_void_std__string_std__string_RNLatLng_Wrapper(std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>(std::move(func))) {}
|
|
1096
|
+
inline void call(std::string placeId, std::string name, RNLatLng coordinate) const noexcept {
|
|
1097
|
+
_function->operator()(placeId, name, coordinate);
|
|
1098
|
+
}
|
|
1099
|
+
private:
|
|
1100
|
+
std::unique_ptr<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> _function;
|
|
1101
|
+
} SWIFT_NONCOPYABLE;
|
|
1102
|
+
Func_void_std__string_std__string_RNLatLng create_Func_void_std__string_std__string_RNLatLng(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
1103
|
+
inline Func_void_std__string_std__string_RNLatLng_Wrapper wrap_Func_void_std__string_std__string_RNLatLng(Func_void_std__string_std__string_RNLatLng value) noexcept {
|
|
1104
|
+
return Func_void_std__string_std__string_RNLatLng_Wrapper(std::move(value));
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// pragma MARK: std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>
|
|
1108
|
+
/**
|
|
1109
|
+
* Specialized version of `std::optional<std::function<void(const std::string& / * placeId * /, const std::string& / * name * /, const RNLatLng& / * coordinate * /)>>`.
|
|
1110
|
+
*/
|
|
1111
|
+
using std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______ = std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>;
|
|
1112
|
+
inline std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> create_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______(const std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>& value) noexcept {
|
|
1113
|
+
return std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>(value);
|
|
1114
|
+
}
|
|
1115
|
+
inline bool has_value_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& optional) noexcept {
|
|
1116
|
+
return optional.has_value();
|
|
1117
|
+
}
|
|
1118
|
+
inline std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)> get_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& optional) noexcept {
|
|
1119
|
+
return *optional;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1085
1122
|
// pragma MARK: std::function<void(const std::optional<std::string>& /* id */)>
|
|
1086
1123
|
/**
|
|
1087
1124
|
* Specialized version of `std::function<void(const std::optional<std::string>&)>`.
|
|
@@ -367,6 +367,13 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
367
367
|
inline void setOnMapLongPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapLongPress) noexcept override {
|
|
368
368
|
_swiftPart.setOnMapLongPress(onMapLongPress);
|
|
369
369
|
}
|
|
370
|
+
inline std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> getOnPoiPress() noexcept override {
|
|
371
|
+
auto __result = _swiftPart.getOnPoiPress();
|
|
372
|
+
return __result;
|
|
373
|
+
}
|
|
374
|
+
inline void setOnPoiPress(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& onPoiPress) noexcept override {
|
|
375
|
+
_swiftPart.setOnPoiPress(onPoiPress);
|
|
376
|
+
}
|
|
370
377
|
inline std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnMarkerPress() noexcept override {
|
|
371
378
|
auto __result = _swiftPart.getOnMarkerPress();
|
|
372
379
|
return __result;
|
|
@@ -216,6 +216,11 @@ using namespace margelo::nitro::rngooglemapsplus::views;
|
|
|
216
216
|
swiftPart.setOnMapLongPress(newViewProps.onMapLongPress.value);
|
|
217
217
|
newViewProps.onMapLongPress.isDirty = false;
|
|
218
218
|
}
|
|
219
|
+
// onPoiPress: optional
|
|
220
|
+
if (newViewProps.onPoiPress.isDirty) {
|
|
221
|
+
swiftPart.setOnPoiPress(newViewProps.onPoiPress.value);
|
|
222
|
+
newViewProps.onPoiPress.isDirty = false;
|
|
223
|
+
}
|
|
219
224
|
// onMarkerPress: optional
|
|
220
225
|
if (newViewProps.onMarkerPress.isDirty) {
|
|
221
226
|
swiftPart.setOnMarkerPress(newViewProps.onMarkerPress.value);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__string_std__string_RNLatLng.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
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ placeId: String, _ name: String, _ coordinate: RNLatLng) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_std__string_std__string_RNLatLng {
|
|
16
|
+
public typealias bridge = margelo.nitro.rngooglemapsplus.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ placeId: String, _ name: String, _ coordinate: RNLatLng) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ placeId: String, _ name: String, _ coordinate: RNLatLng) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(placeId: std.string, name: std.string, coordinate: RNLatLng) -> Void {
|
|
26
|
+
self.closure(String(placeId), String(name), coordinate)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_std__string_std__string_RNLatLng`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__string_std__string_RNLatLng>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__string_std__string_RNLatLng {
|
|
45
|
+
return Unmanaged<Func_void_std__string_std__string_RNLatLng>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -37,6 +37,7 @@ public protocol HybridRNGoogleMapsPlusViewSpec_protocol: HybridObject, HybridVie
|
|
|
37
37
|
var onLocationError: ((_ error: RNLocationErrorCode) -> Void)? { get set }
|
|
38
38
|
var onMapPress: ((_ coordinate: RNLatLng) -> Void)? { get set }
|
|
39
39
|
var onMapLongPress: ((_ coordinate: RNLatLng) -> Void)? { get set }
|
|
40
|
+
var onPoiPress: ((_ placeId: String, _ name: String, _ coordinate: RNLatLng) -> Void)? { get set }
|
|
40
41
|
var onMarkerPress: ((_ id: String?) -> Void)? { get set }
|
|
41
42
|
var onPolylinePress: ((_ id: String?) -> Void)? { get set }
|
|
42
43
|
var onPolygonPress: ((_ id: String?) -> Void)? { get set }
|
|
@@ -779,6 +779,38 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
|
|
782
|
+
public final var onPoiPress: bridge.std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______ {
|
|
783
|
+
@inline(__always)
|
|
784
|
+
get {
|
|
785
|
+
return { () -> bridge.std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______ in
|
|
786
|
+
if let __unwrappedValue = self.__implementation.onPoiPress {
|
|
787
|
+
return bridge.create_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______({ () -> bridge.Func_void_std__string_std__string_RNLatLng in
|
|
788
|
+
let __closureWrapper = Func_void_std__string_std__string_RNLatLng(__unwrappedValue)
|
|
789
|
+
return bridge.create_Func_void_std__string_std__string_RNLatLng(__closureWrapper.toUnsafe())
|
|
790
|
+
}())
|
|
791
|
+
} else {
|
|
792
|
+
return .init()
|
|
793
|
+
}
|
|
794
|
+
}()
|
|
795
|
+
}
|
|
796
|
+
@inline(__always)
|
|
797
|
+
set {
|
|
798
|
+
self.__implementation.onPoiPress = { () -> ((_ placeId: String, _ name: String, _ coordinate: RNLatLng) -> Void)? in
|
|
799
|
+
if bridge.has_value_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______(newValue) {
|
|
800
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_std__string_____placeId_____const_std__string_____name_____const_RNLatLng_____coordinate______(newValue)
|
|
801
|
+
return { () -> (String, String, RNLatLng) -> Void in
|
|
802
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__string_std__string_RNLatLng(__unwrapped)
|
|
803
|
+
return { (__placeId: String, __name: String, __coordinate: RNLatLng) -> Void in
|
|
804
|
+
__wrappedFunction.call(std.string(__placeId), std.string(__name), __coordinate)
|
|
805
|
+
}
|
|
806
|
+
}()
|
|
807
|
+
} else {
|
|
808
|
+
return nil
|
|
809
|
+
}
|
|
810
|
+
}()
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
782
814
|
public final var onMarkerPress: bridge.std__optional_std__function_void_const_std__optional_std__string______id______ {
|
|
783
815
|
@inline(__always)
|
|
784
816
|
get {
|
|
@@ -66,6 +66,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
66
66
|
prototype.registerHybridSetter("onMapPress", &HybridRNGoogleMapsPlusViewSpec::setOnMapPress);
|
|
67
67
|
prototype.registerHybridGetter("onMapLongPress", &HybridRNGoogleMapsPlusViewSpec::getOnMapLongPress);
|
|
68
68
|
prototype.registerHybridSetter("onMapLongPress", &HybridRNGoogleMapsPlusViewSpec::setOnMapLongPress);
|
|
69
|
+
prototype.registerHybridGetter("onPoiPress", &HybridRNGoogleMapsPlusViewSpec::getOnPoiPress);
|
|
70
|
+
prototype.registerHybridSetter("onPoiPress", &HybridRNGoogleMapsPlusViewSpec::setOnPoiPress);
|
|
69
71
|
prototype.registerHybridGetter("onMarkerPress", &HybridRNGoogleMapsPlusViewSpec::getOnMarkerPress);
|
|
70
72
|
prototype.registerHybridSetter("onMarkerPress", &HybridRNGoogleMapsPlusViewSpec::setOnMarkerPress);
|
|
71
73
|
prototype.registerHybridGetter("onPolylinePress", &HybridRNGoogleMapsPlusViewSpec::getOnPolylinePress);
|
|
@@ -174,6 +174,8 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
174
174
|
virtual void setOnMapPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapPress) = 0;
|
|
175
175
|
virtual std::optional<std::function<void(const RNLatLng& /* coordinate */)>> getOnMapLongPress() = 0;
|
|
176
176
|
virtual void setOnMapLongPress(const std::optional<std::function<void(const RNLatLng& /* coordinate */)>>& onMapLongPress) = 0;
|
|
177
|
+
virtual std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>> getOnPoiPress() = 0;
|
|
178
|
+
virtual void setOnPoiPress(const std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>& onPoiPress) = 0;
|
|
177
179
|
virtual std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnMarkerPress() = 0;
|
|
178
180
|
virtual void setOnMarkerPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onMarkerPress) = 0;
|
|
179
181
|
virtual std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnPolylinePress() = 0;
|
|
@@ -285,6 +285,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
285
285
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMapLongPress: ") + exc.what());
|
|
286
286
|
}
|
|
287
287
|
}()),
|
|
288
|
+
onPoiPress([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>> {
|
|
289
|
+
try {
|
|
290
|
+
const react::RawValue* rawValue = rawProps.at("onPoiPress", nullptr, nullptr);
|
|
291
|
+
if (rawValue == nullptr) return sourceProps.onPoiPress;
|
|
292
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
293
|
+
return CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onPoiPress);
|
|
294
|
+
} catch (const std::exception& exc) {
|
|
295
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onPoiPress: ") + exc.what());
|
|
296
|
+
}
|
|
297
|
+
}()),
|
|
288
298
|
onMarkerPress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
|
|
289
299
|
try {
|
|
290
300
|
const react::RawValue* rawValue = rawProps.at("onMarkerPress", nullptr, nullptr);
|
|
@@ -444,6 +454,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
444
454
|
onLocationError(other.onLocationError),
|
|
445
455
|
onMapPress(other.onMapPress),
|
|
446
456
|
onMapLongPress(other.onMapLongPress),
|
|
457
|
+
onPoiPress(other.onPoiPress),
|
|
447
458
|
onMarkerPress(other.onMarkerPress),
|
|
448
459
|
onPolylinePress(other.onPolylinePress),
|
|
449
460
|
onPolygonPress(other.onPolygonPress),
|
|
@@ -486,6 +497,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
486
497
|
case hashString("onLocationError"): return true;
|
|
487
498
|
case hashString("onMapPress"): return true;
|
|
488
499
|
case hashString("onMapLongPress"): return true;
|
|
500
|
+
case hashString("onPoiPress"): return true;
|
|
489
501
|
case hashString("onMarkerPress"): return true;
|
|
490
502
|
case hashString("onPolylinePress"): return true;
|
|
491
503
|
case hashString("onPolygonPress"): return true;
|
|
@@ -92,6 +92,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
92
92
|
CachedProp<std::optional<std::function<void(RNLocationErrorCode /* error */)>>> onLocationError;
|
|
93
93
|
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapPress;
|
|
94
94
|
CachedProp<std::optional<std::function<void(const RNLatLng& /* coordinate */)>>> onMapLongPress;
|
|
95
|
+
CachedProp<std::optional<std::function<void(const std::string& /* placeId */, const std::string& /* name */, const RNLatLng& /* coordinate */)>>> onPoiPress;
|
|
95
96
|
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onMarkerPress;
|
|
96
97
|
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onPolylinePress;
|
|
97
98
|
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onPolygonPress;
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
58
58
|
onLocationError?: (error: RNLocationErrorCode) => void;
|
|
59
59
|
onMapPress?: (coordinate: RNLatLng) => void;
|
|
60
60
|
onMapLongPress?: (coordinate: RNLatLng) => void;
|
|
61
|
+
onPoiPress?: (placeId: string, name: string, coordinate: RNLatLng) => void;
|
|
61
62
|
onMarkerPress?: (id?: string | undefined) => void;
|
|
62
63
|
onPolylinePress?: (id?: string | undefined) => void;
|
|
63
64
|
onPolygonPress?: (id?: string | undefined) => void;
|