geolocation utilities for rust projects and applications
geohelper = { git = "https://github.com/krishpranav/geohelper" }
use geohelper::Location;
fn main() {
/**
* random coordinates of two location
*/
let location1 = Location::new(27.740068, 85.337576);
let location2 = Location::new(27.740286, 85.337059);
/**
* calculate the distance between the two location
*/
let distance = location1.distance_to(&location2).unwrap();
/**
* print them out!!
*/
println!("Distance: {}", distance.meters());
}
- for more tutorial visit the docs
- geohelper is licensed under GPL-2.0 License