1.0.1 • Published 5 years ago

location-finder v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Location Finder

Find the locations available in a region area from a specific location.

Given a list of Locations, Location Finder will find the locations which comes in the region area of a our location.

Installing

npm install --save geojson-path-finder

API

Create a path finding object:

var LocationFinder = require('location-finder');
var severLocation = {
    lat: 53.244563,
    lon: 32.3423423
}
var regionArea = 100   # Area is in Kms
var locationFinder = new LocationFinder(severLocation, regionArea);

The LocationFinder accepts two parameters serverLocation and regionArea. serverLocation is an object which contains lat (latitude), lon (longitude) and regionArea defines the area to find the locations.

To find the locations from the server :

var customers = locationFinder.findLocations(`filePath`);

It takes a file which contains list of all locations from which we need to find our locations that comes in the provided region area.