[android] - only dispatch events if not handled by MarkerView (#8447)
use onTouch listener to ignore dispatching action up events to MapView when they are already handled by MarkerView.
This commit is contained in:
@@ -196,6 +196,13 @@ public class MarkerViewActivity extends AppCompatActivity {
|
||||
// open infowindow offscreen markers
|
||||
mapboxMap.selectMarker(markerRightOffScreen);
|
||||
mapboxMap.selectMarker(markerRightBottomOffScreen);
|
||||
|
||||
mapboxMap.setOnMapClickListener(new MapboxMap.OnMapClickListener() {
|
||||
@Override
|
||||
public void onMapClick(@NonNull LatLng point) {
|
||||
Toast.makeText(MarkerViewActivity.this, point.toString(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user