pub struct TileMatrix {
pub identifier: String,
pub bbox: BoundingBox,
pub tile_width: u32,
pub tile_height: u32,
pub zoom_levels: Vec<ZoomLevel>,
}Expand description
Tile matrix definition.
Fields§
§identifier: StringMatrix identifier
bbox: BoundingBoxBounding box
tile_width: u32Tile width in pixels
tile_height: u32Tile height in pixels
zoom_levels: Vec<ZoomLevel>Zoom levels
Implementations§
Source§impl TileMatrix
impl TileMatrix
Sourcepub fn new(
identifier: String,
bbox: BoundingBox,
tile_width: u32,
tile_height: u32,
) -> Self
pub fn new( identifier: String, bbox: BoundingBox, tile_width: u32, tile_height: u32, ) -> Self
Create a new tile matrix.
Sourcepub fn add_zoom_level(&mut self, level: ZoomLevel)
pub fn add_zoom_level(&mut self, level: ZoomLevel)
Add a zoom level.
Sourcepub fn get_zoom_level(&self, level: u8) -> Option<&ZoomLevel>
pub fn get_zoom_level(&self, level: u8) -> Option<&ZoomLevel>
Get a zoom level by index.
Sourcepub fn tile_bbox(&self, coord: &TileCoordinate) -> Result<BoundingBox>
pub fn tile_bbox(&self, coord: &TileCoordinate) -> Result<BoundingBox>
Get the bounding box for a specific tile.
Trait Implementations§
Source§impl Clone for TileMatrix
impl Clone for TileMatrix
Source§fn clone(&self) -> TileMatrix
fn clone(&self) -> TileMatrix
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 moreSource§impl Debug for TileMatrix
impl Debug for TileMatrix
Source§impl<'de> Deserialize<'de> for TileMatrix
impl<'de> Deserialize<'de> for TileMatrix
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TileMatrix
impl RefUnwindSafe for TileMatrix
impl Send for TileMatrix
impl Sync for TileMatrix
impl Unpin for TileMatrix
impl UnsafeUnpin for TileMatrix
impl UnwindSafe for TileMatrix
Blanket Implementations§
impl<T> Allocation for T
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