compare-lat-lon

Compares the distance between two sets of coordinates

Usage no npm install needed!

<script type="module">
  import compareLatLon from 'https://cdn.skypack.dev/compare-lat-lon';
</script>

README

compare-lat-lon

Build Status NPM version

Compares the distance between two sets of coordinates

adapted from http://stackoverflow.com/a/18170277

Information

Packagecompare-lat-lon
Description Compares the distance between two sets of coordinates
Also calculates the radius of the earth
Node Version >= 4

Usage

Install

$ npm install --save compare-lat-lon

var compare = require('compare-lat-lon');

compare('37.795831', '-122.396472', '40.767904', '-73.975448'); // => 4127.676959594074

LICENSE MIT