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

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


That could possibly work; is there a way to define a control so that it
only fires on a Shift-Click?  That way, I could just disable the ZoomBox
part of the Navigation control, and have my other control use
Shift-Click without having to "attach" it to the Navigation.

Scott

Pierre Giraud wrote:
> Hi, does the patch attached to the ticket [1] I opened this morning
> helps you ?
> 
> Regards,
> Pierre
> 
> [1] http://trac.openlayers.org/ticket/2416
> 
> On Tue, Jan 12, 2010 at 9:06 PM, Scott Lewis <scott.lewis at nsidc.org
> <mailto:scott.lewis at nsidc.org>> wrote:
> 
>     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
>     _______________________________________________
>     Users mailing list
>     Users at openlayers.org <mailto:Users at openlayers.org>
>     http://openlayers.org/mailman/listinfo/users
> 
> 
> 
> 
> -- 
> Pierre GIRAUD
> Géomaticien, Analyste
> 
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> 
> Tel : 00 33 4 79 44 44 93
> Mail : pierre.giraud at camptocamp.com <mailto:pierre.giraud at camptocamp.com>
> http://www.camptocamp.com  



More information about the Users mailing list