How to zoom to max extent on click of button in openlayers-3?
I tried with
function zoomtoextent(){
//map.zoomToMaxExtent();
if(globalbBox==null)
{
var bBox = new OpenLayers.Bounds(
68.14806781208101, 20.118149140613397,
74.47891169978561, 24.722655175866358
);
map.zoomToExtent(bBox);
map.zoomTo("7");
globalbBox = bBox;
}
else
{
map.zoomToExtent(globalbBox);
}
}
This was working fine with openlayers-2 but with openlayers-3 it is not working.