(iconID, isNight)
| 444 | FUNCTION getWeatherIcon |
| 445 | ------------------------------------------------------------------*/ |
| 446 | async function getWeatherIcon(iconID, isNight){ |
| 447 | try { |
| 448 | const iconIDNight = iconID.replace("d","n"); |
| 449 | if (isNight) iconID = iconIDNight; |
| 450 | const iconURL = baseWeatherIconURL + "/" + iconID + "@2x.png"; |
| 451 | writeLOG(`Fetching url: ${iconURL}`); |
| 452 | let request = new Request(iconURL); |
| 453 | return await request.loadImage(); |
| 454 | } catch (error) { |
| 455 | errMsg = "getWeatherIcon_" + error.message.replace(/\s/g,"_"); |
| 456 | writeLOG(errMsg); |
| 457 | return; |
| 458 | } |
| 459 | } |
| 460 | /*------------------------------------------------------------------ |
| 461 | FUNCTION createOverlay |
| 462 | ------------------------------------------------------------------*/ |
no test coverage detected