pub struct Metatile { /* private fields */ }Expand description
Metatiles are NxN tiles
Implementations§
Source§impl Metatile
impl Metatile
pub fn new(scale: u8, zoom: u8, x: u32, y: u32) -> Option<Self>
pub fn scale(&self) -> u8
pub fn zoom(&self) -> u8
Sourcepub fn size(&self) -> u8
pub fn size(&self) -> u8
What is the width or height of this metatile. For small zoom numbers (e.g. z1), there will
not be the full scale tiles across.
Sourcepub fn centre_point(&self) -> LatLon
pub fn centre_point(&self) -> LatLon
Returns the LatLon for the centre of this metatile.
Sourcepub fn center_point(&self) -> LatLon
pub fn center_point(&self) -> LatLon
Returns the LatLon for the centre of this metatile.
Sourcepub fn nw_corner(&self) -> LatLon
pub fn nw_corner(&self) -> LatLon
Returns the LatLon of the top left, i.e. north west corner, of this metatile.
Sourcepub fn ne_corner(&self) -> LatLon
pub fn ne_corner(&self) -> LatLon
Returns the LatLon of the top right, i.e. north east corner, of this metatile.
Sourcepub fn sw_corner(&self) -> LatLon
pub fn sw_corner(&self) -> LatLon
Returns the LatLon of the bottom left, i.e. south west corner, of this metatile.
Sourcepub fn se_corner(&self) -> LatLon
pub fn se_corner(&self) -> LatLon
Returns the LatLon of the bottom right, i.e. south east corner, of this metatile.
pub fn tiles(&self) -> Vec<Tile>
pub fn all(scale: u8) -> MetatilesIterator ⓘ
Trait Implementations§
Source§impl Borrow<Metatile> for ModTileMetatile
impl Borrow<Metatile> for ModTileMetatile
impl Copy for Metatile
impl Eq for Metatile
Source§impl From<ModTileMetatile> for Metatile
impl From<ModTileMetatile> for Metatile
Source§fn from(mt: ModTileMetatile) -> Self
fn from(mt: ModTileMetatile) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Metatile
Auto Trait Implementations§
impl Freeze for Metatile
impl RefUnwindSafe for Metatile
impl Send for Metatile
impl Sync for Metatile
impl Unpin for Metatile
impl UnsafeUnpin for Metatile
impl UnwindSafe for Metatile
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