An interface implemented to respond to geocoding queries

interface IGeocoder {
    geocode(
        query: string,
        context?: GeocodingContext,
    ): Promise<GeocodingResult[]>;
    reverse(location: LatLngLiteral, scale: number): Promise<GeocodingResult[]>;
    suggest(
        query: string,
        context?: GeocodingContext,
    ): Promise<GeocodingResult[]>;
}

Implemented by

Methods

  • Performs a reverse geocoding query and returns the results as promise

    Parameters

    • location: LatLngLiteral

      the coordinate to reverse geocode

    • scale: number

      the map scale possibly used for reverse geocoding

    Returns Promise<GeocodingResult[]>