On Thu, Sep 13, 2007 at 12:54:00AM -0700, jonz wrote: > > I've modified a version of WMS/Untiled, which I've configured with a ratio of > 2. After the map is loaded I don't want the user to be able to drag the map > outside of the original map extent. > I've done the following. > 1) After the map is loaded, I do a map.setOptions setting maxExtent to > getExtent(). > 2) modified moveTo in the Untiled.js so that if the map is out of bounds, it > is not reloaded
The code to do this will become trivially easy when #340 hits trunk later today. Essentially, you'll simply set 'map.restrictedExtent = new OpenLayers.Bounds()', and then dragging outside that bounds will no longer be possible. I'll follow up more once this goes in. Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
