How to get Zoom-in, Zoom-out for previous or next in OpenLayers 3. There are controls for Zoom in or Zoom out for levels and area wise. They are as follows:
Area zoom:
var dragzoomin = new ol.interaction.DragZoom({
condition: ol.events.condition.always
});
map.addInteraction(dragzoomin);
Zoom in for levels
var view = map.getView();
view.setZoom(view.getZoom() + 1);
We can get zoom out if it is level wise. But if it is area wise how to get zoom out and how to store these zoom in and zoom out events for entire session.