Struct AnimationOptions
#[non_exhaustive]pub struct AnimationOptions {
pub duration_ms: Option<f64>,
pub velocity: Option<f64>,
pub min_zoom: Option<f64>,
pub easing: Option<UnitBezier>,
pub transition_id: Option<u64>,
}Expand description
Optional animation controls for camera transitions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.duration_ms: Option<f64>§velocity: Option<f64>§min_zoom: Option<f64>§easing: Option<UnitBezier>§transition_id: Option<u64>Caller-chosen identity for the transition these options start.
When set, the transition emits exactly one runtime event of type
RuntimeEventType::MapCameraTransitionFinished carrying this value in
its CameraTransitionFinishedEvent
payload. The value passes through uninterpreted, so callers pick their
own scheme, such as a monotonically increasing counter.
The event arrives for every terminal outcome: running to completion,
being superseded by a later camera command, being cancelled by
cancel_transitions, or completing instantly as a zero-duration jump. A
command this API rejects, such as one carrying a non-finite enabled
camera field, starts no transition and emits no such event. MapLibre
Native reports the
moment the transition releases the camera without naming which outcome
occurred, so the event establishes transition identity rather than a
completion reason. A host that needs to tell completion from
cancellation compares the resulting camera against the requested one,
or tracks which transition ID is current.
Leaving this field absent emits no such event.
Trait Implementations§
§impl Clone for AnimationOptions
impl Clone for AnimationOptions
§fn clone(&self) -> AnimationOptions
fn clone(&self) -> AnimationOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more