diff --git a/examples/PSILARTEMP.map b/examples/PSILARTEMP.map index 8c654340f7c175ce829a4ad6817126f5b6ca1624..9bbce20d7490cfa77e8a1598c7209e9374c70874 100644 --- a/examples/PSILARTEMP.map +++ b/examples/PSILARTEMP.map @@ -42,53 +42,22 @@ MAP "wms_abstract.nb" " - <h2>Modellbeskrivelse</h2> - <p>Varslingsmodellen «Gulrotflue svermetidspunkt» er basert på en finsk, temperaturbasert modell (Markkula <em>et al</em>, 1998; Tiilikkala & Ojanen, 1999; Markkula <em>et al</em>, 2000). Modellen beregner tidspunkt for sverming av 1. generasjon og 2. generasjon av gulrotflue basert på akkumulering av graddager (døgngrader) over en basistemperatur på 5 °C. I VIPS benyttes modellen kun for 1. generasjon.</p> - <p>Det er standard lufttemperatur (temperatur målt 2 m over bakken) som benyttes i modellen. Graddager er her definert som summen av differansen mellom en basistemperatur på 5 °C og døgnmiddeltemperatur for alle døgn med temperatur >5 °C dvs. summen av (døgnmiddeltemperatur - 5 °C) fra 1. mars (fra det er telefritt i jorda).</p> - <h2>Tolking av varsel</h2> - <p>Grønne bokser betyr at svermingen enda ikke har begynt. Akkumulering av døgngrader er < 260 graddager (døgngrader).</p> - <p>Gule bokser betyr svermingen er i startfasen og at man må være obs på at det kan komme innflyvere i åkeren. Akkumulering av døgngrader er ≥ 260 graddager (døgngrader).</p> - <p>Røde bokser betyr svermingen er på sitt mest aktive. Akkumulering av døgngrader er ≥ 360 graddager (døgngrader).</p> - <p>Grå bokser betyr at svermingen av 1. generasjon er over og varslingen er avsluttet. Akkumulering av døgngrader er ≥ 560 graddager (døgngrader).</p> - <p>Vær klar over at i områder med dekke (plast, enkel og dobbel fiberduk el. lign.) ved tidligproduksjon (enten på samme jorde eller nabojorder) året før, kan svermingen starte tidligere på grunn av høyere jordtemperatur under dekket.</p> - <h2>Varslingssesong – oppstart og avslutning av varsel</h2> - <p>Starttidspunkt: Vises i VIPS fra 1. april (startdato for akkumulering av graddager fra det er telefritt) i jorda.</p> - <p>Sluttidspunkt: Når modellen har nådd kravet til døgngrader for avsluttet sverming av 1. generasjon (560 døgngrader).</p> - <h2>Utprøving og validering av modellen</h2> - <h3>Nasjonalt</h3> - <p>Modellen har vært testet og evaluert for norske forhold i perioden 2011-2015. Valideringen har vist at modellen stemte ganske bra for de fleste steder for 1. generasjon. Modellen stemte imidlertid dårlig for 2. generasjon for mange lokaliteter og var direkte feil for Jæren-distriktet. På bakgrunn av resultatene fra valideringen har vi derfor valgt å fjerne varsling av 2. generasjon gulrotflue med denne modellen.</p> - <h3>Internasjonalt</h3> - <p>Modellen er i bruk i Finland. Det er usikkert hvor omfattende modellen er validert i Finland, men det er utført en validering sommeren 1997. Denne valideringen tilsa at modellen stemte nokså bra, men at terskeltemperatursummen burde reduseres til 255 graddager for svermingsstart (mot 260 graddager i den opprinnelige modellen) og 355 graddager for svermetoppen (mot 360 daggrader i den opprinnelige modellen) (Tiilikkala & Ojanen, 1999).</p> - <h2>Referanser</h2> - <ul> - <li>Markkula, I., H. Ojanen and K. Tiilikkala. 1998. Forecasting and monitoring of the carrot fly (Psila rosae) in Finland. The 1998 Brighton Conference: Pests and Diseases: Conference Proceedings, Volume 2, pages 657-662.</li> - <li>Tiilikkala, K. and H. Ojanen. 1999. Use of a geographical information system (GIS) for forecasting the activities of carrot fly and cabbage root fly. IOBC/WPRS Bulletin 22 (5): 15-24.</li> - <li>Markkula, I., A. Hannukkala, A. Lehtinen, I. Mattila, H. Ojanen, S. Raisjio, P. Reijonen and K. Tiilikkala. 2000. Pest warnings and forecasts sent as SMS messages from models into "farmer's pocket". In publication: Pests & Diseases 2000. Proceedings of an international conference held at the Brighton Hilton Metropole Hotel, UK, 13-16 November 2000. BCPC Conference Proceedings pages 285-290.</li> + <p> + Kartet viser beregnet <a href=\"https://www.vips-landbruk.no/forecasts/models/PSILARTEMP/\" target=\"new\">svermetidspunkt + for gulrotflue 1. generasjon</a>. Varslene beregnes i rutenett a 1x1km basert på reanalyserte data og værvarsler fra + Meteorologisk institutt. Varslene oppdateres en gang per døgn. Modellen for svermetidspunkt for gulrotflue beregnes også + med data fra værstasjoner, hvor mer detaljerte beregninger kan hentes opp via visningen i kartet på VIPS-forsida. + </p> + <p> + Denne kartvisningen av rutenettbaserte varsler er resultat fra prosjektet "Grid-baserte varsler i VIPS", + finansiert av Landbruksdirektoratet gjennom Handlingsplan for bærekraftig bruk av plantevernmidler i + 2023. + </p> " "wms_abstract.en" " <p>The warning system model «Carrot rust fly temperature» is based on a Finnish temperature-based model (Markkula <em>et al</em>, 1998; Tiilikkala & Ojanen, 1999; Markkula <em>et al</em>, 2000). The model determines the start of the flight period for the 1st and 2nd generation of carrot rust fly based on accumuleted degree-days (day-degrees) over a base temperature of 5,0 °C. VIPS uses the model for the 1st generation only.</p> <p>Standard air temperature (temperature measured 2 m above ground) is used in the model. Degree-days are defined for this model as the sum of the difference between a base temperature of 5,0 °C and the mean temperature for all days with a temperature >5,0 °C, in other words (daily mean temperature – 5,0 °C) from 1 March (beginning when the ground has thawed).</p> - <h3>Interpretation of the warning</h3> - <p>Green rectangles indicate that the flight period has not yet begun. The accumulated day-degrees are < 260 degree-days (day-degrees).</p> - <p>Yellow rectangles indicate that the flight period is beginning and that flies can be coming into the field. The accumulated day-degrees are ≥ 260 degree-days (day-degrees).</p> - <p>Red rectangles indicate peak flight period. The accumulated day-degrees are ≥ 360 degree-days (day-degrees).</p> - <p>Grey rectangles indicate that the flight period of the 1st generation is over. The accumulated day-degrees are ≥ 560 degree-days (day-degrees).</p> - <p>Be aware that in areas with field covers (plastic, single or double non-woven covers, etc.) with early crops the preceding season (either on the current field or neighboring fields), the flight period can start earlier due to higher soil temperature under the covers.</p> - <p>The graphic presentation shows the progress of the day-degree calculation that is the basis for the green, yellow and red warnings (the line: «Accumulated day-degrees with the base temperature of 5 degrees C»). The graph show straight horizontal lines for the threshold values. «Day-degree threshold for low likelihood of attack» corresponds to when the warning changes from green to yellow (260 day-degrees). «Day-degree threshold for high likelihood of attack » corresponds to when the warning changes from yellow to red (360 day-degrees). «Day-degree threshold for end of flight period» corresponds to when the warning changes from red to grey (560 day-degrees) and the flight period for the 1st generation is considered to be over. When the line « Accumulated day-degrees with the base temperature of 5 degrees C» intersects one of the lines for the day-degree threshold, the warning will advance to the next level and the color of the warning rectangle will change. The graph also shows the daily mean temperature for the relevant weather station. The graph is dynamic and the user can choose which parameters that are shown by clicking on the explanation below the graph.</p> - <h3>Warning season – start and end of the warning</h3> - <p>Starting time: Shown in VIPS from 1 April (starting date for accumulation of degree-days beginning from when the ground has thawed).<br /> Ending time: When the model has reached the requirement for the end of the flight period for the 1st generation (560 day-degrees).</p> - <h3>Testing and validation of the model</h3> - <h4>National</h4> - <p>The model has been tested for Norwegian conditions in the period of 2011-2015. Validation has shown that the model was accurate for most locations for the 1st generation. The model was, however, inaccurate for the 2nd generation for many locations and was totally incorrect for the district of Jæren. Based on the validation results, we have therefore chosen to remove warning of the 2nd generation of carrot rust fly from this model.</p> - <h4>International</h4> - <p>The model is in use in Finland. The extent to which the model has been validated in Finland is uncertain, but a validation was done in the summer of 1997. This validation showed that the model was quite accurate, but that the threshold temperature sm should be lowered to 255 day-degrees for the start of the flight period (as opposed to 260 degree-days in the original model) and 355 degree-days forthe peak flight period (as opposed to 360 degree-days in the original model) (Tiilikkala & Ojanen, 1999).</p> - <h3>Literature</h3> - <p>Markkula, I., H. Ojanen and K. Tiilikkala. 1998. Forecasting and monitoring of the carrot fly (<em>Psila rosae</em>) in Finland. The 1998 Brighton Conference: Pests and Diseases: Conference Proceedings, Volume 2, pages 657-662.</p> - <p>Tiilikkala, K. and H. Ojanen. 1999. Use of a geographical information system (GIS) for forecasting the activities of carrot fly and cabbage root fly. IOBC/WPRS Bulletin 22 (5): 15-24.</p> - <p>Markkula, I., A. Hannukkala, A. Lehtinen, I. Mattila, H. Ojanen, S. Raisjio, P. Reijonen and K. Tiilikkala. 2000. Pest warnings and forecasts sent as SMS messages from models into \"farmer's pocket\". In publication: Pests & Diseases 2000. Proceedings of an international conference held at the Brighton Hilton Metropole Hotel, UK, 13-16 November 2000. BCPC Conference Proceedings pages 285-290.</p> - <p> </p> - <p><strong>Contacts</strong></p> - <p>Annette Folkedal Schjøll <a href=\"mailto:annette.folkedal.schjoll@nibio.no\">annette.folkedal.schjoll@nibio.no</a><br />Tor J. Johansen <a href=\"mailto:tor.johansen@nibio.no\">tor.johansen@nibio.no</a></p> + <p><a href=\"https://www.vips-landbruk.no/forecasts/models/PSILARTEMP/\" target=\"new\">Complete model description</a></p> " "wms_enable_request" "*" "wms_title.en" "Carrot rust fly (Psila rosae) temperature model" @@ -124,8 +93,8 @@ MAP LAYER - NAME "PSILARTEMP.WARNING_STATUS.2023-04-01" - DATA "/disks/data01/mapserver/data/PSILARTEMP/result_WARNING_STATUS_2023-04-01.tif" + NAME "PSILARTEMP.WARNING_STATUS.2023-06-01" + DATA "/disks/data01/mapserver/data/PSILARTEMP/result_WARNING_STATUS_2023-06-01.tif" TEMPLATE "/disks/data01/mapserver/wms/PSILARTEMP/query_template.xml" TOLERANCE 1 TOLERANCEUNITS PIXELS TYPE RASTER PROCESSING "BANDS=1" # WARNING_STATUS band on top (others invisible, but band values are available in the query template) @@ -134,125 +103,68 @@ MAP STATUS ON METADATA - "wms_title" "Carrot rust fly (Psila rosae) temperature model 2023-04-01" + "wms_title" "Carrot rust fly (Psila rosae) temperature model 2023-06-01" "wms_abstract.en" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> No forecast</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> No risk</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Possible risk</li> - <li><span style=\"background-color: #FF0000;\"> </span> High risk</li> - </ul> - " - - "wms_abstract.nb" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> Varsel beregnes ikke</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> Ingen infeksjonsrisikok</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Mulig fare for angrep</li> - <li><span style=\"background-color: #FF0000;\"> </span> Høy fare for angrep</li> - </ul> - " - - END - CLASSITEM "[pixel]" - - # class using simple string comparison, equivalent to ([pixel] = 0) - - CLASS - NAME "Model not running" - EXPRESSION ([pixel] >= 0 AND [pixel] < 2) - STYLE - COLOR 112 112 112 - END - END - CLASS - NAME "No infection risk" - EXPRESSION ([pixel] >= 2 AND [pixel] < 3) - STYLE - COLOR 0 180 87 - END - END - CLASS - NAME "Possible infection risk" - EXPRESSION ([pixel] >= 3 AND [pixel] < 4) - STYLE - COLOR 255 204 0 - END - END - CLASS - NAME "High infection risk" - EXPRESSION ([pixel] >= 4) - STYLE - COLOR 255 0 0 - END - END - END # Layer - - LAYER - NAME "PSILARTEMP.DD.2023-04-01" - DATA "/disks/data01/mapserver/data/PSILARTEMP/result_2023-04-01.tif" - TEMPLATE "/disks/data01/mapserver/wms/PSILARTEMP/query_template_DD.xml" TOLERANCE 1 TOLERANCEUNITS PIXELS - TYPE RASTER - STATUS ON - METADATA - "wms_title" "Carrot rust fly (Psila rosae) temperature model Day Degrees 2023-04-01" - - "wms_abstract.en" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"display: inline-block; width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\"> </span> Day degrees</li> - </ul> + { + \"legendItems\": [ + { + \"isWarningStatus\": true, + \"classification\": 0, + \"legendLabel\": \"Flight period ended\", + \"legendIconCSS\": \"width: 25px; background-color: #707070;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 2, + \"legendLabel\": \"Flight period not started\", + \"legendIconCSS\": \"width: 25px; background-color: #00B457;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 3, + \"legendLabel\": \"Flight period starting\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC00;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 4, + \"legendLabel\": \"Peak flight activity\", + \"legendIconCSS\": \"width: 25px; background-color: #FF0000;\" + } + ] + } " "wms_abstract.nb" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"display: inline-block; width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\"> </span> Døgngrader</li> - </ul> - " - - END - - CLASSITEM "[pixel]" - CLASS - NAME "Day degrees" - STYLE - DATARANGE 0 1000 - COLORRANGE 0 0 255 255 0 0 - END - END - - END # Layer - - - LAYER - NAME "PSILARTEMP.WARNING_STATUS.2023-04-02" - DATA "/disks/data01/mapserver/data/PSILARTEMP/result_WARNING_STATUS_2023-04-02.tif" - TEMPLATE "/disks/data01/mapserver/wms/PSILARTEMP/query_template.xml" TOLERANCE 1 TOLERANCEUNITS PIXELS - TYPE RASTER - PROCESSING "BANDS=1" # WARNING_STATUS band on top (others invisible, but band values are available in the query template) - PROCESSING "NODATA=-1" - - - STATUS ON - METADATA - "wms_title" "Carrot rust fly (Psila rosae) temperature model 2023-04-02" - - "wms_abstract.en" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> No forecast</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> No risk</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Possible risk</li> - <li><span style=\"background-color: #FF0000;\"> </span> High risk</li> - </ul> - " - - "wms_abstract.nb" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> Varsel beregnes ikke</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> Ingen infeksjonsrisikok</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Mulig fare for angrep</li> - <li><span style=\"background-color: #FF0000;\"> </span> Høy fare for angrep</li> - </ul> + { + \"legendItems\": [ + { + \"isWarningStatus\": true, + \"classification\": 0, + \"legendLabel\": \"Sverming avsluttet\", + \"legendIconCSS\": \"width: 25px; background-color: #707070;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 2, + \"legendLabel\": \"Sverming har ikke begynt\", + \"legendIconCSS\": \"width: 25px; background-color: #00B457;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 3, + \"legendLabel\": \"Sverming i startfasen\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC00;\" + }, + { + \"isWarningStatus\": true, + \"classification\": 4, + \"legendLabel\": \"Sverming på sitt mest aktive\", + \"legendIconCSS\": \"width: 25px; background-color: #FF0000;\" + } + ] + } " END @@ -291,21 +203,41 @@ MAP END # Layer LAYER - NAME "PSILARTEMP.DD.2023-04-02" - DATA "/disks/data01/mapserver/data/PSILARTEMP/result_2023-04-02.tif" + NAME "PSILARTEMP.DD.2023-06-01" + DATA "/disks/data01/mapserver/data/PSILARTEMP/result_2023-06-01.tif" TEMPLATE "/disks/data01/mapserver/wms/PSILARTEMP/query_template_DD.xml" TOLERANCE 1 TOLERANCEUNITS PIXELS TYPE RASTER STATUS ON METADATA - "wms_title" "Carrot rust fly (Psila rosae) temperature model Day Degrees 2023-04-02" + "wms_title" "Carrot rust fly (Psila rosae) temperature model Day Degrees 2023-06-01" "wms_abstract.en" " + { + \"legendItems\": [ + { + \"isWarningStatus\": false, + \"classification\": 0, + \"legendLabel\": \"Day degrees\", + \"legendIconCSS\": \"width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\" + } + ] + } <ul style=\"list-style: none; padding: 0;\"> <li style=\"margin-bottom: 5px;\"><span style=\"display: inline-block; width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\"> </span> Day degrees</li> </ul> " "wms_abstract.nb" " + { + \"legendItems\": [ + { + \"isWarningStatus\": false, + \"classification\": 0, + \"legendLabel\": \"Døgngrader\", + \"legendIconCSS\": \"width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\" + } + ] + } <ul style=\"list-style: none; padding: 0;\"> <li style=\"margin-bottom: 5px;\"><span style=\"display: inline-block; width: 25px; background: linear-gradient(to right, #0000FF, #FF0000);\"> </span> Døgngrader</li> </ul> @@ -324,9 +256,6 @@ MAP END # Layer - - - END #map \ No newline at end of file diff --git a/grid_models.md b/grid_models.md index 3dc2f3546d3e34a74f9a89d26921d856bbd9ce34..3e57dbc093e17d77932c36406605d72ceabcf598 100644 --- a/grid_models.md +++ b/grid_models.md @@ -4,7 +4,7 @@ Tor-Einar Skog, Senior developer, NIBIO -Updated: 2023-11-17 +Updated: 2023-12-20 ## What you will learn This document describes how to set up a VIPS compatible gridded DSS model, such as in the screenshot below. It also describes briefly [how to set up a client to a VIPS compatible DSS gridded model](#vips-grid-model-client). @@ -255,33 +255,120 @@ We have hacked this by using the `"wms_abstract"` metadata option for each layer NAME "PSILARTEMP.WARNING_STATUS.2023-04-01" [...] METADATA + "wms_title" "Reference humidity model 2023-10-28" "wms_abstract.en" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> No forecast</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> No risk</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Possible risk</li> - <li><span style=\"background-color: #FF0000;\"> </span> High risk</li> - </ul> - " - - "wms_abstract.nb" " - <ul style=\"list-style: none; padding: 0;\"> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #707070;\"> </span> Varsel beregnes ikke</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #00B457;\"> </span> Ingen infeksjonsrisikok</li> - <li style=\"margin-bottom: 5px;\"><span style=\"background-color: #FFCC00;\"> </span> Mulig fare for angrep</li> - <li><span style=\"background-color: #FF0000;\"> </span> Høy fare for angrep</li> - </ul> - " - END + { + \"isWarningStatus\": true, + \"legendItems\": [ + { + \"classification\": 0, + \"legendLabel\": \"No infection risk\", + \"legendIconCSS\": \"width: 25px; background-color: #707070;\" + }, + { + \"classification\": 2, + \"legendLabel\": \"Low infection risk\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC00;\" + }, + { + \"classification\": 3, + \"legendLabel\": \"Medium infection risk\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC99;\" + }, + { + \"classification\": 4, + \"legendLabel\": \"High infection risk\", + \"legendIconCSS\": \"width: 25px; background-color: #FF0000;\" + } + ] + } + " + + "wms_abstract.nb" " + { + \"isWarningStatus\": true, + \"legendItems\": [ + { + \"classification\": 0, + \"legendLabel\": \"Ingen infeksjonsrisiko\", + \"legendIconCSS\": \"width: 25px; background-color: #707070;\" + }, + { + \"classification\": 2, + \"legendLabel\": \"Lav infeksjonsrisiko\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC00;\" + }, + { + \"classification\": 3, + \"legendLabel\": \"Middels infeksjonsrisiko\", + \"legendIconCSS\": \"width: 25px; background-color: #FFCC99;\" + }, + { + \"classification\": 4, + \"legendLabel\": \"Høy infeksjonsrisiko\", + \"legendIconCSS\": \"width: 25px; background-color: #FF0000;\" + } + ] + } + " + + END END ``` +The Json schema for the legend is as follows: (TODO: place on a URI) +```json +{ + "title": "Layer legend", + "type": "object", + "required": [ + "legendItems" + ], + "properties": { + "isWarningStatus": { + "type": "boolean", + "title": "Legend type is warning status?", + "default": false + }, + "legendItems": { + "type": "array", + "title": "Legend items", + "description": "The lengend items in their preferred order", + "items": { + "required": [ + "legendLabel" + ], + "type": "object", + "title": "Legend item", + "properties": { + "classification": { + "type": "number", + "title": "Classification" + }, + "legendLabel": { + "type": "string", + "title": "Legend label" + }, + "legendIconCSS": { + "type": "string", + "title": "Legend icon CSS" + } + } + } + } + } +} +``` + +Use this schema e.g. in [Json-editor](https://json-editor.github.io/json-editor/) and create the legend without coding. Remember to escape all double quotes before adding it to a mapfile. + The client must then check if the layer abstract exists in the requested language. If not, default to the auto generated legend. For example like this (using OpenLayers): ```javascript // See if there is a language specific legend available if(currentLayer.Abstract != undefined) { - document.getElementById("layerLegend").innerHTML=currentLayer.Abstract; + // You need to generate and return HTML from the Json in the getLegendHTML function + document.getElementById("layerLegend").innerHTML=getLegendHTML(currentLayer.Abstract); } else // Fallback to auto generated legend {