I haven\'t found an answer in my search, there are a few answers on SO but they didn\'t work for me.
I have 2 markers on the map and I am using LatLngBounds builder
Quick fix is:
gMap.setOnMapLoadedCallback(this);
CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);
gMap.setMaxZoomPreference(10);
gMap.animateCamera(cu);
@Override
public void onMapLoaded() {
gMap.resetMinMaxZoomPreference();
}
Beware that it could halt zoom until map is fully reloaded. But as a quick fix it works.