[OpenLayers-Users] Allow marquee zoom outside of map div

Andreas Hocevar ahocevar at opengeo.org
Tue Jul 19 07:14:41 EDT 2011


Hi,

the API does not allow you to customize the ZoomBox control this way.
But you can globally override the Drag handler's documentDrag property
(see http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Handler/Drag-js.html#OpenLayers.Handler.Drag.documentDrag)
by executing the following before you create your map:

OpenLayers.Handler.Drag.prototype.documentDrag = true;

Note that this will affect everything that involves dragging, e.g.
also drag-panning the map, modifying geometry vertices etc.

Andreas.

On Mon, Jul 18, 2011 at 5:38 PM, PORTER.DANIEL
<PORTER.DANIEL at flsenate.gov> wrote:
> Hey list,
>
>
>
> I’m using the ZoomBox control to allow users to marquee zoom in and out,
> accessed via panel-controlled buttons.  If you drag your mouse outside of
> the map div, the marquee disappears.  Does anyone know a reasonably simple
> way to allow the marquee to extend beyond the map div?  The API information
> for ZoomBox is markedly close-lipped:
> http://dev.openlayers.org/apidocs/files/OpenLayers/Control/ZoomBox-js.html
>
> Thanks!
>
> Daniel
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>



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


More information about the Users mailing list