# OpenLayers.Control.TouchNavigation

The navigation control handles map browsing with touch events (dragging, double-tapping, tap with two fingers, and pinch zoom). Create a new control with the OpenLayers.Control.TouchNavigation constructor.

If youâre only targeting touch enabled devices with your mapping application, you can create a map with only a TouchNavigation control. The OpenLayers.Control.Navigation control is mobile ready by default, but you can generate a smaller build of the library by only including this touch navigation control if you aren’t concerned about mouse interaction.

#### Inherits

- OpenLayers.Control

Summary

OpenLayers.Control.TouchNavigation | The navigation control handles map browsing with touch events (dragging, double-tapping, tap with two fingers, and pinch zoom).
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.
clickHandlerOptions | {Object} Options passed to the Click handler.
documentDrag | {Boolean} Allow panning of the map by dragging outside map viewport.
autoActivate | {Boolean} Activate the control when it is added to a map.
Constructor |
OpenLayers.Control.TouchNavigation | 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 |

### 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.

### clickHandlerOptions

{Object} Options passed to the Click handler.

### documentDrag

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

### autoActivate

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

### Constructor

### OpenLayers.Control.TouchNavigation

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}

The DragPan control pans the map with a drag of the mouse.

> 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 | )

Create a new navigation control
The navigation control handles map browsing with mouse events (dragging, double-clicking, and scrolling the wheel).
Controls affect the display or behavior of the map.
Close