[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:
Tobrun
2017-03-17 15:23:28 +01:00
committed by GitHub
parent 2e6c0263d8
commit 09d76854ab
3 changed files with 30 additions and 13 deletions

View File

@@ -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();
}
});
}
});
}