Class: DoubleClickZoom

ol/interaction/DoubleClickZoom~DoubleClickZoom


import DoubleClickZoom from 'ol/interaction/DoubleClickZoom';

Allows the user to zoom by double-clicking on the map.

new DoubleClickZoom(opt_options)

interaction/DoubleClickZoom.js, line 20
Name Type Description
options

Options.

Name Type Default Description
duration number 250

Animation duration in milliseconds.

delta number 1

The zoom delta applied on each double click.

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

getActive(){boolean} inherited

interaction/Interaction.js, line 60

Return whether the interaction is currently active.

Returns:
true if the interaction is active, false otherwise.

getMap(){module:ol/PluggableMap~PluggableMap} inherited

interaction/Interaction.js, line 69

Get the map associated with this interaction.

Returns:
Map.

handleEvent(mapBrowserEvent){boolean} inherited

interaction/Interaction.js, line 79

Handles the map browser event.

Name Type Description
mapBrowserEvent module:ol/MapBrowserEvent~MapBrowserEvent

Map browser event.

Returns:
false to stop event propagation.

setActive(active) inherited

interaction/Interaction.js, line 89

Activate or deactivate the interaction.

Name Type Description
active boolean

Active.