public Location GetLocation(float latitude, float longitude) { var response = _googleClient.GetReverseGeocoding(latitude, longitude); return(new Location()); }
public Location GetLocation(GeoPosition geoPosition) { var location = _locationRepo.GetLocation(geoPosition.Latitude, geoPosition.Longitude); if (location != null) { return(location); } if (!Connected) { return(null); } var response = _googleClient.GetReverseGeocoding(geoPosition.Latitude, geoPosition.Longitude); if (response.IsOk) { location = CreateLocation(string.Empty, geoPosition, response); return(location); } else { Debug.WriteLine($"Could not find location by name for {geoPosition.GetDisplay()} "); //_unknownAddresses[address] = 1; } return(null); }