UNPKG

leaflet-control-geocoder

Version:

Extendable geocoder with builtin support for OpenStreetMap Nominatim, Bing, Google, Mapbox, MapQuest, What3Words, Photon, Pelias, HERE, Neutrino, Plus codes

17 lines (16 loc) 680 B
import * as L from 'leaflet'; import { IGeocoder, GeocoderOptions, GeocodingResult } from './api'; export interface OpenCageOptions extends GeocoderOptions { } /** * Implementation of the [OpenCage Data API](https://opencagedata.com/) */ export declare class OpenCage implements IGeocoder { options: OpenCageOptions; constructor(options?: Partial<OpenCageOptions>); geocode(query: string): Promise<GeocodingResult[]>; suggest(query: string): Promise<GeocodingResult[]>; reverse(location: L.LatLngLiteral, scale: number): Promise<GeocodingResult[]>; private _parseResults; } export declare function opencage(options?: Partial<OpenCageOptions>): OpenCage;