From 28b49e2643be957b34bdaf90da3d9d5874f5161a Mon Sep 17 00:00:00 2001 From: lewa <lene.wasskog@nibio.no> Date: Fri, 26 Apr 2024 13:48:51 +0200 Subject: [PATCH] feat: Display values below/above range as yellow/blue --- mapfile/template.j2 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mapfile/template.j2 b/mapfile/template.j2 index fcf411d..b58a9fe 100644 --- a/mapfile/template.j2 +++ b/mapfile/template.j2 @@ -65,7 +65,7 @@ WEB </p> <h3>Explanation of parameters</h3> <ul> - <li>temperature = <span itemprop='temperature'>Maximum Air Temperature at 2m</span></li> + <li>temperature = <span itemprop='temperature'>Maximum Air Temperature</span></li> </ul> </div> " @@ -193,6 +193,13 @@ LAYER {% endfor %} END CLASSITEM "[pixel]" + CLASS + NAME "Below 10" + EXPRESSION ([pixel] < 10) + STYLE + COLOR 255 255 0 # RGB for Yellow + END + END CLASS NAME "Temperature range" EXPRESSION ([pixel] >= 10 AND [pixel] <= 25) @@ -201,7 +208,13 @@ LAYER COLORRANGE 255 255 0 0 0 255 END END - + CLASS + NAME "Above 25" + EXPRESSION ([pixel] > 25) + STYLE + COLOR 0 0 255 # RGB for Blue + END + END END # Layer {% endfor %} -- GitLab