CameraAnimationInterpolation enum
Easing curve for MapLibreMapController.easeCamera animations.
Platform support varies — iOS exposes four distinct timing functions via
CAMediaTimingFunction, Web implements each value as a cubic Bezier passed
to MapLibre GL JS's easeTo({easing}), while MapLibre Android only exposes
a boolean easingInterpolator flag (linear vs. the native
ease-in/ease-out). Per-value behavior is documented below.
When easeCamera is called without an interpolation, each platform uses
its historical default (iOS, Android, and Web all default to an ease-in/ease-out curve).
Values
- linear → const CameraAnimationInterpolation
-
Constant velocity throughout the animation (no easing).
Best for continuous tracking scenarios (e.g. following a moving GPS target) where velocity discontinuities between successive
easeCameracalls would produce perceptible "animated jumps".Fully supported on iOS, Android, and Web.
- easeInOut → const CameraAnimationInterpolation
-
Accelerate at the start and decelerate at the end.
Produces a smooth, natural-feeling movement. This is the platform default on iOS, Android, and Web when no interpolation is specified.
- easeOut → const CameraAnimationInterpolation
-
Decelerate towards the end of the animation.
iOS: mapped to
CAMediaTimingFunctionName.easeOut.Web: implemented as cubic Bezier
(0, 0, 0.58, 1).Android: MapLibre Android does not expose custom timing curves via
easeCamera, so this falls back to the default ease-in/ease-out and is indistinguishable from easeInOut on Android. - fastOutLinearIn → const CameraAnimationInterpolation
-
Material Design "fast out, linear in" curve — cubic Bezier
(0.4, 0.0, 1.0, 1.0). Accelerates quickly, then approaches the target at constant velocity.iOS: implemented exactly via
CAMediaTimingFunction(controlPoints:).Web: implemented exactly via MapLibre GL JS
easeTo({easing}).Android: MapLibre Android does not expose custom timing curves via
easeCamera, so this falls back to the default ease-in/ease-out and is indistinguishable from easeInOut on Android.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
CameraAnimationInterpolation> - A constant List of the values in this enum, in order of their declaration.