public T ReverseGeocoding(GeoCoordinates location) { return(_client.GetRequest <T>(new Dictionary <string, string>() { { "latlng", location.ToString() } })); }
private bool IsFoundAddress(GeoCoordinates location) { GeocodingResponse response = FindAddress(location); bool is_found = IsStatusOk(response.Status); if (!is_found) { Console.WriteLine($"Address of location: {location.ToString()} is not found: {response.Status}"); } return(is_found); }
private static async Task <string> GetAddress(GeoCoordinates coordinates) { var results = await _googleService.ReverseGeocoding(coordinates.ToString(), _googleApiKey); return(results.results.FirstOrDefault()?.formatted_address); }