dist-two-points

1.0.0 • Public • Published

dist-two-points

npm CircleCI (all branches) License: MIT

A JavaScript utility for finding the distance between two points given latitude and longitude.

Install

$ npm install --save dist-two-points

or

$ yarn add dist-two-points

Usage

import distanceBetweenPoints from 'dist-two-points';
 
const dist = distanceBetweenPoints(37.4219752, -122.084076, 37.3348136, -122.0091032);
Param Type Example
lat1 Number 37.4219752
long1 Number -122.084076
lat2 Number 37.3348136
long2 Number -122.0091032

The function will return a Number value in meters.

Contributing

Create an Issue if there is not already one created. Open up a Pull Request against master with your fix branch.

Install Dependencies

$ npm install

Run Tests

$ npm test

Run a babel transpile

$ npm run build

Package Sidebar

Install

npm i dist-two-points

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

6.77 kB

Total Files

9

Last publish

Collaborators

  • mhfen