pub struct RenderRequest {Show 14 fields
pub bbox: [f64; 4],
pub width: u32,
pub height: u32,
pub style_input: StyleInput,
pub tile_zoom: Option<u8>,
pub tile_timeout_ms: u32,
pub max_tiles: u32,
pub tile_concurrency: u32,
pub layers: Option<Vec<String>>,
pub labels: Labels,
pub features: Option<Vec<String>>,
pub auth_token: Option<String>,
pub fail_on_tile_error: bool,
pub pixel_ratio: f64,
}Fields§
§bbox: [f64; 4]§width: u32§height: u32§style_input: StyleInput§tile_zoom: Option<u8>Tile detail override: the tile zoom on the 256 px grid (vector
sources use one less, their 512 px tiles), instead of the zoom the
view implies. None (the default) picks tiles as MapLibre does.
tile_timeout_ms: u32§max_tiles: u32§tile_concurrency: u32§layers: Option<Vec<String>>§labels: LabelsKeep every layer, drop the labels, or keep only the labels (see
crate::features).
features: Option<Vec<String>>Feature filter: plain names keep those features, --prefixed names
drop them (see crate::features::FEATURES).
auth_token: Option<String>Optional authentication token. Sent as Authorization: Bearer <token>
for raster sources; appended as ?access_token=<token> for Mapbox
vector sources.
fail_on_tile_error: boolWhen false, individual tile fetch failures are logged and skipped
rather than aborting the entire render.
pixel_ratio: f64Device pixels per CSS pixel (MapLibre’s devicePixelRatio). width and
height are CSS pixels and set the view and zoom; the image is
pixel_ratio times larger, with lines, labels and icons drawn at the
same size relative to the map (e.g. 2 for a sharp 2x image, or
dpi / 96 for print). Vector styles use the @2x sprite above 1.
Implementations§
Source§impl RenderRequest
impl RenderRequest
Sourcepub fn new(
bbox: [f64; 4],
width: u32,
height: u32,
style_input: StyleInput,
) -> Self
pub fn new( bbox: [f64; 4], width: u32, height: u32, style_input: StyleInput, ) -> Self
A request with default settings: automatic zoom, pixel ratio 1, all layers, 10 s tile timeout, at most 256 tiles, 16 parallel fetches, failed tiles left empty.
pub fn validate(&self) -> Result<(), BasemapError>
Trait Implementations§
Source§impl Clone for RenderRequest
impl Clone for RenderRequest
Auto Trait Implementations§
impl Freeze for RenderRequest
impl RefUnwindSafe for RenderRequest
impl Send for RenderRequest
impl Sync for RenderRequest
impl Unpin for RenderRequest
impl UnsafeUnpin for RenderRequest
impl UnwindSafe for RenderRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more