universal-geocoder
Version:
Universal geocoding abstraction server-side and client-side with multiple built-in providers
59 lines • 2.9 kB
TypeScript
import Geocoded, { GeocodedObject } from "../../Geocoded";
import AdminLevel from "../../AdminLevel";
import { LocationIQOsmType, LocationIQPrecision, LocationIQPrecisionCode, LocationIQPrecisionType } from "./..";
export interface LocationIQGeocodedObject extends GeocodedObject {
readonly placeId?: string;
readonly displayName?: string;
readonly osmId?: string;
readonly osmType?: LocationIQOsmType;
readonly categories?: string[];
readonly types?: string[];
readonly distance?: number;
readonly precision?: LocationIQPrecision;
readonly precisionCode?: LocationIQPrecisionCode;
readonly precisionType?: LocationIQPrecisionType;
readonly attribution?: string;
readonly subLocalityLevels?: AdminLevel[];
}
export default class LocationIQGeocoded extends Geocoded {
private readonly placeId?;
private readonly displayName?;
private readonly osmId?;
private readonly osmType?;
private readonly categories?;
private readonly types?;
private readonly distance?;
private readonly precision?;
private readonly precisionCode?;
private readonly precisionType?;
private readonly attribution?;
private readonly subLocalityLevels;
protected constructor({ placeId, displayName, osmId, osmType, categories, types, distance, precision, precisionCode, precisionType, attribution, subLocalityLevels, ...geocodedObject }: LocationIQGeocodedObject);
static create(object: LocationIQGeocodedObject): LocationIQGeocoded;
toObject(): LocationIQGeocodedObject;
withPlaceId(placeId: string): LocationIQGeocoded;
getPlaceId(): undefined | string;
withDisplayName(displayName: string): LocationIQGeocoded;
getDisplayName(): undefined | string;
withOsmId(osmId: string): LocationIQGeocoded;
getOsmId(): undefined | string;
withOsmType(osmType: LocationIQOsmType): LocationIQGeocoded;
getOsmType(): undefined | LocationIQOsmType;
withCategories(categories: string[]): LocationIQGeocoded;
getCategories(): undefined | string[];
withTypes(types: string[]): LocationIQGeocoded;
getTypes(): undefined | string[];
withDistance(distance: number): LocationIQGeocoded;
getDistance(): undefined | number;
withPrecision(precision: LocationIQPrecision): LocationIQGeocoded;
getPrecision(): undefined | LocationIQPrecision;
withPrecisionCode(precisionCode: LocationIQPrecisionCode): LocationIQGeocoded;
getPrecisionCode(): undefined | LocationIQPrecisionCode;
withPrecisionType(precisionType: LocationIQPrecisionType): LocationIQGeocoded;
getPrecisionType(): undefined | LocationIQPrecisionType;
withAttribution(attribution: string): LocationIQGeocoded;
getAttribution(): undefined | string;
addSubLocalityLevel(subLocalityLevel: AdminLevel): void;
getSubLocalityLevels(): AdminLevel[];
}
//# sourceMappingURL=LocationIQGeocoded.d.ts.map