Class: PinchZoom

ol/interaction/PinchZoom~PinchZoom


import PinchZoom from 'ol/interaction/PinchZoom';

Allows the user to zoom the map by pinching with two fingers on a touch screen.

new PinchZoom(opt_options)

interaction/PinchZoom.js, line 24
Name Type Description
options

Options.

Name Type Default Description
duration number 400

Animation duration in milliseconds.

constrainResolution boolean false

Zoom to the closest integer zoom level after the pinch gesture ends.

Fires:

Extends

Observable Properties

Name Type Settable ol/Object.ObjectEvent type Description
active boolean yes change:active

true if the interaction is active, false otherwise.

Methods

handleEvent() inherited

interaction/Pointer.js, line 120

Handles the map browser event and may call into other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are detected.