@@ -505,16 +505,17 @@ public boolean onMarkerClick(@NonNull Marker marker) {
505505 } else {
506506 // Handle native markers added via updateNearbyMarkersFromProcessedData
507507 Object tag = marker .getTag ();
508- String id = null ;
508+ String routeCode = null ;
509509 String action = "marker-press" ;
510510 String actionType = null ;
511511 boolean isPressFeedbackEnabled = false ;
512+ String id = null ;
512513
513514 if (tag instanceof java .util .Map ) {
514515 java .util .Map tagMap = (java .util .Map ) tag ;
515- Object idObj = tagMap .get ("id " );
516- if (idObj instanceof String ) {
517- id = (String ) idObj ;
516+ Object routeCodeObj = tagMap .get ("routeCode " );
517+ if (routeCodeObj instanceof String ) {
518+ routeCode = (String ) routeCodeObj ;
518519 }
519520 Object actionObj = tagMap .get ("action" );
520521 if (actionObj instanceof String ) {
@@ -528,6 +529,10 @@ public boolean onMarkerClick(@NonNull Marker marker) {
528529 if (isPressFeedbackEnabledObj instanceof Boolean ) {
529530 isPressFeedbackEnabled = (Boolean ) isPressFeedbackEnabledObj ;
530531 }
532+ Object idObj = tagMap .get ("id" );
533+ if (idObj instanceof String ) {
534+ id = (String ) idObj ;
535+ }
531536 }
532537
533538 if (id != null ) {
@@ -537,6 +542,7 @@ public boolean onMarkerClick(@NonNull Marker marker) {
537542 WritableMap mapEventData = makeClickEventData (marker .getPosition ());
538543 mapEventData .putString ("action" , "marker-press" );
539544 mapEventData .putString ("actionType" , actionType );
545+ mapEventData .putString ("routeCode" , routeCode );
540546 mapEventData .putString ("id" , id );
541547
542548 dispatchEvent (mapEventData , OnMarkerPressEvent ::new );
@@ -2274,10 +2280,11 @@ public void onAnimationEnd(Animator animation) {
22742280 if (newMarker != null ) {
22752281 if (!isCluster && !routeCode .isEmpty ()) {
22762282 java .util .Map <String , Object > tagMap = new java .util .HashMap <>();
2277- tagMap .put ("id " , routeCode );
2283+ tagMap .put ("routeCode " , routeCode );
22782284 tagMap .put ("action" , "marker-press" );
22792285 tagMap .put ("actionType" , action );
22802286 tagMap .put ("isPressFeedbackEnabled" , isPressFeedbackEnabled );
2287+ tagMap .put ("id" , driverId );
22812288 newMarker .setTag (tagMap );
22822289 }
22832290 nearbyMarkersCache .put (driverId , newMarker );
0 commit comments