Skip to content
/ afar Public

Calculate the distance (km) between two latitude and longitude points.

Notifications You must be signed in to change notification settings

sahlhoff/afar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Afar

Calculate the distance (km) between two latitude and longitude points.

Install

npm i afar

Usage

var afar = require('afar')

// SF lat/lon
var lat1 = '37.7749';
var lon1 = '122.4194';

// LA lat/lon
var lat2 = '34.0522';
var lon2 = '118.2437';

afar(lat1, lon1, lat2, lon2)
// => 559.1205770615537 

About

Calculate the distance (km) between two latitude and longitude points.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published