Hover Handler Example

hover, onmouseover, handler, listener, event, events

This example shows the use of the hover handler.

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 the hover hander to send WMS/GetFeatureInfo requests as the user moves the mouse over the map.

The "delay" option specifies the number of milliseconds before the event is considered a hover. Default is 500 milliseconds.

The "pixelTolerance" option specifies the maximum number of pixels between mousemoves for an event to be considered a hover. Default is null, which means no pixel tolerance.

The "stopMove" option specifies whether other mousemove listeners registered before the hover handler listener must be notified on mousemoves or not. Default is false (meaning that the other mousemove listeners will be notified on mousemove).

Controls with hover handlers (toggle on/off to clear output)
long delay (2 sec)
short delay (100 msec)
tolerant (6 pixels)
untolerant (1 pixel)
stop propagation