Skip to content

krishpranav/geohelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geohelper

geolocation utilities for rust projects and applications

forthebadge

Installation:

geohelper = { git = "https://github.com/krishpranav/geohelper" }

Usage:

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

License:

Releases

No releases published

Packages

No packages published

Languages