JSPM

get-distance-between-points

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39
  • Score
    100M100P100Q75975F
  • License MIT

Distance between two points of coordinates in Google Maps - Earth

Package Exports

  • get-distance-between-points

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-distance-between-points) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

get-distance-between-points

Distance between two points of coordinates in Google Maps - Earth

This module has no dependencies ;)

Build Status

Installation

$ npm install get-distance-between-points --save

Usage

var getDistanceBetweenPoints = require('get-distance-between-points');
var distanceInMeters = getDistanceBetweenPoints.getDistanceBetweenPoints(
    -12.119012, -77.029235, // Lat, Long of point A
    -12.102870, -77.026983 // Lat, Long of point B
);

// Outputs: Distance in Meters:  1813.5586276614192
console.log("Distance in Meters: ", distanceInMeters);

// Outputs: Distance in Kilometers:  1.8135586276614193
console.log("Distance in Kilometers: ", (distanceInMeters * 0.001));