OpenLayers.Control.Navigation - OpenLayers

# OpenLayers.Control.Navigation

The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel). Create a new navigation control with the OpenLayers.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 OpenLayers.Map constructor).

#### Inherits

- OpenLayers.Control

Summary

OpenLayers.Control.Navigation | The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel).
Properties |
dragPan | {OpenLayers.Control.DragPan}
dragPanOptions | {Object} Options passed to the DragPan control.
pinchZoom | {OpenLayers.Control.PinchZoom}
pinchZoomOptions | {Object} Options passed to the PinchZoom control.
documentDrag | {Boolean} Allow panning of the map by dragging outside map viewport.
zoomBox | {OpenLayers.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} OpenLayers.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 |
OpenLayers.Control.Navigation | 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 |

### Properties

### dragPan

{OpenLayers.Control.DragPan}

### dragPanOptions

{Object} Options passed to the DragPan control.

### pinchZoom

{OpenLayers.Control.PinchZoom}

### pinchZoomOptions

{Object} Options passed to the PinchZoom control.

### documentDrag

{Boolean} Allow panning of the map by dragging outside map viewport. Default is false.

### zoomBox

{OpenLayers.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). Default is no options for maps with fractionalZoom set to true, otherwise {cumulative: false, interval: 50, maxDelta: 6}

### handleRightClicks

{Boolean} Whether or not to handle right clicks. Default is false.

### zoomBoxKeyMask

{Integer} OpenLayers.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: <OpenLayers.Handler.MOD_SHIFT>

### autoActivate

{Boolean} Activate the control when it is added to a map. Default is true.

### Constructor

### OpenLayers.Control.Navigation

Create a new navigation control

#### Parameters

options | {Object} An optional object whose properties will be set on the control

### Functions

### destroy

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.

### activate

> activate: function()

### deactivate

> deactivate: function()

### draw

> draw: function()

### defaultClick

> defaultClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultDblClick

> defaultDblClick: function ( | evt | )

#### Parameters

evt | {Event}

### defaultDblRightClick

> defaultDblRightClick: function ( | evt | )

#### Parameters

evt | {Event}

### wheelChange

> wheelChange: function( | evt,
> | deltaZ | )

#### Parameters

evt | {Event}
deltaZ | {Integer}

### wheelUp

> wheelUp: function( | evt,
> | delta | )

User spun scroll wheel up

#### Parameters

evt | {Event}
delta | {Integer}

### wheelDown

> wheelDown: function( | evt,
> | delta | )

User spun scroll wheel down

#### Parameters

evt | {Event}
delta | {Integer}

### disableZoomBox

> disableZoomBox : function()

### enableZoomBox

> enableZoomBox : function()

### disableZoomWheel

> disableZoomWheel : function()

### enableZoomWheel

> enableZoomWheel : function()

The DragPan control pans the map with a drag of the mouse.
The ZoomBox control enables zooming directly to a given extent, by drawing a box on the map.
{Boolean} Whether the mousewheel should zoom the map
Base class to construct a higher-level handler for event sequences.

> destroy: function()

The destroy method is used to perform any clean up before the control is dereferenced.

> activate: function()

> deactivate: function()

> draw: function()

> defaultClick: function ( | evt | )

> defaultDblClick: function ( | evt | )

> defaultDblRightClick: function ( | evt | )

> wheelChange: function( | evt,
> | deltaZ | )

> wheelUp: function( | evt,
> | delta | )

User spun scroll wheel up

> wheelDown: function( | evt,
> | delta | )

User spun scroll wheel down

> disableZoomBox : function()

> enableZoomBox : function()

> disableZoomWheel : function()

> enableZoomWheel : function()

Create a new navigation control
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Controls affect the display or behavior of the map.
Close