Skip to content

Commit 78a8675

Browse files
committed
Merge pull request #53 from cmfcmf/fix-wind-direction
Fix wind direction retrieval, closes #52.
2 parents 468a991 + ea06037 commit 78a8675

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Cmfcmf/OpenWeatherMap/Forecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(\SimpleXMLElement $xml, $units)
6767
$windSpeedUnit = 'mps';
6868
}
6969

70-
$this->wind = new Wind(new Unit($xml->windSpeed['mps'], $windSpeedUnit, $xml->windSpeed['name']), new Unit($xml->windDirection['value'], $xml->windDirection['code'], $xml->windDirection['name']));
70+
$this->wind = new Wind(new Unit($xml->windSpeed['mps'], $windSpeedUnit, $xml->windSpeed['name']), new Unit($xml->windDirection['deg'], $xml->windDirection['code'], $xml->windDirection['name']));
7171
$this->clouds = new Unit($xml->clouds['all'], $xml->clouds['unit'], $xml->clouds['value']);
7272
$this->precipitation = new Unit($xml->precipitation['value'], null, $xml->precipitation['type']);
7373
$this->sun = new Sun(new \DateTime($xml->city->sun['rise']), new \DateTime($xml->city->sun['set']));

0 commit comments

Comments
 (0)