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 and non-negative. Values that would overflow MapLibre Native's internal duration are invalid.

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 and non-negative. Values that would overflow MapLibre Native's internal duration are invalid.

When this field is omitted, paint property changes apply instantly, and MapLibre Native's own 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, and renders each still image at a fixed time point, so a property that takes its transition from these reaches its final value in the next still image whatever they hold.

◆ 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, which is MapLibre Native's own default. 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: