# Variable geocoding`Const`

geocoding: {
byId: ((id: string, options?: LanguageGeocodingOptions) => Promise<GeocodingSearchResult>);
forward: ((query: string, options?: GeocodingOptions) => Promise<GeocodingSearchResult>);
language: {
ALBANIAN: string;
ARABIC: string;
ARMENIAN: string;
AUTO: string;
AZERBAIJANI: string;
BELORUSSIAN: string;
BOSNIAN: string;
BRETON: string;
BULGARIAN: string;
CATALAN: string;
CHINESE: string;
CROATIAN: string;
CZECH: string;
DANISH: string;
DUTCH: string;
ENGLISH: string;
ESPERANTO: string;
ESTONIAN: string;
FINNISH: string;
FRENCH: string;
FRISIAN: string;
GEORGIAN: string;
GERMAN: string;
GREEK: string;
HEBREW: string;
HUNGARIAN: string;
ICELANDIC: string;
IRISH: string;
ITALIAN: string;
JAPANESE: string;
KANNADA: string;
KAZAKH: string;
KOREAN: string;
LATVIAN: string;
LITHUANIAN: string;
LUXEMBOURGISH: string;
MACEDONIAN: string;
MALTESE: string;
NORWEGIAN: string;
POLISH: string;
PORTUGUESE: string;
ROMANIAN: string;
ROMANSH: string;
ROMAN_LATIN: string;
RUSSIAN: string;
SCOTTISH_GAELIC: string;
SERBIAN_CYRILLIC: string;
SLOVAK: string;
SLOVENE: string;
SPANISH: string;
SWEDISH: string;
THAI: string;
TURKISH: string;
UKRAINIAN: string;
WELSH: string;
};
reverse: ((position: Position, options?: CommonForwardAndReverseGeocodingOptions) => Promise<GeocodingSearchResult>);
} = ...

The geocoding namespace contains asynchronous functions to call the MapTiler Geocoding API. The Geocoding API provides ways to get geographic coordinates from a human-readable search query of a place (forward geocoding) and to get the location details (country, city, street, etc.) from a geographic coordinate (reverse geocoding);

#### Type declaration

- ##### byId: ((id: string, options?: LanguageGeocodingOptions) => Promise<GeocodingSearchResult>)

  - - (id: string, options?: LanguageGeocodingOptions): Promise<GeocodingSearchResult>

    - Perform a geocoding query to MapTiler API to obtain fature by its ID. Providing a feature ID, this function returns a feature which includes its full geometry. Note that the feature ID is not stable and it changes when the database is re-indexed. Learn more on the MapTiler API reference page: https://docs.maptiler.com/cloud/api/geocoding/#search-by-feature-id

      ### Returns

      #### Parameters

      - ##### id: string

      - ##### options: LanguageGeocodingOptions = {}

      #### Returns Promise<GeocodingSearchResult>

- ##### forward: ((query: string, options?: GeocodingOptions) => Promise<GeocodingSearchResult>)

  - - (query: string, options?: GeocodingOptions): Promise<GeocodingSearchResult>

    - Performs a forward geocoding query to MapTiler API. Providing a human readable place name (of a city, country, street, etc.), the function returns a list of candidate locations including longitude and latitude. Learn more on the MapTiler API reference page: https://docs.maptiler.com/cloud/api/geocoding/#search-by-name-forward

      ### Returns

      #### Parameters

      - ##### query: string

      - ##### options: GeocodingOptions = {}

      #### Returns Promise<GeocodingSearchResult>

