When I use the method below to execute an animation on google map, the animation ends if we touch the screen while animation is executing.
googleMap.animateCamera(
                        CameraUpdateFactory.newCameraPosition(cameraPosition1),400,
                        new CancelableCallback() {
                              @Override
                              public void onFinish() {
                              }
                              @Override
                              public void onCancel() {
                              }
        });
I have tried disabling the touch detection using the code below
mapFragment.getView().setEnabled(false); 
googleMap.getUiSettings().setAllGesturesEnabled(false);
but the application detects touch despite the above lines. How do you correctly disable touch?
Don't use setEnabled(false) for the view instead use setClickable(false)
mapFragment.getView().setClickable(false);
This should work.
EDIT
Apparently this is bug filed here
https://code.google.com/p/gmaps-api-issues/issues/detail?id=5114
as a work around you can deploy a transparent layer which will receive touch events instead of MapFragment .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With