Hello community,
Is there a way to restrict a user from zooming out beyond the specified Restricted Extents in a map preset? For example I would like to restrict user from panning or navigating beyond, say, Africa. The pan restriction works quite well, but I see that when I zoom, I can actually zoom beyond the restricted extents. I read somewhere that it is possible to restrict the zoom on a layer by layer basis.
How can this be done, if possible?
Thanks.,

Comments

tmcw’s picture

Yes, zoom restrictions are implemented on most layers, but with the notable exclusion of WMS and some of the commercial layers, because they all implement different interfaces. Are zoom controls not available on the baselayer you're using?

zzolo’s picture

Title: How to restrict the zoom extents of maps in Open Layers » Provide a map (preset) level zoom restriction option
Category: support » feature

I think the idea here is that it would be nice to be able to set a map level zoom restriction (as well as keeping layer zoom restrictions).

Here is a pretty good in-depth look at it:
http://trac.openlayers.org/wiki/SettingZoomLevels

From what most of this says, and @tmcw is pointing out, we are not able to abstract out zoom levels per layer, though.

This seems like a valid feature request, given I am understanding everything correctly. Not a beta blocker though.

zzolo’s picture

Status: Active » Closed (duplicate)