[OpenLayers-Users] [OpenLayers-Dev] OpenLayer Map restrict panning and zooming

Phil Scadden p.scadden at gns.cri.nz
Mon Mar 25 13:27:50 PDT 2013


Resolutions array is the safest option. You can also manipulate through 
minResolution/maxResolution or minScale/maxScale. (Which in the end 
populate a resolutions array).
> Just a quick request for further clarification though.  I understand 
> that maxExtent should not be set in an event.  I was mostly just 
> trying to do some debugging to figure out what was going on as the 
> extents were being changed, so that I could prove to myself that the 
> extent was being accepted as maxRestrictedExtent (and eventually I 
> threw maxExtent in there through desperation).  I plan on setting 
> whatever needs to be set in an onClick function for the button the 
> user clicks on accepting a particular area of the map.
>
> But setting maxRestrictedExtent definitely works for panning, and 
> doesn't help with restricting outward zooming.  Do you feel that 
> adding a resolutions array would be my only other option?


Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list