Added inverted threshold for radar sites

This commit is contained in:
AdenKoperczak 2024-12-10 16:11:53 -05:00
parent f7a1668c3f
commit 74066aa195
5 changed files with 12 additions and 8 deletions

View file

@ -65,7 +65,9 @@ void RadarSiteLayer::Render(
auto mapDistance = util::maplibre::GetMapDistance(params);
auto threshold = units::length::nautical_miles<double>(
settings::GeneralSettings::Instance().radar_site_threshold().GetValue());
if (threshold.value() != 0.0 && mapDistance > threshold)
if (!(threshold.value() == 0.0 || mapDistance <= threshold ||
(threshold.value() < 0 && mapDistance >= -threshold)))
{
return;
}