Skip to content

Instantly share code, notes, and snippets.

@gtcdevop
Created May 17, 2021 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gtcdevop/5dbc66fad840df8f5f3eccd00dfc8163 to your computer and use it in GitHub Desktop.
Save gtcdevop/5dbc66fad840df8f5f3eccd00dfc8163 to your computer and use it in GitHub Desktop.
Get a Geohash and sub-geohashes for a Location in map
var geohash = require('ngeohash');
var opa = geohash.encode(-20.8191497,-49.3989744, 10);
var pair = [ -20.786449, -49.404946]
var encoded = geohash.encode(pair[0],pair[1]);
encoded;
var decoded = geohash.decode(encoded);
geohash.bboxes()
const possibleGeohashes= [0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,'b' ,'c' ,'d' ,'e' ,'f' ,'g', 'h' ,'j' ,'k' ,'m' ,'n' ,'p' ,'q' ,'r' ,'s' ,'t' ,'u' ,'v' ,'w' ,'x' ,'y' ,'z'];
function getAllSubGeoHashes() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment