IMapAction

Extends IEventEmitter.

Interface of an object that manages map movement.

Constructor | Fields | Events | Methods

Constructor

IMapAction()

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

Events

Name

Description

end

Event that notifies the map that movement has finished.

tick

Event that notifies the map of the next step. Contains the fields:

  • globalPixelCenter - The new map center, in global pixels.
  • zoom - The new map zoom.
  • duration - The time that is allowed for performing the step.
  • timingFunction - Function describing the type of movement.

Methods

Name

Description

begin(mapActionManager)

Starts the movement to be performed by the map. This method is called automatically by the map movement manager. From the moment when IMapAction.begin is called, the movement manager listens for IMapAction.event:tick and IMapAction.event:end and executes them.

end()

Stops movement.

Events details

end

Event that notifies the map that movement has finished.

tick

Event that notifies the map of the next step. Contains the fields:

  • globalPixelCenter - The new map center, in global pixels.
  • zoom - The new map zoom.
  • duration - The time that is allowed for performing the step.
  • timingFunction - Function describing the type of movement.

Methods details

begin

{} begin(mapActionManager)

Starts the movement to be performed by the map. This method is called automatically by the map movement manager. From the moment when IMapAction.begin is called, the movement manager listens for IMapAction.event:tick and IMapAction.event:end and executes them.

Parameters:

Parameter

Default value

Description

mapActionManager*

—

Type: map.action.Manager

The movement manager for the map that movement is being performed on.

* Mandatory parameter/option.

end

{} end()

Stops movement.