@digitransit-search-util/digitransit-search-util-distance
v0.0.8
Published
digitransit-search-util distance module
Downloads
5
Maintainers
Readme
@digitransit-search-util/digitransit-search-util-distance
distance
Calculates distance betweeh two points.
Parameters
Examples
const latlon1 = {
lat: 3,
lon: 2,
};
const latlon2 = {
lat: 4,
lon: 1,
};
digitransit-util.distance(latlon1, latlon2);
//=157105.77709637067
Returns Number distance between two points
This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.
Installation
Install this module individually:
$ npm install @digitransit-search-util/digitransit-search-util-distance
Or install the Digitransit-util module that includes it as a function:
$ npm install @digitransit-util/digitransit-util