Skip to main content

TileSelectionConfig

Struct TileSelectionConfig 

Source
pub struct TileSelectionConfig {
    pub visible_tile_budget: usize,
    pub flat_view: FlatTileSelectionConfig,
    pub source_min_zoom: u8,
    pub source_max_zoom: u8,
    pub raster_fade_duration: f32,
    pub max_fading_ancestor_levels: u8,
    pub max_child_depth: u8,
    pub max_requests_per_frame: usize,
}
Expand description

Engine-side policy controlling visible tile selection.

Fields§

§visible_tile_budget: usize

Maximum number of visible tiles the selector should emit.

§flat_view: FlatTileSelectionConfig

Footprint-aware flat-view tile selection policy.

§source_min_zoom: u8

Minimum zoom level supported by the tile source.

Tiles at zoom levels below this are never requested. When the camera zoom is below source_min_zoom, the manager does not emit any visible tiles. Defaults to 0.

§source_max_zoom: u8

Maximum zoom level supported by the tile source.

When the camera zoom exceeds this value, tile requests are clamped to source_max_zoom and the resulting visible tiles are treated as overzoomed – the VisibleTile::target records the display-zoom tile ID while VisibleTile::actual records the source-zoom tile ID. Texture region mapping correctly extracts the sub-tile rectangle for rendering.

Defaults to 22 (the common Web Mercator maximum).

§raster_fade_duration: f32

Duration in seconds over which a newly loaded tile fades from fully transparent to fully opaque.

Set to 0.0 to disable fade-in (tiles appear at full opacity immediately). Matches MapLibre’s rasterFadeDuration concept. Defaults to 0.0 (disabled); set to e.g. 0.3 for 300 ms fade.

§max_fading_ancestor_levels: u8

Maximum number of ancestor zoom-level tiles that may participate in a cross-fade overlay while a child tile is fading in.

Prevents excessive overlapping translucent tiles when many zoom levels are simultaneously loading. Defaults to 3.

§max_child_depth: u8

Maximum number of zoom levels to descend when searching for cached child tiles to use as underzoom fallback.

When the camera zooms out and a target tile is not yet loaded, the manager checks whether higher-zoom children that are already cached can cover the target’s extent. This is the inverse of the parent fallback: instead of showing a blurry parent, we compose sharper children. Set to 0 to disable child fallback. Defaults to 0 (disabled); set to e.g. 2 to enable.

§max_requests_per_frame: usize

Maximum number of new tile requests the manager may issue in a single update pass.

This is set by the TileRequestCoordinator to enforce a global cross-source request budget. When usize::MAX, the manager issues requests without limit (the default for backwards compatibility and when coordination is disabled).

Implementations§

Source§

impl TileSelectionConfig

Source

pub fn effective_visible_tile_budget(&self, cache_capacity: usize) -> usize

Return the effective per-frame visible tile budget for a given cache.

Trait Implementations§

Source§

impl Clone for TileSelectionConfig

Source§

fn clone(&self) -> TileSelectionConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TileSelectionConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TileSelectionConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for TileSelectionConfig

Source§

fn eq(&self, other: &TileSelectionConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for TileSelectionConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.