My code :
if(!bounds.isEmpty()) {
map.fitBounds(bounds);
if (map.getZoom() > 11) {
map.setZoom(11);
}
}
but I see that map.setZoom(11); could be called before .fitBounds end. So the result is not what I aspect for.
Is there a way to manage a callback when .fitBound finish?
Try this: