Created
May 17, 2021 00:58
-
-
Save gtcdevop/5dbc66fad840df8f5f3eccd00dfc8163 to your computer and use it in GitHub Desktop.
Get a Geohash and sub-geohashes for a Location in map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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