MapContentMilestone.stopAnimation

Syntax

stopAnimation();

Description

The stopAnimation method stops animation of map layer milestone.

Example

To execute the example the HTML page must contain an object of the MapContentMilestone class named milestone (see  the page with description of the MapContentMilestone.getMilestonePosition method), and also it is necessary to execute the example given on the page with description of the MapContentMilestone.startAnimation method.

Start milestone animation, and then pause it after 2 seconds of playing:

// Start playing animation
milestone.startAnimation();
// Stop playing animation after two seconds
PP.setTimeout(function () {
    milestone.stopAnimation()
}, 2000);

After executing the example animation is stopped after two seconds of playing. The milestone returns to initial position, and the browser console displays only the notice that the animation was started.

See also:

MapContentMilestone