[OpenLayers-Users] Disable Zoom wheel

darrepac pascal.darre at laposte.net
Sun Jan 18 15:13:11 EST 2009


You got it Andre!

I had a :
map.addControl(new OpenLayers.Control.MouseDefaults());
above which was putting trouble. Reñoving it and adding the command given by
Alexandre make things works!


Thanks to both of you



Andre Pereira de Matos wrote:
> 
> Hi,
> 
> Which controls do you have on your map?
> How are you initializing the map?
> 
> That could be happening because there are some controls that are adding a
> new Navigation control to your map...
> 
> If is it the only way you have to solve that problem is:
> 
> controls = map.getControlsByClass('OpenLayers.Control.Navigation');
> for(var I = 0; i<controls.length; ++i)
> controls.disableZoomWheel();
> 
> Regards,
> André Matos
> http://maps.sapo.pt
> 
> 
> From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> On Behalf Of Alexandre Ardhuin
> Sent: sexta-feira, 16 de Janeiro de 2009 16:53
> To: darrepac
> Cc: users at openlayers.org
> Subject: Re: [OpenLayers-Users] Disable Zoom wheel
> 
> Hi,
> 
> By changing movemap in navigationControl, this should be OK.
> 
> Alexandre
> 
> 2009/1/16 darrepac
> <pascal.darre at laposte.net<mailto:pascal.darre at laposte.net>>
> 
> Hi
> 
> Thanks for your help
> 
> I did this:
>      var movemap = new OpenLayers.Control.Navigation({'zoomWheelEnabled':
> false});
> 
>      map.addControl(movemap);
>      movemap.activate();
>      movemap.disableZoomWheel();
> 
> and the wheel still work.... :(
> 
> 
> 
> 
> 
> Alexandre Ardhuin wrote:
>>
>> Hi you can use :
>>
>> navigationControl.disableZoomWheel();
>> navigationControl.enableZoomWheel();
>>
>> Alexandre.
>>
>> 2009/1/16 darrepac
>> <pascal.darre at laposte.net<mailto:pascal.darre at laposte.net>>
>>
>>>
>>> Hi,
>>>
>>> I browse the user list to find how to disable the mouse wheel in the
>>> map.
>>> I think I find the way to do it but it doesn't work, here is my code:
>>>
>>>      var movemap = new
>>> OpenLayers.Control.Navigation({'zoomWheelEnabled':
>>> false});
>>>
>>>      map.addControl(movemap);
>>>      movemap.activate();
>>>
>>> thanks for the help
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169123.html
>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org<mailto:Users at openlayers.org>
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org<mailto:Users at openlayers.org>
>> http://openlayers.org/mailman/listinfo/users
>>
>>
> --
> View this message in context:
> http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2169239.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org<mailto:Users at openlayers.org>
> http://openlayers.org/mailman/listinfo/users
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Disable-Zoom-wheel-tp2169123p2178414.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list