From 9c5fa34ed5cde0df05513bdd75b231a771a16c05 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Tue, 22 Oct 2024 14:40:58 +0200 Subject: [PATCH] chore: Remove commented / obsolete code --- .../map_applications/phytophthora/js/map.js | 71 +------------------ 1 file changed, 2 insertions(+), 69 deletions(-) diff --git a/src/main/webapp/map_applications/phytophthora/js/map.js b/src/main/webapp/map_applications/phytophthora/js/map.js index c7aced84..8c1efa5f 100755 --- a/src/main/webapp/map_applications/phytophthora/js/map.js +++ b/src/main/webapp/map_applications/phytophthora/js/map.js @@ -117,14 +117,7 @@ async function initMap() { const color = feature.get("cropOrganism") != null && feature.get("cropOrganism")["latinName"] != null ? colors[feature.get("cropOrganism")["latinName"].toLowerCase()] : colors["plantae"]; - /* - if (feature.get("cropOrganism") != null && feature.get("cropOrganism")["latinName"] != null) { - retVal = styles[feature.get("cropOrganism")["latinName"].toLowerCase()]; - } else { - retVal = styles["plantae"]; - }*/ - //console.info(retVal[0].getImage().getStroke().getWidth()); - // If symptom has been registered, mark with inner black dot + retVal = [ new ol.style.Style({ @@ -146,67 +139,7 @@ async function initMap() { }) }) ]; - /* - if (observationData["funn"] == "[Ukjent]") { - retVal = [ - new ol.style.Style({ - image: new ol.style.Circle({ - fill: new ol.style.Fill({ color: [0, 0, 0, 1] }), - stroke: new ol.style.Stroke({ width: 8, color: retVal[0].getImage().getFill().getColor() }), - radius: iconRadius - }) - }) - ]; - } - else { - retVal = [ - new ol.style.Style({ - image: new ol.style.Circle({ - fill: new ol.style.Fill({ color: [0, 0, 0, 1] }), - stroke: new ol.style.Stroke({ width: 8, color: retVal[0].getImage().getFill().getColor() }), - radius: iconRadius - }), - text: new ol.style.Text({ - text: observationData["provenummer"], - fill: new ol.style.Fill({ - color: '#000' - }), - stroke: new ol.style.Stroke({ - color: '#fff', - width: 2 - }) - }) - }) - ]; - } - /* - , - text: new ol.style.Text({ - text: "23", - fill: new ol.style.Fill({ - color: '#000' - }), - stroke: new ol.style.Stroke({ - color: '#fff', - width: 2 - }) - })*/ - /*console.info(observationData["provenummer"]) - if (observationData["provenummer"] != null && observationData["provenummer"].trim() != "") { - retVal.push(new ol.style.Style({ - text: new ol.style.Text({ - text: observationData["provenummer"], - fill: new ol.style.Fill({ - color: '#000' - }), - stroke: new ol.style.Stroke({ - color: '#fff', - width: 2 - }) - }) - })) - }*/ - //console.info(retVal); + return retVal; } -- GitLab