Crates.io | slippy_map_tilenames |
lib.rs | slippy_map_tilenames |
version | 0.2.0 |
source | src |
created_at | 2018-01-04 23:42:10.801593 |
updated_at | 2018-01-29 00:15:55.355165 |
description | Converts lon/lat coordinates to slippy map tile format (OpenStreetMap/Google Map format). |
homepage | |
repository | https://github.com/oldmammuth/slippy_map_tilenames |
max_upload_size | |
id | 45555 |
size | 13,345 |
A Rust crates that converts lon/lat coordinates to slippy map tile format. See this article by wiki.openstreetmap.org
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);
}