-
Notifications
You must be signed in to change notification settings - Fork 15
This creates a new object from which to do easing transitions.
Set the 'from' coordinate in this easing. The map starts from here. You don't usually need to call this, because calling .map(mapObject)
automatically assigns from
to the current position of the map:
from = map.coordinate.copy();
Set the destination of the ease: this takes MM.Coordinate
s - you can get coordinates out of other types by using locationCoordinate
and pointCoordinate
.
Since easey deals exclusively in Coordinates, the reference for converting between points, locations, and coordinates in Modest Maps is essential reading.
Set the zoom level of the to
coordinate, so the zoom level that easey is easing to. This is a convenience function for
easey.to(easey.to().zoomTo(zoomLevel));
Derive a point in the ease. The argument is a float between 0 and 1, in which 0 is from
and 1 is to
.
Get the future of an easing transition, given a number of parts for it to be divided over. This returns an array of MM.Coordinate
objects representing each in-between location.
This is a convenience function for calling easey.t()
a bunch of times.
Set the easing. This takes a string, like "easeIn"
This defines the type of path that easey follows:
-
screen
: a 'straight line' path from place to place - in the Mercator projection, this is a rhumb line -
about
: the default path for a double-click zoom: this keeps a single coordinate in the same screen pixel over the zoom transition
Start an animated ease. Both parameters are optional - time
will default to 1000
and is measured in milliseconds.
The second argument is a callback
- a Javascript function that is called when the map has moved to its destination.
Returns true
or false
depending on whether easey is currently animating the map.
Abort the currently running animation.