[OpenLayers-Users] Custom control instead of ZoomBox on Navigation SHIFT-Clicks?

Scott Lewis scott.lewis at nsidc.org
Tue Jan 12 15:06:11 EST 2010


Hi,

I'm writing a program using openlayers that currently uses a somewhat
custom selection control.  Right now, a normal click-and-drag draws the
selection area.  However, this obviously prevents the map from being
draggable, as you can't really drag the map and select on the map at the
same time.

One option is to have a toggle, like some of the examples, where you can
choose to navigate, or to select.  However, I was wondering if it would
be possible to do something different.

In the Navigation object, a SHIFT-Drag draws a ZoomBox control and zooms
into the area.  Is there a way to replace this so that on SHIFT-Drag, a
custom control is used instead, so that SHIFT-Drag would make the
selection, and regular drag would move the map?  Or would this require a
custom control similar to Navigation (perhaps extending from Navigation)?

If the latter, does anyone have any examples I could look at?

Thanks!

Scott Lewis
NSIDC



More information about the Users mailing list