import { FeatureCollection, Geometry } from 'geojson'; import { BoundingBox, LatLngId, LatLngIdTravelMode, LatLngProperties, OSMType, Poi, PoiHierarchy, PoiOverview } from '../types'; import { POIRequestOptions } from '../types/options/poiRequestOptions'; import { TargomoClient } from './targomoClient'; export interface PoiTileParameters { loadAllTags?: boolean; layerType?: 'node' | 'hexagon'; layerGeometryDetailPerTile?: number; layerMinGeometryDetailLevel?: number; layerMaxGeometryDetailLevel?: number; maxGeometryCount?: number; } /** * An object representing a point (poi/marker) which is returned from overpass queries in this module * @deprecated */ export declare class OSMLatLng implements LatLngProperties { readonly id: number; readonly lng: number; readonly lat: number; readonly properties: { [index: string]: any; }; constructor(id: number, lng: number, lat: number, properties: { [index: string]: any; }); toString(): any; copy(): OSMLatLng; } /** * */ /** * @Topic Points of Interest */ export declare class PointsOfInterestClient { private client; constructor(client: TargomoClient); /** * Make an overpass query to a given url (full url including the query parameters) * * The results will be parsed and returned as a list of OSMLatLng objects * * @deprecated */ queryGetCustom(url: string): Promise; /** * Makes a request to the targomo poi service. * Returns a list of OSMLatLng locations of the categories specified by `osmTypes` that are reachable within the given travel options */ reachable(sources: LatLngId | LatLngId[], /// LatLng options: POIRequestOptions): Promise<{ [index: string]: Poi; }>; /** * * @param hash */ reachabilitySummary(hash?: string): Promise; /** * * @param hash */ register(options: { osmTypes: OSMType[]; format?: 'json' | 'geojson'; }): Promise; /** * * @param hash */ reachabilityRegister(sources: LatLngIdTravelMode[], options: POIRequestOptions): Promise; /** * * @param hash * @param options */ reachabilityTileRoute(hash: string, options?: PoiTileParameters): string; /** * * @param hash * @param options */ geometryTileRoute(hash: string, options?: PoiTileParameters): string; /** * * @param hash * @param options */ tileRoute(hash: string, options?: PoiTileParameters): string; /** * * @param hash */ private tileRouteImpl; /** * Returns the POI hierarchy supported by the service. * The POI Hierarchy is a hierarchy tree of POI groups. * Thanks to this hierarchy, one can request groups of POI by their ids. */ hierarchy(): Promise; /** * Returns a list of OSM keys that the service accepts in its requests. */ osmTypes(): Promise; /** * Returns all OSM tag values of the requested tagKey that exist in the POI service database. */ osmTagValues(osmType: string, filter?: string, limit?: number): Promise<{ name: string; count: number; }[]>; /** * Retrieves the info of a list of POIs thanks to their Ids. * * Nomenclature of the ids: * 0_ means that the requested POI is a node. * 1_ means that the requested POI is a way (a line or a polygon). * Theses prefixes are followed by the id of the object in the OSM database. * If the id is negative, it means that the node or the way derives from a relation. */ info(poiIds: string[]): Promise; /** * Retrieves all POIs that match the requested POI groups or OSM types inside a bounding box * * @param options */ boundingBox(bounds: BoundingBox, options: { group?: string[]; osmType?: { [key: string]: string; }; exclude?: string[]; match?: 'any' | 'all'; }): Promise; /** * Returns a list of reachable points of interest (POIs) within a given geometry. * * @param geometry * @param osmTypes * @param format */ geometry(geometry: Geometry, osmTypes: { key: string; value: string; }[], format: 'json'): Promise<{ [id: string]: Poi; }>; geometry(geometry: Geometry, osmTypes: { key: string; value: string; }[], format?: 'geojson'): Promise; /** * * @param hash */ geometrySummary(hash?: string): Promise; /** * * @param geometry * @param osmTypes * @param format */ geometryRegister(geometry: Geometry, options: POIRequestOptions): Promise; }