Lager - v5.2.0
    Preparing search index...
    • Function

      Fetches the geographical coordinates for a given address using the Nominatim API.

      This function takes an address as input, encodes it for use in a URL, and sends a request to the Nominatim API to retrieve the corresponding geographical coordinates in JSON format. If the request is successful, it returns the coordinates data. In case of an error, it catches the error and logs it.

      getCoordinates

      Parameters

      • address: string

        The address for which to fetch coordinates.

      Returns Promise<undefined | CoordinatesResponse[]>

      A promise that resolves to the JSON response containing the coordinates, or undefined if an error occurs.

      If there is an error during the request, it is caught and logged.