OpenLayers3 - Animated .fit to a specific extent <p>I have created a map using OpenLayers3. I can succesfully zoom to a layer on the map using the following code: </p> <pre><code>map.getView().fit(extent, map.getSize()); </code></pre> <p>However I woulld like something similiar in an animated way.</p> <p>I know about the following animations:</p> <pre><code>ol.animation.pan ol.animation.zoom </code></pre> <p>By using these I can't zoom to a layer, using ol.animation.pan I can only pan to a point (and not to a boundingbox) and using ol.animation.zoom I can zoom to a resolution (and not to a boundingbox). So what I am looking for is an animated .fit so I can zoom animated to an extent.</p> <p>Any suggestions on how I can achieve that would be appreciated :)</p>