-
CreatedOn- 07/06/2016
-
1.sourcePoints is an object containing latitude,longitude of a one point(start point).
-
2.destinationPoints is an object containing latitude,longitude of a another point(end point).
-
3.Get the latitude and longitude of both the points.
-
4.Get the Radius of earth which is approximate to 6371 km.
-
5.calculate the difference of two lat long.
-
6.apply the ‘haversine’ calculation.
npm install geo-dist-calc
var distance = require('geo-dist-calc'); //Example var sourcePoints = { latitude: 32.123, longitude: 43.21 }; var destinationPoints = { latitude: 67.331, longitude: 56.214 }; var ResultantDistance = distance.discal(sourcePoints,destinationPoints); // ResultantDistance will be in km
-
Notifications
You must be signed in to change notification settings - Fork 1
parit90/geo-dist-calc
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published