Since 3.20.0, OpenLayers has an ol.View.animate()
method that allows smooth zooming and/or panning (among others) and deprecates the old ol.animation
.
From the latest API docs:
The view's center, zoom (or resolution), and rotation can be animated for smooth transitions between view states.
So, you can zoom and pan by doing:
var view = map.getView();
view.animate({
center: coordinates,
zoom: zoomLevel
});