haversine-dist

0.1.1 • Public • Published

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

  1. First parameter is an array with the lat, then the long of the first point

  2. Second parameter is an array with the lat, then the long of the second point

  3. Third parameter is unitOfMeasure - feet, km, or miles. miles is the default.

Returns

The distance

Package Sidebar

Install

npm i haversine-dist

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

2.69 kB

Total Files

3

Last publish

Collaborators

  • orca256