@@ -4,35 +4,37 @@ private fun ns(name: String): String {
4
4
val namespace = " rct.mapbox"
5
5
return String .format(" %s.%s" , namespace, name)
6
6
}
7
+
7
8
enum class EventKeys (val value : String ) {
8
9
// map events
9
- MAP_CLICK (ns( " map.press " ) ),
10
- MAP_LONG_CLICK (ns( " map.longpress " ) ),
11
- MAP_ONCHANGE (ns( " map.change " ) ),
12
- MAP_ON_LOCATION_CHANGE (ns( " map.location.change " ) ),
13
- MAP_ANDROID_CALLBACK (ns( " map.androidcallback " ) ),
14
- MAP_USER_TRACKING_MODE_CHANGE (ns( " map.usertrackingmodechange " ) ),
10
+ MAP_CLICK (" topPress " ),
11
+ MAP_LONG_CLICK (" topLongPress " ),
12
+ MAP_ONCHANGE (" topMapChange " ),
13
+ MAP_ON_LOCATION_CHANGE (" topLocationChange " ),
14
+ MAP_ANDROID_CALLBACK (" topAndroidCallback " ),
15
+ MAP_USER_TRACKING_MODE_CHANGE (" topUserTrackingModeChange " ),
15
16
16
17
// point annotation events
17
- POINT_ANNOTATION_SELECTED (ns( " pointannotation.selected " ) ),
18
- POINT_ANNOTATION_DESELECTED (ns( " pointannotation.deselected " ) ),
19
- POINT_ANNOTATION_DRAG_START (ns( " pointannotation.dragstart " ) ),
20
- POINT_ANNOTATION_DRAG (ns( " pointannotation.drag " ) ),
21
- POINT_ANNOTATION_DRAG_END (ns( " pointannotation.dragend " ) ),
18
+ POINT_ANNOTATION_SELECTED (" topMapboxPointAnnotationSelected " ),
19
+ POINT_ANNOTATION_DESELECTED (" topMapboxPointAnnotationDeselected " ),
20
+ POINT_ANNOTATION_DRAG_START (" topMapboxPointAnnotationDragStart " ),
21
+ POINT_ANNOTATION_DRAG (" topMapboxPointAnnotationDrag " ),
22
+ POINT_ANNOTATION_DRAG_END (" topMapboxPointAnnotationDragEnd " ),
22
23
23
24
// source events
24
- SHAPE_SOURCE_LAYER_CLICK (ns( " shapesource.layer.pressed " ) ),
25
- VECTOR_SOURCE_LAYER_CLICK (ns( " vectorsource.layer.pressed " ) ),
26
- RASTER_SOURCE_LAYER_CLICK (ns( " rastersource.layer.pressed " ) ),
25
+ SHAPE_SOURCE_LAYER_CLICK (" topMapboxShapeSourcePress " ),
26
+ VECTOR_SOURCE_LAYER_CLICK (" topMapboxVectorSourcePress " ),
27
+ RASTER_SOURCE_LAYER_CLICK (" topMapboxRasterSourcePress " ),
27
28
28
29
// images event
29
- IMAGES_MISSING (ns( " images.missing " ) ),
30
+ IMAGES_MISSING (" topImageMissing " ),
30
31
31
32
// location events
33
+ // TODO: not sure about this one since it is not registered anywhere
32
34
USER_LOCATION_UPDATE (ns(" user.location.update" )),
33
35
34
36
// viewport events
35
- VIEWPORT_STATUS_CHANGE (ns( " viewport.statuschange " ) )
37
+ VIEWPORT_STATUS_CHANGE (" topStatusChanged " )
36
38
}
37
39
38
40
fun eventMapOf (vararg values : Pair <EventKeys , String >): Map <String , String > {
0 commit comments