[OpenLayers-Users] Navigation control

Eric Lemoine eric.lemoine at camptocamp.com
Thu Mar 24 13:03:04 EDT 2011


On Thursday, March 24, 2011, Meine Toonen <meinetoonen at b3partners.nl> wrote:
>
>
>
> Hi list,
>
> In the Navigation control of OpenLayers (2.10) are a couple of options for disabling some of the components this control has.
> I see zoomBoxEnabled and zoomWheelEnabled. We wanted to disable the dragpan control, but maintaining the other controls.
>
> I was wondering if these options were omitted with a reason, of just forgotten.

I personally don't see navigation without dragpan as common as
navigation without shift zoombox or zoomwheel. That may be a reason
why we don't have a dragPanEnabled option. And I'm not sure we want to
have boolean options all over the place in OpenLayers.

Does the following work for you?

var nav = new OpenLayers.Control.Navigation();
map.addControl();
nav.activate();
nav.dragPan.decativate();

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list