pub struct Tile<M = (), P: Clone + Default = Properties, D: Clone + Default = MValue> {
pub id: CellId,
pub layers: BTreeMap<String, Layer<M, P, D>>,
pub transformed: bool,
}Expand description
Tile Class to contain the tile information for splitting or simplifying
Fields§
§id: CellIdthe tile id
layers: BTreeMap<String, Layer<M, P, D>>the tile’s layers
transformed: boolwhether the tile feature geometry has been transformed
Implementations§
Source§impl<M: HasLayer + Clone, P: Clone + Default, D: Clone + Default> Tile<M, P, D>
impl<M: HasLayer + Clone, P: Clone + Default, D: Clone + Default> Tile<M, P, D>
Sourcepub fn add_reader<R>(&mut self, reader: R, layer: Option<String>)where
R: FeatureReader<M, P, D>,
pub fn add_reader<R>(&mut self, reader: R, layer: Option<String>)where
R: FeatureReader<M, P, D>,
Add any reader to the tile
Sourcepub fn add_feature(
&mut self,
feature: VectorFeature<M, P, D>,
layer: Option<String>,
)
pub fn add_feature( &mut self, feature: VectorFeature<M, P, D>, layer: Option<String>, )
Add a feature to the tile
Sourcepub fn transform(&mut self, tolerance: f64, maxzoom: Option<u8>)
pub fn transform(&mut self, tolerance: f64, maxzoom: Option<u8>)
Simplify the geometry to have a tolerance which will be relative to the tile’s zoom level. NOTE: This should be called after the tile has been split into children if that functionality is needed.
Sourcepub fn split(&mut self, buffer: Option<f64>) -> TileChildren<M, P, D>
pub fn split(&mut self, buffer: Option<f64>) -> TileChildren<M, P, D>
split tile into 4 children
Trait Implementations§
Source§impl<M: Clone, P: Clone + Clone + Default, D: Clone + Clone + Default> Clone for Tile<M, P, D>
impl<M: Clone, P: Clone + Clone + Default, D: Clone + Clone + Default> Clone for Tile<M, P, D>
Source§impl<M: Debug, P: Debug + Clone + Default, D: Debug + Clone + Default> Debug for Tile<M, P, D>
impl<M: Debug, P: Debug + Clone + Default, D: Debug + Clone + Default> Debug for Tile<M, P, D>
Source§impl<M: PartialEq, P: PartialEq + Clone + Default, D: PartialEq + Clone + Default> PartialEq for Tile<M, P, D>
impl<M: PartialEq, P: PartialEq + Clone + Default, D: PartialEq + Clone + Default> PartialEq for Tile<M, P, D>
impl<M, P: Clone + Default, D: Clone + Default> StructuralPartialEq for Tile<M, P, D>
Auto Trait Implementations§
impl<M, P, D> Freeze for Tile<M, P, D>
impl<M, P, D> RefUnwindSafe for Tile<M, P, D>
impl<M, P, D> Send for Tile<M, P, D>
impl<M, P, D> Sync for Tile<M, P, D>
impl<M, P, D> Unpin for Tile<M, P, D>
impl<M, P, D> UnwindSafe for Tile<M, P, D>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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