forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
@rnmapbox+maps+10.1.30+001+bridgeless.patch
83 lines (74 loc) · 4.14 KB
/
@rnmapbox+maps+10.1.30+001+bridgeless.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt
index 5bebc1b..80a4be4 100644
--- a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt
+++ b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt
@@ -5,6 +5,8 @@ import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.annotations.ReactProp
import com.facebook.react.viewmanagers.RNMBXRasterSourceManagerInterface
+import com.rnmapbox.rnmbx.events.constants.EventKeys
+import com.rnmapbox.rnmbx.events.constants.eventMapOf
import javax.annotation.Nonnull
class RNMBXRasterSourceManager(reactApplicationContext: ReactApplicationContext) :
@@ -26,7 +28,10 @@ class RNMBXRasterSourceManager(reactApplicationContext: ReactApplicationContext)
}
override fun customEvents(): Map<String, String>? {
- return null
+ return eventMapOf(
+ EventKeys.RASTER_SOURCE_LAYER_CLICK to "onMapboxRasterSourcePress",
+ EventKeys.MAP_ANDROID_CALLBACK to "onAndroidCallback"
+ )
}
companion object {
diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt
index d059b2c..3882f1e 100644
--- a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt
+++ b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt
@@ -4,35 +4,37 @@ private fun ns(name: String): String {
val namespace = "rct.mapbox"
return String.format("%s.%s", namespace, name)
}
+
enum class EventKeys(val value: String) {
// map events
- MAP_CLICK(ns("map.press")),
- MAP_LONG_CLICK(ns("map.longpress")),
- MAP_ONCHANGE(ns("map.change")),
- MAP_ON_LOCATION_CHANGE(ns("map.location.change")),
- MAP_ANDROID_CALLBACK(ns("map.androidcallback")),
- MAP_USER_TRACKING_MODE_CHANGE(ns("map.usertrackingmodechange")),
+ MAP_CLICK("topPress"),
+ MAP_LONG_CLICK("topLongPress"),
+ MAP_ONCHANGE("topMapChange"),
+ MAP_ON_LOCATION_CHANGE("topLocationChange"),
+ MAP_ANDROID_CALLBACK("topAndroidCallback"),
+ MAP_USER_TRACKING_MODE_CHANGE("topUserTrackingModeChange"),
// point annotation events
- POINT_ANNOTATION_SELECTED(ns("pointannotation.selected")),
- POINT_ANNOTATION_DESELECTED(ns("pointannotation.deselected")),
- POINT_ANNOTATION_DRAG_START(ns("pointannotation.dragstart")),
- POINT_ANNOTATION_DRAG(ns("pointannotation.drag")),
- POINT_ANNOTATION_DRAG_END(ns("pointannotation.dragend")),
+ POINT_ANNOTATION_SELECTED("topMapboxPointAnnotationSelected"),
+ POINT_ANNOTATION_DESELECTED("topMapboxPointAnnotationDeselected"),
+ POINT_ANNOTATION_DRAG_START("topMapboxPointAnnotationDragStart"),
+ POINT_ANNOTATION_DRAG("topMapboxPointAnnotationDrag"),
+ POINT_ANNOTATION_DRAG_END("topMapboxPointAnnotationDragEnd"),
// source events
- SHAPE_SOURCE_LAYER_CLICK(ns("shapesource.layer.pressed")),
- VECTOR_SOURCE_LAYER_CLICK(ns("vectorsource.layer.pressed")),
- RASTER_SOURCE_LAYER_CLICK(ns("rastersource.layer.pressed")),
+ SHAPE_SOURCE_LAYER_CLICK("topMapboxShapeSourcePress"),
+ VECTOR_SOURCE_LAYER_CLICK("topMapboxVectorSourcePress"),
+ RASTER_SOURCE_LAYER_CLICK("topMapboxRasterSourcePress"),
// images event
- IMAGES_MISSING(ns("images.missing")),
+ IMAGES_MISSING("topImageMissing"),
// location events
+ // TODO: not sure about this one since it is not registered anywhere
USER_LOCATION_UPDATE(ns("user.location.update")),
// viewport events
- VIEWPORT_STATUS_CHANGE(ns("viewport.statuschange"))
+ VIEWPORT_STATUS_CHANGE("topStatusChanged")
}
fun eventMapOf(vararg values: Pair<EventKeys, String>): Map<String, String> {