[android] reset scale/rotate focal point in each step
This commit is contained in:
committed by
Łukasz Paczos
parent
1aa44d5451
commit
c66ec867c9
@@ -267,7 +267,18 @@ public class GestureDetectorActivity extends AppCompatActivity {
|
||||
if (enabled) {
|
||||
focalPointLatLng = new LatLng(51.50325, -0.12968);
|
||||
marker = mapboxMap.addMarker(new MarkerOptions().position(focalPointLatLng));
|
||||
mapboxMap.easeCamera(CameraUpdateFactory.newLatLngZoom(focalPointLatLng, 16));
|
||||
mapboxMap.easeCamera(CameraUpdateFactory.newLatLngZoom(focalPointLatLng, 16),
|
||||
new MapboxMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
recalculateFocalPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
recalculateFocalPoint();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (marker != null) {
|
||||
mapboxMap.removeMarker(marker);
|
||||
|
||||
Reference in New Issue
Block a user