nearest-loc-finder

1.1.2 • Public • Published

/* This code will require the geo npm module then call getNearestCustomers Method from library. */

npm install nearest-loc-finder

const GeoLocation = require("nearest-loc-finder"); //Import Geo Module

let distance = 100; //In KM

let customers = GeoLocation.getNearestRecords(28.5355, 77.3910, distance, "KM") //With 100 KM to Dublin

let sortedCustomers = GeoLocation.sortRecords(customers, "asc"); // Sorting of customers

console.log("list of customers in", distance, "KM: ", sortedCustomers);

Readme

Keywords

Package Sidebar

Install

npm i nearest-loc-finder

Weekly Downloads

3

Version

1.1.2

License

ISC

Unpacked Size

6.75 kB

Total Files

5

Last publish

Collaborators

  • kunal.nischal