Installation
npm install --save @types/latlon-geohash
Summary
This package contains type definitions for latlon-geohash (https://github.com/chrisveness/latlon-geohash).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/latlon-geohash.
declare namespace Geohash {
type Direction =
| "n"
| "N"
| "s"
| "S"
| "e"
| "E"
| "w"
| "W";
interface Neighbours {
n: string;
ne: string;
e: string;
se: string;
s: string;
sw: string;
w: string;
nw: string;
}
interface Bounds {
sw: Point;
ne: Point;
}
interface Point {
lat: number;
lon: number;
}
function encode(
latitude: number,
longitude: number,
precision?: number,
): string;
function decode(geohash: string): Point;
function bounds(geohash: string): Bounds;
function adjacent(geohash: string, direction: Direction): string;
function neighbours(geohash: string): Neighbours;
}
export default Geohash;
Additional Details
- Last updated: Mon, 07 Oct 2024 22:07:58 GMT
- Dependencies: none
Credits
These definitions were written by Robert Imig.