[OpenLayers-Dev] zoomwheel-only navigation

bartvde at osgis.nl bartvde at osgis.nl
Tue Dec 16 08:18:15 EST 2008

Hi Chris,

do stuff with no code at all are you serious :-) ?

What I came up with is here:


Best regards,

> On Tue, Dec 16, 2008 at 01:25:52PM +0100, bartvde at osgis.nl wrote:
>> Hi list,
>> currently it is not possible to disable the zoombox and pan on
>> OpenLayers.Control.Navigation.
>> But what if I only want to have the zoomwheel? Do I write my own
>> control,
> In my opinion: Yes. We wrote handlers to make creating your own controls
> a trivial and easy thing to do. We should document this better, and a
> zoomwheel only control seems like a perfect oppourtunity to do so.
> I expect that a zoomwheel control will likely only be on the order of a
> dozen lines: You need only call out to the wheelUp/wheelDown/wheelChange
> on the Navigation prototype, and everything else is solved by just
> creating a control with a .handler equal to the wheel. Heck, it might
> not even need any code.
> Regards,
> --
> Christopher Schmidt
> MetaCarta

More information about the Dev mailing list