geo-dist-calc
-
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.
# Installation
npm install geo-dist-calc
var distance = ;//Examplevar sourcePoints = latitude: 32123 longitude: 4321 ;var destinationPoints = latitude: 67331 longitude: 56214 ;var ResultantDistance = distance;// ResultantDistance will be an object contains kilometers and miles form source to destination.