Struct googleprojection::Mercator
[−]
[src]
pub struct Mercator { /* fields omitted */ }
Methods
impl Mercator
[src]
fn with_size(tile_size: usize) -> Mercator
Create a new Mercator with custom tile size. Tile sizes must be a power of two (256, 512, and so on).
fn from_ll_to_pixel<T: Coord>(&self, ll: &T, zoom: usize) -> Option<T>
Projects a given LL coordinate at a specific zoom level into pixel screen-coordinates.
Zoom level is between 0 and 29 (inclusive). Every other zoom level will return a None
.
fn from_pixel_to_ll<T: Coord>(&self, px: &T, zoom: usize) -> Option<T>
Projects a given pixel position at a specific zoom level into LL world-coordinates.
Zoom level is between 0 and 29 (inclusive). Every other zoom level will return a None
.