- ##### language: {
  ALBANIAN: string;
  ARABIC: string;
  ARMENIAN: string;
  AUTO: string;
  AZERBAIJANI: string;
  BELORUSSIAN: string;
  BOSNIAN: string;
  BRETON: string;
  BULGARIAN: string;
  CATALAN: string;
  CHINESE: string;
  CROATIAN: string;
  CZECH: string;
  DANISH: string;
  DUTCH: string;
  ENGLISH: string;
  ESPERANTO: string;
  ESTONIAN: string;
  FINNISH: string;
  FRENCH: string;
  FRISIAN: string;
  GEORGIAN: string;
  GERMAN: string;
  GREEK: string;
  HEBREW: string;
  HUNGARIAN: string;
  ICELANDIC: string;
  IRISH: string;
  ITALIAN: string;
  JAPANESE: string;
  KANNADA: string;
  KAZAKH: string;
  KOREAN: string;
  LATVIAN: string;
  LITHUANIAN: string;
  LUXEMBOURGISH: string;
  MACEDONIAN: string;
  MALTESE: string;
  NORWEGIAN: string;
  POLISH: string;
  PORTUGUESE: string;
  ROMANIAN: string;
  ROMANSH: string;
  ROMAN_LATIN: string;
  RUSSIAN: string;
  SCOTTISH_GAELIC: string;
  SERBIAN_CYRILLIC: string;
  SLOVAK: string;
  SLOVENE: string;
  SPANISH: string;
  SWEDISH: string;
  THAI: string;
  TURKISH: string;
  UKRAINIAN: string;
  WELSH: string;
  }

  - ##### ALBANIAN: string

  - ##### ARABIC: string

  - ##### ARMENIAN: string

  - ##### AUTO: string

  - ##### AZERBAIJANI: string

  - ##### BELORUSSIAN: string

  - ##### BOSNIAN: string

  - ##### BRETON: string

  - ##### BULGARIAN: string

  - ##### CATALAN: string

  - ##### CHINESE: string

  - ##### CROATIAN: string

  - ##### CZECH: string

  - ##### DANISH: string

  - ##### DUTCH: string

  - ##### ENGLISH: string

  - ##### ESPERANTO: string

  - ##### ESTONIAN: string

  - ##### FINNISH: string

  - ##### FRENCH: string

  - ##### FRISIAN: string

  - ##### GEORGIAN: string

  - ##### GERMAN: string

  - ##### GREEK: string

  - ##### HEBREW: string

  - ##### HUNGARIAN: string

  - ##### ICELANDIC: string

  - ##### IRISH: string

  - ##### ITALIAN: string

  - ##### JAPANESE: string

  - ##### KANNADA: string

  - ##### KAZAKH: string

  - ##### KOREAN: string

  - ##### LATVIAN: string

  - ##### LITHUANIAN: string

  - ##### LUXEMBOURGISH: string

  - ##### MACEDONIAN: string

  - ##### MALTESE: string

  - ##### NORWEGIAN: string

  - ##### POLISH: string

  - ##### PORTUGUESE: string

  - ##### ROMANIAN: string

  - ##### ROMANSH: string

  - ##### ROMAN_LATIN: string

  - ##### RUSSIAN: string

  - ##### SCOTTISH_GAELIC: string

  - ##### SERBIAN_CYRILLIC: string

  - ##### SLOVAK: string

  - ##### SLOVENE: string

  - ##### SPANISH: string

  - ##### SWEDISH: string

  - ##### THAI: string

  - ##### TURKISH: string

  - ##### UKRAINIAN: string

  - ##### WELSH: string

- ##### reverse: ((position: Position, options?: CommonForwardAndReverseGeocodingOptions) => Promise<GeocodingSearchResult>)

  - - (position: Position, options?: CommonForwardAndReverseGeocodingOptions): Promise<GeocodingSearchResult>

    - Perform a reverse geocoding query to MapTiler API. Providing a longitude and latitude, this function returns a set of human readable information about this place (country, city, street, etc.) Learn more on the MapTiler API reference page: https://docs.maptiler.com/cloud/api/geocoding/#search-by-coordinates-reverse

      ### Returns

      #### Parameters

      - ##### position: Position

      - ##### options: CommonForwardAndReverseGeocodingOptions = {}

      #### Returns Promise<GeocodingSearchResult>

- Defined in services/geocoding.ts:323

Generated using TypeDoc