I want to restrict where the user can pan on the map, but I can't seem to find any resources that tell how to set the max extent of a map view in OpenLayers 3. I know there was a solution in OpenLayers 2. Is it possible in the new version?
OpenLayers 3 – Setting Maximum Extent
extentsopenlayers
Best Answer
This can simply be done by defining
extent
in the View object. eg