pub struct GlobalMercator { /* private fields */ }
Implementations§
Source§impl GlobalMercator
impl GlobalMercator
pub fn new(tile_size: u32) -> GlobalMercator
pub fn tile_size(&self) -> u32
pub fn lat_lon_to_meters(&self, lat: f64, lon: f64) -> (f64, f64)
pub fn meters_to_lat_lon(&self, mx: f64, my: f64) -> (f64, f64)
pub fn pixels_to_meters(&self, px: f64, py: f64, zoom: u32) -> (f64, f64)
pub fn meters_to_pixels(&self, mx: f64, my: f64, zoom: u32) -> (f64, f64)
pub fn pixels_to_tile(&self, px: f64, py: f64) -> (i32, i32)
pub fn pixels_to_raster(&self, px: f64, py: f64, zoom: u32) -> (f64, f64)
pub fn meters_to_tile(&self, mx: f64, my: f64, zoom: u32) -> (i32, i32)
pub fn tile_bounds(&self, tx: i32, ty: i32, zoom: u32) -> (f64, f64, f64, f64)
pub fn tile_lat_lon_bounds( &self, tx: i32, ty: i32, zoom: u32, ) -> (f64, f64, f64, f64)
pub fn resolution(&self, zoom: u32) -> f64
pub fn zoom_for_pixel_size(&self, pixel_size: f64) -> u32
pub fn google_tile(&self, tx: i32, ty: i32, zoom: u32) -> (i32, i32)
pub fn quad_tree(&self, tx: i32, ty: i32, zoom: u32) -> String
Trait Implementations§
Source§impl Clone for GlobalMercator
impl Clone for GlobalMercator
Source§fn clone(&self) -> GlobalMercator
fn clone(&self) -> GlobalMercator
Returns a copy of the value. Read more
1.0.0 · 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 GlobalMercator
impl Debug for GlobalMercator
Source§impl Default for GlobalMercator
impl Default for GlobalMercator
impl Copy for GlobalMercator
Auto Trait Implementations§
impl Freeze for GlobalMercator
impl RefUnwindSafe for GlobalMercator
impl Send for GlobalMercator
impl Sync for GlobalMercator
impl Unpin for GlobalMercator
impl UnwindSafe for GlobalMercator
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