tzf_rs

Function deg2num

Source
pub fn deg2num(lng: f64, lat: f64, zoom: i64) -> (i64, i64)
Expand description

deg2num is used to convert longitude, latitude to Slippy map tilenames under specific zoom level.

Example:

use tzf_rs::deg2num;
let ret = deg2num(116.3883, 39.9289, 7);
assert_eq!((105, 48), ret);