slippy_map_tilenames 0.2.0

Converts lon/lat coordinates to slippy map tile format (OpenStreetMap/Google Map format).
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented4 out of 4 items with examples
  • Size
  • Source code size: 12.98 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • oldmammuth/slippy_map_tilenames
    6 4 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • oldmammuth

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);
}