haversine-dist
v0.1.1
Published
Fast, minimalist library to calculate distance between two points
Downloads
1
Maintainers
Readme
Fast, minimalist library to calculate distance between two points.
Quick Start
var haversine = require('haversine-dist');
var dist = haversine.calculate([42.484239, -83.460072], [42.482562, -83.471546], 'feet');
Installation
Run npm install -g haversine-dist
Parameters
First parameter is an array with the lat, then the long of the first point
Second parameter is an array with the lat, then the long of the second point
Third parameter is unitOfMeasure - feet, km, or miles. miles is the default.
Returns
The distance