Color radar image using a color table

This commit is contained in:
Dan Paulat 2021-07-29 21:59:21 -05:00
parent f004c7aee0
commit c06230ed6c
6 changed files with 81 additions and 14 deletions

View file

@ -106,6 +106,14 @@ void MapWidget::AddLayers()
radarView->Initialize();
QString colorTableFile = qgetenv("COLOR_TABLE");
if (!colorTableFile.isEmpty())
{
std::shared_ptr<common::ColorTable> colorTable =
common::ColorTable::Load(colorTableFile.toUtf8().constData());
radarView->LoadColorTable(colorTable);
}
// QMapboxGL::addCustomLayer will take ownership of the QScopedPointer
QScopedPointer<QMapbox::CustomLayerHostInterface> pHost(
new RadarLayer(radarView, p->gl_));