briandowns/openweathermap

There is an error message of {"cod":"400","message":"wrong latitude"}

samtuga1 opened this issue · 2 comments

Networking _networking = Networking();
const apiKey = '***********************************';

getWeatherData() async {
var latitude = await _networking.latitude;
var longitude = await _networking.latitude;

Response response = await http.get(
Uri.parse(
'http://api.openweathermap.org/data/2.5/weather?lat={$latitude}&lon={$longitude}&exclude=hourly,daily&appid=$apiKey'),
);
print(response.statusCode);
print(response.body);
}

The networking class does it job at return my current lattitude and longitude

I'm not sure this is the repository you're looking for. This repo is for the Go client. I removed your key from the post.

I'm not sure this is the repository you're looking for. This repo is for the Go client. I removed your key from the post.

Okay thanks, well I’m sorry