[OpenLayers-Users] {'zoomWheelEnabled':false}
Didrik Pinte
lists at dipole-consulting.com
Thu Dec 18 11:44:10 EST 2008
On Thu, 2008-12-18 at 16:21 +0000, André Matos wrote:
> You could simply don't add Navigation Control... Then with the map instance
> you can get the reference for the Navigation control:
>
> var controls = map.getControlsByClass('OpenLayers.Control.Navigation');
>
> and then disable the zoom wheel:
>
> for(var i = 0; i<controls.length; ++i){
> map.removeControl(controls[i]);
> }
>
>
> Ps: This code also works if you want to add the Navigation control :D.
>
> Regards
Thank you guys for the very quick answer !
Clear explanation from Christopher and easy solution from André. That's
great ;-)
Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081218/05ad9d68/attachment.bin
More information about the Users
mailing list