universal-geocoder
Version:
Universal geocoding abstraction server-side and client-side with multiple built-in providers
29 lines • 1.02 kB
TypeScript
import { BoundingBox } from "../types";
export interface GeocodeQueryObject {
readonly text?: string;
readonly ip?: string;
readonly bounds?: BoundingBox;
readonly locale?: string;
readonly limit?: number;
}
export default class GeocodeQuery {
private readonly text?;
private readonly ip?;
private readonly bounds?;
private readonly locale?;
private readonly limit;
protected constructor({ text, ip, bounds, locale, limit, }: GeocodeQueryObject);
static create(object: GeocodeQueryObject): GeocodeQuery;
toObject(): GeocodeQueryObject;
withText(text: string): GeocodeQuery;
withIp(ip: string): GeocodeQuery;
withBounds(bounds: BoundingBox): GeocodeQuery;
withLocale(locale: string): GeocodeQuery;
withLimit(limit: number): GeocodeQuery;
getText(): undefined | string;
getIp(): undefined | string;
getBounds(): undefined | BoundingBox;
getLocale(): undefined | string;
getLimit(): number;
}
//# sourceMappingURL=GeocodeQuery.d.ts.map