reverse method

  1. @override
Future<NominatimResponse> reverse({
  1. required ReverseRequest reverseRequest,
  2. String? language,
})
override

Performs a reverse geocoding request based on the given reverseRequest.

The reverseRequest parameter is required and contains the reverse geocoding criteria. The optional language parameter specifies the language for the search results.

Returns a Future that completes with a NominatimResponse object.

Implementation

@override
Future<NominatimResponse> reverse({
  required ReverseRequest reverseRequest,
  String? language,
}) async {
  return await loadWithIsolate(() async {
    var response = await NominatimServiceClient(
      type: NominatimServiceType.reverse,
      reverseRequest: reverseRequest,
      language: language,
    ).request();
    return NominatimResponse.fromJson(response);
  });
}