title: How can I detect a zoom end?
body: <p>Is there a good way to detect when the map's zoom animation has ended? OpenLayers used to raise the 'zoomend' event after the zoom had completed, but OpenLayers 3 doesn't have a corresponding event. I'm currently using the following approach, but it seems kludgy and brittle at best.</p>
  
  <pre><code>function main() {
    var map = ...;
    map.getView().on('change:resolution', handleResolutionChange);
  }
  function handleResolutionChange() {
    var map = ...;
    map.once('moveend', handleMoveEnd);
  }
  function handleMoveEnd() {
    setTimeout(handleZoomEnd, 0);
  }
  function handleZoomEnd() {
    //Handle the 'Zoom end' event
  }
  </code></pre>