# OpenLayers.Control.PinchZoom

#### Inherits

- OpenLayers.Control

Summary

OpenLayers.Control.PinchZoom |
Properties |
type | {OpenLayers.Control.TYPES}
containerOrigin | {Object} Cached object representing the layer container origin (in pixels).
pinchOrigin | {Object} Cached object representing the pinch start (in pixels).
currentCenter | {Object} Cached object representing the latest pinch center (in pixels).
autoActivate | {Boolean} Activate the control when it is added to a map.
Constructor |
OpenLayers.Control.PinchZoom | Create a control for zooming with pinch gestures.
Functions |
activate | Activate this control.
deactivate | Deactivate this control.
updateContainerOrigin | Must be called each time the layer container origin changes.
pinchStart |
pinchMove |
applyTransform | Applies the given transform to layers.
pinchDone |

### Properties

### type

{OpenLayers.Control.TYPES}

### containerOrigin

{Object} Cached object representing the layer container origin (in pixels).

### pinchOrigin

{Object} Cached object representing the pinch start (in pixels).

### currentCenter

{Object} Cached object representing the latest pinch center (in pixels).

### autoActivate

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

### Constructor

### OpenLayers.Control.PinchZoom

Create a control for zooming with pinch gestures. This works on devices with multi-touch support.

#### Parameters

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

### Functions

### activate

> activate: function()

Activate this control. Must be called after the control is added to a map.

#### Returns

{Boolean} The control was successfully activated.

### deactivate

> deactivate: function()

Deactivate this control.

#### Returns

{Boolean} The control was successfully deactivated.

### updateContainerOrigin

> updateContainerOrigin: function()

Must be called each time the layer container origin changes.

### pinchStart

> pinchStart: function( | evt,
> | pinchData | )

#### Parameters

evt | {Event}
pinchData | {Object} pinch data object related to the current touchmove of the pinch gesture. This give us the current scale of the pinch.

### pinchMove

> pinchMove: function( | evt,
> | pinchData | )

#### Parameters

evt | {Event}
pinchData | {Object} pinch data object related to the current touchmove of the pinch gesture. This give us the current scale of the pinch.

### applyTransform

> applyTransform: function( | transform | )

Applies the given transform to layers.

### pinchDone

> pinchDone: function( | evt,
> | start,
> | last | )

#### Parameters

evt | {Event}
start | {Object} pinch data object related to the touchstart event that started the pinch gesture.
last | {Object} pinch data object related to the last touchmove event of the pinch gesture. This give us the final scale of the pinch.

> activate: function()

Activate this control.

> deactivate: function()

Deactivate this control.

> updateContainerOrigin: function()

Must be called each time the layer container origin changes.

> pinchStart: function( | evt,
> | pinchData | )

> pinchMove: function( | evt,
> | pinchData | )

> applyTransform: function( | transform | )

Applies the given transform to layers.

> pinchDone: function( | evt,
> | start,
> | last | )

Controls affect the display or behavior of the map.
Close