geozip
A geozip implementation for node and the browser.
As described here: http://geozipcode.blogspot.nl/2015/02/geozip.html
Installation
npm install --save geozip
Usage
var GeoZip = ;var zipper = ; // standard usagevar encoded = zipper;var decoded = zipper;console;console; // validate inputvar encoded = zipper; // throws error, coordinates do not have the same precision // auto-fix precisionvar encoded = zipper; // no more errors
Api
encode(lat, lng, validate = false, precision = 18)
returns a geohash
decode(geozip)
returns an object containing a "lat" and "lng" property
License
MIT