ALKMaps.Handler.Hover

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.

Inherits from

Summary
ALKMaps.Handler.HoverThe 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.Handler.HoverConstruct a hover handler.
Functions
mousemoveCalled when the mouse moves on the map.
mouseoutCalled when the mouse goes out of the map.
passesToleranceDetermine whether the mouse move is within the optional pixel tolerance.
clearTimerClear the timer and set timerId to null.
delayedCallTriggers pause callback.
deactivateDeactivate the handler.

Properties

delay

{Integer}Number of milliseconds between mousemoves before the event is considered a hover.  Default is 500.

pixelTolerance

{Integer}Maximum number of pixels between mousemoves for an event to be considered a hover.  Default is null.

stopMove

{Boolean}Stop other listeners from being notified on mousemoves.  Default is false.

px

{<ALKMaps.Pixel>}The location of the last mousemove, expressed in pixels.

timerId

{Number}The id of the timer.

Constructor

ALKMaps.Handler.Hover

Construct a hover handler.

Parameters

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.

Functions

mousemove

mousemove: function(evt)

Called when the mouse moves on the map.

Parameters

evt{ALKMaps.Event}

Returns

{Boolean} Continue propagating this event.

mouseout

mouseout: function(evt)

Called when the mouse goes out of the map.

Parameters

evt{ALKMaps.Event}

Returns

{Boolean} Continue propagating this event.

passesTolerance

passesTolerance: function(px)

Determine whether the mouse move is within the optional pixel tolerance.

Parameters

px{ALKMaps.Pixel}

Returns

{Boolean} The mouse move is within the pixel tolerance.

clearTimer

clearTimer: function()

Clear the timer and set timerId to null.

delayedCall

delayedCall: function(evt)

Triggers pause callback.

Parameters

evt{ALKMaps.Event}

deactivate

deactivate: function()

Deactivate the handler.

Returns

{Boolean} The handler was successfully deactivated.

mousemove: function(evt)
Called when the mouse moves on the map.
mouseout: function(evt)
Called when the mouse goes out of the map.
passesTolerance: function(px)
Determine whether the mouse move is within the optional pixel tolerance.
clearTimer: function()
Clear the timer and set timerId to null.
delayedCall: function(evt)
Triggers pause callback.
deactivate: function()
Deactivate the handler.
Base class to construct a higher-level handler for event sequences.
Controls affect the display or behavior of the map.
Utility functions for event handling.
This class represents a screen coordinate, in x and y coordinates
Close