1 |
3032
|
perry
|
OpenLayers.Control.MouseDefaults
|
2 |
|
|
|
3 |
|
|
Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change.
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
* Constructor
|
7 |
|
|
OpenLayers.Control() -- Creates a new control. No options available.
|
8 |
|
|
|
9 |
|
|
* Methods
|
10 |
|
|
defaultClick -- none -- This event takes place when a click event occurs on the map.
|
11 |
|
|
defaultDblClick -- none -- This event re-centers the map on the clicked location.
|
12 |
|
|
defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
|
13 |
|
|
defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
|
14 |
|
|
defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
|
15 |
|
|
defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
|
16 |
|
|
defaultWheelUp -- none -- Zooms in one level. Called by onWheelEvent
|
17 |
|
|
defaultWheelDown -- none -- Zooms out one level. Called by onWheelEvent.
|
18 |
|
|
onWheelEvent -- none -- catches the map wheel event, and handles it, zooming appropriately.
|