pub struct CustomGeometrySourceOptions {
pub fetch_tile: Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>,
pub cancel_tile: Option<Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>>,
pub min_zoom: Option<f64>,
pub max_zoom: Option<f64>,
pub tolerance: Option<f64>,
pub tile_size: Option<u32>,
pub buffer: Option<u32>,
pub clip: Option<bool>,
pub wrap: Option<bool>,
}Expand description
The callbacks and options of a custom geometry source.
Zoom levels are whole numbers from 0 to 32.
See mln_custom_geometry_source_options in the
C API reference.
Fields§
§fetch_tile: Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>The callback receives (map, source_id, tile_id).
cancel_tile: Option<Arc<dyn Fn(&MapHandle, &str, CanonicalTileId) + Send + Sync + 'static>>The callback receives (map, source_id, tile_id).
min_zoom: Option<f64>§max_zoom: Option<f64>§tolerance: Option<f64>How far, in pixels, simplified geometry can stray from the original.
tile_size: Option<u32>The width of a tile in pixels, a power of two no larger than 8192.
buffer: Option<u32>The width in pixels of the margin around a tile that holds geometry from
beyond its edges. buffer times 8192 / tile_size must be at most
65535.
clip: Option<bool>Whether to cut geometry at the outer edge of a tile’s margin.
wrap: Option<bool>Whether to wrap geometry that crosses the antimeridian.
Implementations§
Trait Implementations§
Source§impl Clone for CustomGeometrySourceOptions
impl Clone for CustomGeometrySourceOptions
Source§fn clone(&self) -> CustomGeometrySourceOptions
fn clone(&self) -> CustomGeometrySourceOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CustomGeometrySourceOptions
impl !UnwindSafe for CustomGeometrySourceOptions
impl Freeze for CustomGeometrySourceOptions
impl Send for CustomGeometrySourceOptions
impl Sync for CustomGeometrySourceOptions
impl Unpin for CustomGeometrySourceOptions
impl UnsafeUnpin for CustomGeometrySourceOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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