slippy_map_tilenames

Crates.ioslippy_map_tilenames
lib.rsslippy_map_tilenames
version0.2.0
sourcesrc
created_at2018-01-04 23:42:10.801593
updated_at2018-01-29 00:15:55.355165
descriptionConverts lon/lat coordinates to slippy map tile format (OpenStreetMap/Google Map format).
homepage
repositoryhttps://github.com/oldmammuth/slippy_map_tilenames
max_upload_size
id45555
size13,345
Davide Del Papa (oldmammuth)

documentation

README

slippy_map_tilenames

A Rust crates that converts lon/lat coordinates to slippy map tile format. See this article by wiki.openstreetmap.org

Example

extern crate slippy_map_tilenames as smt;

fn main() {
    let t2l = smt::tile2lonlat(4376, 2932, 13); // (12.3046875, 45.460130637921)
    let l2t = smt::lonlat2tile(14.016667, 42.683333, 13); // (4414, 3019)    
    println!("Tile (4376, 2932) at zoom 13: {:?}", t2l);
    println!("lon 14.016667 E, lat 42.683333 N, at zoom 13: {:?}", l2t);
}
Commit count: 3

cargo fmt