pub struct TileId {
pub zoom: u8,
pub x: u32,
pub y: u32,
}Expand description
A Slippy-map tile identifier (zoom / x / y).
Fields§
§zoom: u8Zoom level (0–22).
x: u32Column tile index.
y: u32Row tile index.
Implementations§
Source§impl TileId
impl TileId
Sourcepub fn from_lonlat(pt: LonLat, zoom: u8) -> Self
pub fn from_lonlat(pt: LonLat, zoom: u8) -> Self
Compute the TileId that covers a geographic point at a given zoom.
Sourcepub fn bbox(&self) -> BoundingBox
pub fn bbox(&self) -> BoundingBox
Return the bounding box of this tile in geographic coordinates.
Trait Implementations§
impl Copy for TileId
impl Eq for TileId
impl StructuralPartialEq for TileId
Auto Trait Implementations§
impl Freeze for TileId
impl RefUnwindSafe for TileId
impl Send for TileId
impl Sync for TileId
impl Unpin for TileId
impl UnsafeUnpin for TileId
impl UnwindSafe for TileId
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,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.