The hover handler is to be used to emulate mouseovers on objects on the map that aren’t DOM elements. For example one can use this handler to send WMS/GetFeatureInfo requests as the user moves the mouve over the map.
ALKMaps. | The hover handler is to be used to emulate mouseovers on objects on the map that aren’t DOM elements. |
Properties | |
delay | |
pixelTolerance | |
stopMove | |
px | |
timerId | |
Constructor | |
ALKMaps. | Construct a hover handler. |
Functions | |
mousemove | Called when the mouse moves on the map. |
mouseout | Called when the mouse goes out of the map. |
passesTolerance | Determine whether the mouse move is within the optional pixel tolerance. |
clearTimer | Clear the timer and set timerId to null. |
delayedCall | Triggers pause callback. |
deactivate | Deactivate the handler. |
Construct a hover handler.
control | {ALKMaps.Control} The control that initialized this handler. The control is assumed to have a valid map property; that map is used in the handler’s own setMap method. |
callbacks | {Object} An object with keys corresponding to callbacks that will be called by the handler. The callbacks should expect to receive a single argument, the event. Callbacks for ‘move’, the mouse is moving, and ‘pause’, the mouse is pausing, are supported. |
options | {Object} An optional object whose properties will be set on the handler. |
mousemove: function( evt )
Called when the mouse moves on the map.
evt | {ALKMaps.Event} |
{Boolean} Continue propagating this event.
mouseout: function( evt )
Called when the mouse goes out of the map.
evt | {ALKMaps.Event} |
{Boolean} Continue propagating this event.
passesTolerance: function( px )
Determine whether the mouse move is within the optional pixel tolerance.
px | {ALKMaps.Pixel} |
{Boolean} The mouse move is within the pixel tolerance.
clearTimer: function()
Clear the timer and set timerId to null.
Called when the mouse moves on the map.
mousemove: function( evt )
Called when the mouse goes out of the map.
mouseout: function( evt )
Determine whether the mouse move is within the optional pixel tolerance.
passesTolerance: function( px )
Clear the timer and set timerId to null.
clearTimer: function()
Triggers pause callback.
delayedCall: function( evt )
Deactivate the handler.
deactivate: function()