IBehavior

Extends IChildOnMap, ICustomizable.

Map behavior. Adds a map reaction to certain user actions (such as dragging, right-click zooming, or multitouch). The default behavior is disabled and can be enabled using the "enable" method.

Constructor | Fields | Events | Methods

Constructor

IBehavior([options])

Parameters:

Parameter

Default value

Description

options

—

Type: Object

Behavior options.

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

options

IOptionManager

Options manager.

Inherited from ICustomizable.

Events

Name

Description

disable

Disabling behaviors.

enable

Enabling behaviors.

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

Name

Returns

Description

disable()

Disables the behavior.

enable()

Enables the behavior.

getParent()

IParentOnMap|null

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

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.

Events details

disable

Disabling behaviors.

enable

Enabling behaviors.

Methods details

disable

{} disable()

Disables the behavior.

enable

{} enable()

Enables the behavior.

isEnabled

{Boolean} isEnabled()

Checks whether the behavior is enabled.

Returns true if the behavior is enabled, otherwise false.