Documentation
Reference
2.1.38 (current version)
collection
interactivityModel
Interfaces

behavior.ScrollZoom

Extends IBehavior.

The "zooming the map with the mouse wheel" behavior.

Constructor | Fields | Events | Methods

Constructor

behavior.ScrollZoom([options])

Parameters:

ParameterDefault valueDescription
options

Type: Object

Options.

options.maximumDelta 5

Type: Number

The maximum change in the map zoom for a single scroll event (uninterrupted turn of the mouse wheel). When this limit is reached, the map is re-drawn (tiles are shown for the zoom level that was reached).

options.speed 5

Type: Number

The speed for increasing/decreasing the map zoom when the behavior.ScrollZoom behavior is enabled, in zoom levels per second.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

Events

NameDescription
disable

Disabling behaviors.

Inherited from IBehavior.

enable

Enabling behaviors.

Inherited from IBehavior.

optionschange

Change to the object options.

Inherited from ICustomizable.

parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Inherited from IChild.

Methods

NameReturnsDescription
disable()

Disables the behavior.

Inherited from IBehavior.

enable()

Enables the behavior.

Inherited from IBehavior.

getParent()IControlParent | null

Returns a link to the parent object, or null if the parent element was not set.

Inherited from IChildOnMap.

isEnabled()Boolean

Checks whether the behavior is enabled.

Inherited from IBehavior.

setParent(parent)IChildOnMap

Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from IChildOnMap.