* @brief Draws the NASA GIBS weather overlay tile if available in the cache. */
| 716 | * @brief Draws the NASA GIBS weather overlay tile if available in the cache. |
| 717 | */ |
| 718 | void Widgets::GPS::renderWeatherOverlay( |
| 719 | QPainter* painter, int wrappedTx, int ty, int baseZoom, const QRect& targetRect) |
| 720 | { |
| 721 | if (!m_showNasaWeather || baseZoom > WEATHER_GIBS_MAX_ZOOM) |
| 722 | return; |
| 723 | |
| 724 | const QString gibsUrl = nasaWeatherUrl(wrappedTx, ty, baseZoom); |
| 725 | if (!s_tileCache.contains(gibsUrl)) |
| 726 | return; |
| 727 | |
| 728 | painter->save(); |
| 729 | painter->setCompositionMode(QPainter::CompositionMode_Screen); |
| 730 | painter->drawImage(targetRect, *s_tileCache.object(gibsUrl)); |
| 731 | painter->restore(); |
| 732 | } |
| 733 | |
| 734 | /** |
| 735 | * @brief Draws the reference layer tile on top of the base tile. |