- Setup a fullscreen map
- Set some padding e.g:
map.setPadding(0, 200, 0, 0) - Tilt + rotate the map, as a user would
Try to reset the tilt/rotation using CameraPosition like that:
CameraPosition cameraPosition = CameraPosition.builder() .target(userLatLng) .zoom(zoomLevel) .tilt(0) .bearing(0) .build(); CameraUpdate update = CameraUpdateFactory.newCameraPosition(cameraPosition); map.animateCamera(cameraUpdate, mapAnimationCallback);
You will see that we map has 0 tilt and 0 bearing but the target will not be the same as userLatLng. It will always have some offset.
If you have no map padding (map.setPadding(0, 0, 0, 0)) the whole animation works fine.
Any idea why this is happening/ how to make a proper animation with tilt/bearing while having padding?