The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel). Create a new navigation control with the ALKMaps.Control.Navigation control.
Note that this control is added to the map by default (if no controls array is sent in the options object to the ALKMaps.Map constructor).
ALKMaps. | The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel). |
Properties | |
dragPan | {ALKMaps.Control.DragPan} |
dragPanOptions | {Object} Options passed to the DragPan control. |
pinchZoom | {ALKMaps.Control.PinchZoom} |
pinchZoomOptions | {Object} Options passed to the PinchZoom control. |
documentDrag | {Boolean} Allow panning of the map by dragging outside map viewport. |
zoomBox | {ALKMaps.Control.ZoomBox} |
zoomBoxEnabled | {Boolean} Whether the user can draw a box to zoom |
zoomWheelEnabled | {Boolean} Whether the mousewheel should zoom the map |
mouseWheelOptions | {Object} Options passed to the MouseWheel control (only useful if zoomWheelEnabled is set to true) |
handleRightClicks | {Boolean} Whether or not to handle right clicks. |
zoomBoxKeyMask | {Integer} ALKMaps.Handler key code of the key, which has to be pressed, while drawing the zoom box with the mouse on the screen. |
autoActivate | {Boolean} Activate the control when it is added to a map. |
Constructor | |
ALKMaps. | Create a new navigation control |
Functions | |
destroy | The destroy method is used to perform any clean up before the control is dereferenced. |
activate | |
deactivate | |
draw | |
defaultClick | |
defaultDblClick | |
defaultDblRightClick | |
wheelChange | |
wheelUp | User spun scroll wheel up |
wheelDown | User spun scroll wheel down |
disableZoomBox | |
enableZoomBox | |
disableZoomWheel | |
enableZoomWheel |
{Object} Options passed to the MouseWheel control (only useful if zoomWheelEnabled is set to true)
{Integer} ALKMaps.Handler key code of the key, which has to be pressed, while drawing the zoom box with the mouse on the screen. You should probably set handleRightClicks to true if you use this with MOD_CTRL, to disable the context menu for machines which use CTRL-Click as a right click. Default: <ALKMaps.Handler.MOD_SHIFT>
The destroy method is used to perform any clean up before the control is dereferenced.
destroy: function()
activate: function()
deactivate: function()
draw: function()
defaultClick: function ( evt )
defaultDblClick: function ( evt )
defaultDblRightClick: function ( evt )
wheelChange: function( evt, deltaZ )
User spun scroll wheel up
wheelUp: function( evt, delta )
User spun scroll wheel down
wheelDown: function( evt, delta )
disableZoomBox : function()
enableZoomBox : function()
disableZoomWheel : function()
enableZoomWheel : function()