Skip to content

A npm package to calculate the distance between two coordinates on the earth.

License

Notifications You must be signed in to change notification settings

lunaticmonk/great-circle-distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❯❯❯ Great Circle Distance

A npm package to calculate the distance between two coordinates on the earth. Read more about it here.

Source: Wikipedia

Installation and Usage

npm install great-circle-distance --save

or

yarn add great-circle-distance
const { greatCircleDistance } = require("great-circle-distance");

const coords = {
    lat1: "12.9611159",
    lng1: "77.6362214",
    lat2: "12.9611159",
    lng2: "75.6362214"
};

greatCircleDistance(coords);
// => 216.723363263401 kms

Node.js version

any version greater than v7.6.x.

Contribute

Open a pull request against the master.

Also, ⭐ the repo to make it reach to others.

LICENSE

MIT

About

A npm package to calculate the distance between two coordinates on the earth.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published