You are viewing an older version of Mapbox.js. Check out v3.0.1 for the latest.


Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.

var fx = new L.PosAnimation();, [300, 500], 0.5);


Creation Description
new L.PosAnimation() Creates a PosAnimation object.


Method Returns Description
run( <HTMLElement> element, <Point> newPos, <Number> duration?, <Number> easeLinearity? ) this Run an animation of a given element to a new position, optionally setting duration in seconds (0.25 by default) and easing linearity factor (3rd argument of the cubic bezier curve, 0.5 by default)


You can subscribe to the following events using these methods.

Event Data Description
start Event Fired when the animation starts.
step Event Fired continuously during the animation.
end Event Fired when the animation ends.