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: usizeMaximum number of visible tiles the selector should emit.
flat_view: FlatTileSelectionConfigFootprint-aware flat-view tile selection policy.
source_min_zoom: u8Minimum 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: u8Maximum 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: f32Duration 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: u8Maximum 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: u8Maximum 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: usizeMaximum 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
impl TileSelectionConfig
Sourcepub fn effective_visible_tile_budget(&self, cache_capacity: usize) -> usize
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
impl Clone for TileSelectionConfig
Source§fn clone(&self) -> TileSelectionConfig
fn clone(&self) -> TileSelectionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more