Skip to content Skip to sidebar Skip to footer

Change Maxzoom Option In Runtime To Ol.view In Openlayers 3

Im trying to change the maxZoom option once a functionality of the map is activated. So it has to be during runtime so it can be rolled back to the original maxZoom. Creating the o

Solution 1:

You can accomplish this by changing the view of the map completely:

map.setView(new ol.View({
  zoom: 10,
  maxZoom: 17,
  minZoom: 10,
}));

Edit:

A jsfiddle to test the solution

Post a Comment for "Change Maxzoom Option In Runtime To Ol.view In Openlayers 3"