[OpenLayers-Users] mousewheel
Christopher Schmidt
crschmidt at metacarta.com
Sat Apr 21 20:22:37 EDT 2007
On Fri, Apr 20, 2007 at 11:40:36PM +0200, Andrea Borruso wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>
> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
> </head>
> <body bgcolor="#ffffff" text="#000000">
> Chris,<br>
> I do not know if I have understood you, and sorry for my english.<br>
> <br>
> I'm using openlayers 2.4-rc2 and I have these controls:<br>
Okay:
Change your map initializer. Instead of using Map("map"), add a
'controls:[]' to your init:
Map("map", {'controls':[]});
Then, before doing the following, do:
var nc = new OpenLayers.Control.Navigation();
nc.activate = function() {
this.dragPan.activate();
// This line is removed: this.wheelHandler.activate();
this.zoomBox.activate();
return
OpenLayers.Control.prototype.activate.apply(this,arguments);
};
map.addControl(nc);
This will prevent the wheelHandler from ever getting activated, which
will prevent the wheel from doing anything.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list