carp
v0.2.0
Published
lat/lng to bbox with a tolerance
Downloads
3
Readme
carp
lat/lng to bbox with a tolerance
Install
npm install carp --save
Use
var carp = require('carp');
carp([50.90, 105.51]); // [50.90, 105.51, 50.90, 105.51]
carp({ lat: 50.90, lng: 105.51 }, 1); // [50.90, 105.51, 51.90, 106.51]
The method signature is carp(coordinates, tolerance)
. Coordinates can be:
- Array -
[lat, lng]
- Object -
{ lat: lat, lng: lng}
,{ latitude: lat, longitude: lng }
,{ x: lng, y: lat }
or a mixed version..
Roadmap
- handle
carp(lat, lng, tol)