Closed gioman closed 7 years ago
The extent is the initial extent, which defines the starting zoom level.
The restrict to extent option just blocks the OL interface, so you cannot pan outside of that area. It leaves you some margin to move, though
Seems to be working fine here
there is no real restricted extent option in openlayers
and how are we doing this now??
I don't know, what properties do you set?
The restrict to extent option just blocks the OL interface, so you cannot pan outside of that area. It leaves you some margin to move, though
but it seems it leave you zoom out at will, is this expected?
I just set the extent. I am seeing here (https://gis.stackexchange.com/questions/127834/openlayers-3-restrict-map-to-an-area) that it just doesnt let you move the center of the extent outside of the screen....
@gioman yes, you can zoom in and out, because, as i said, it just makes sure the center of the declared extent is in the view, but that doesnt mean you can see outside of the extent if you zoom far away
@volaya @bartvde so... closing?
maybe restrict to extent is a bit misleading then as a name / title?
I ask please if you can test too to confirm or reject. thanks
I have used in conjunction with
extent > canvas extent
where the canvas extent was a much smaller area then the whole are covered by all layers in the project.