This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Description
Platform: Android
Mapbox SDK version: v5.1.0-beta.3
I'm trying to block gestures while animation is in progress, but unfortunatelly cannot achieve that in any way.
On v4.2.0 I had no problems with this.
public void tilt(View view) {
map.getUiSettings().setAllGesturesEnabled(false);
Log.d("Map", "disabling gestures");
CameraPosition position = map.getCameraPosition();
CameraPosition.Builder builder = new CameraPosition.Builder(position);
if (tilted) {
tilted = false;
builder.tilt(0);
}
else {
builder.tilt(60);
tilted = true;
}
map.animateCamera(CameraUpdateFactory.newCameraPosition(builder.build()), 1500, new MapboxMap.CancelableCallback() {
@Override
public void onCancel() {
Log.d("Map", "animation - canceled - enabling gestures");
map.getUiSettings().setAllGesturesEnabled(true);
}
@Override
public void onFinish() {
map.getUiSettings().setAllGesturesEnabled(true);
Log.d("Map", "animation - finished - enabling gestures");
}
});
}
Map: disabling gestures
Map: animation - finished - enabling gestures
Map: disabling gestures
Map: animation - finished - enabling gestures
Map: disabling gestures
Map: animation - canceled - enabling gestures
Map: scrolling
Map: scrolling
Map: scrolling
Map: scrolling
Map: scrolling
Reactions are currently unavailable
Platform: Android
Mapbox SDK version: v5.1.0-beta.3
I'm trying to block gestures while animation is in progress, but unfortunatelly cannot achieve that in any way.
On v4.2.0 I had no problems with this.