MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_style_transition_options Struct Reference

#include <style.h>

Data Fields

double duration_ms
double delay_ms
bool enable_placement_transitions

Detailed Description

Global style transition options.

These control how the style animates paint property changes and whether symbol placement changes cross-fade. They are distinct from camera animation options, which time camera moves.

A paint property's own style-spec transition, such as "fill-color-transition", overrides these for that property. These apply to every property that declares none.

Field Documentation

◆ delay_ms

double mln_style_transition_options::delay_ms

Transition delay in milliseconds. Must be finite, non-negative, and short enough to represent as a duration.

When this field is omitted, transitions start without delay.

◆ duration_ms

double mln_style_transition_options::duration_ms

Transition duration in milliseconds. Must be finite, non-negative, and short enough to represent as a duration.

When this field is omitted, paint property changes apply instantly, and a 300 millisecond default governs the symbol placement cross-fade that enable_placement_transitions gates. A continuous-mode map applies that same default to the pattern cross-fade across integer zoom levels, while a still-mode map fades those patterns instantly instead.

A still-mode map ignores this field and delay_ms for paint property transitions. A property using these global options reaches its final value in the next still image.

◆ enable_placement_transitions

bool mln_style_transition_options::enable_placement_transitions

Whether symbol placement changes cross-fade.

Clearing this makes symbol placement changes apply to the next rendered frame, in every map mode. Hosts that move symbol-backed features at pointer frequency clear it for the duration of the interaction.

When this field is omitted, the cross-fade stays on. A style carries no equivalent, so loading a style leaves the cross-fade on.


The documentation for this struct was generated from the following file: