[OpenLayers-Users] MouseWheel Handling
shitake83
shitake83 at googlemail.com
Tue Jul 10 09:55:19 PDT 2012
Hi,
I've implemented a control so I can handle MouseWheel events, because I want
to implement a certain behaviour when a users moves the mousewheel up/down.
This is my implementation:
*//create a new control//
var zoomControl = new OpenLayers.Control();
OpenLayers.Util.extend(zoomControl, {
// The draw method is called when the control is initialized
draw: function () {
this.mouse= new OpenLayers.Handler.MouseWheel(zoomControl,
{"up":
mouseUp, "down": mouseDown});
this.mouse.activate();
}});
//add new control
map.addControl(zoomControl);
// change behavior of mouse wheel functions
function mouseUp(){ alert("you have zoomed up");}
function mouseDown(){ alert("you have zoomed down");}
*
The code does what it's supposed to do, however I get an error in the
firebug console, which I really don't like.
*Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) *
Has anybody run into an issue/debug message like this and what could the
probable cause be ??
Thanks a lot.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/MouseWheel-Handling-tp4987375.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list