[][src]Function googleprojection::from_ll_to_subpixel

pub fn from_ll_to_subpixel<T: Coord>(ll: &T, zoom: usize) -> Option<T>

Projects a given LL coordinate at a specific zoom level into decimal pixel screen-coordinates using a default tile size of 256.

Zoom level is between 0 and 29 (inclusive). Every other zoom level will return a None.

extern crate googleprojection;

let subpixel = googleprojection::from_ll_to_subpixel(&(13.2, 55.9), 2).unwrap();

assert!((subpixel.0 - 549.5466666666666).abs() < 1e-10);
assert!((subpixel.1 - 319.3747774937304).abs() < 1e-10);