[OpenLayers-Dev] Understanding the restrictedExtent code.

Andreas Hocevar ahocevar at opengeo.org
Fri Feb 3 08:37:36 EST 2012


You're talking about the Map's moveByPx method? The side effect would
be that people could drag past the restricted extent, and then the map
would jump back to the restricted extent. So a bit more effort would
be required to make dragging work on restricted extents that cross the
dateline.

Andreas.

On Fri, Feb 3, 2012 at 4:24 AM, Phil Scadden <p.scadden at gns.cri.nz> wrote:
> I am some issue with restrictedExtent (I want to restrict users to north
> of 60S). Adding any restrictedExtent immediately changes some aspects of
> the code. The first (and most annoying) is that it turns wrapDateLine
> off (comments says it doesnt make sense for restrictedExtent). But what
> if my opening extent straddles the dateline? What I am finding is that
> despite restrictedExtent (minEast/MaxEast) being the same
> MaxExtent(minEast/MaxEast), I cant move my view across the 180 - because
> wrapDateLine is off. This seems wrong but I wondering why it was put in
> the first place? What would be the side effects of commenting out the
> "wrapdateLine = false" in the restrictBounds setter?
> --
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
>
> 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.
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Dev mailing list