(geohash: string)
| 1 | import Geohash from 'latlon-geohash'; |
| 2 | |
| 3 | export function decodeGeoHash(geohash: string) { |
| 4 | const bounds = Geohash.bounds(geohash); |
| 5 | return { |
| 6 | latitude: [bounds.sw.lat, bounds.ne.lat], |
| 7 | longitude: [bounds.sw.lon, bounds.ne.lon], |
| 8 | }; |
| 9 | } |
| 10 | |
| 11 | // Function to create grid bounds from geohash |
| 12 | export const getGeohashBounds = (geohash: string) => { |