[OpenLayers-Users] {'zoomWheelEnabled':false}

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 18 10:53:12 EST 2008


On Thu, Dec 18, 2008 at 04:43:56PM +0100, Didrik Pinte wrote:
> Hi,
> 
> I'm trying to disable the mouse wheel interaction.
> 
> I've followed the navigation control example but it does not work. 
> 
> I initialise my map without controls, then I add ScaleLine, PanZoomBar,
> NavToolBar, LayerSwitcher, MousePosition  and KeyboardDefaults
> 
> Finally, I add my Navigation and explicitely call disableZoomWheel() on
> it BUT the zoom wheel stays activated on the loaded map.

You have added two Navigation controls to your map. The NavToolbar
creates a Navigation control (internally).

If you want different behavior of the NavToolbar, you'll need to create
a custom toolbar control -- copying the code from the NavToolbar, and
change the options of the Navigation control in the initialize.

> Is there any interaction between the Navigation and the other controls
> that could force the zoom wheel to stay activated ? 
> 
> Thanks
> 
> Didrik



> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list