map.action.Continuous

Extends IMapAction.

Map movement consisting of one or more steps. Intended for implementing complex map movements.

Constructor | Fields | Events | Methods

Constructor

map.action.Continuous()

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IEventEmitter.

Events

Name

Description

end

Event that notifies the map that movement has finished.

Inherited from IMapAction.

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.

Inherited from IMapAction.

Methods

Name

Returns

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.

Inherited from IMapAction.

end()

Stops movement.

Inherited from IMapAction.

isActive()

Boolean

Checks whether map movement is being performed at this moment.

tick(tick)

map.action.Continuous

Performs a single step of the map movement.

Methods details

isActive

{Boolean} isActive()

Checks whether map movement is being performed at this moment.

Returns true if the movement is currently being performed by the map, otherwise false.

tick

{map.action.Continuous} tick(tick)

Performs a single step of the map movement.

Returns self-reference.

Parameters:

Parameter

Default value

Description

tick*

Type: Object

Movement parameters.

tick.duration

0

Type: Number

Duration of making the move, in milliseconds.

tick.globalPixelCenter

Type: Number[]

The new map center in global pixels. One of the parameters must be set: either pixelOffset, or globalPixelCenter.

tick.pixelOffset

Type: Number[]

The offset in pixels relative to the previous center. One of the parameters must be set: either pixelOffset, or globalPixelCenter.

tick.timingFunction

'linear'

Type: String

Timing function.

tick.zoom

Type: Number

The new map zoom. If omitted, the map zoom does not change.

* Mandatory parameter/option.