diff --git a/app/libraries/main.php b/app/libraries/main.php index 3169179c..3afd1b98 100644 --- a/app/libraries/main.php +++ b/app/libraries/main.php @@ -5709,7 +5709,8 @@ public function get_weather($lat, $lng, $datetime) ))) $locale = 'en'; // Dark Sky Provider - $JSON = $this->get_web_page('https://api.darksky.net/forecast/'.$settings['weather_module_api_key'].'/'.$lat.','.$lng.','.strtotime($datetime).'?exclude=minutely,hourly,daily,alerts&units=ca&lang='.$locale); + // $JSON = $this->get_web_page('https://api.darksky.net/forecast/'.$settings['weather_module_api_key'].'/'.$lat.','.$lng.','.strtotime($datetime).'?exclude=minutely,hourly,daily,alerts&units=ca&lang='.$locale); + $JSON = $this->get_web_page('https://api.weatherapi.com/v1/forecast.json?key='.$settings['weather_module_api_key'].'&q='.$lat.','.$lng); $data = json_decode($JSON, true); return (isset($data['currently']) ? $data['currently'] : false); diff --git a/app/modules/weather/details.php b/app/modules/weather/details.php index 5c200dd7..c61afecd 100644 --- a/app/modules/weather/details.php +++ b/app/modules/weather/details.php @@ -41,23 +41,25 @@
- + + >
- -
+ +
- +
- - - weather_unit_convert($weather['temperature'], 'C_TO_F'); ?> - - + + + weather_unit_convert($weather['temp_c'], 'C_TO_F'); ?> + +
+
@@ -67,16 +69,16 @@
- -
: weather_unit_convert($weather['windSpeed'], 'KM_TO_M');?>
+ +
: weather_unit_convert($weather['wind_kph'], 'KM_TO_M');?>
:
- -
: weather_unit_convert($weather['visibility'], 'KM_TO_M');?>
+ +
: weather_unit_convert($weather['vis_km'], 'KM_TO_M');?>