Skip to content

Commit

Permalink
Change color of FLOOD WARNINGs
Browse files Browse the repository at this point in the history
  • Loading branch information
BusyBird15 authored Mar 27, 2024
1 parent 407c7f2 commit 60ffe31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions radar.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ <h3>BusyBird15's National Weather Radar v1.1</h3>
<h2 style="padding-left: 5px; text-align: center; color: white; padding-top: 10px;">Legend</h2>
<p style="padding-left: 5px; color: red; margin: 4px;"><b>RED: </b>Tornado Warning</p>
<p style="padding-left: 5px; color: rgb(236, 193, 0); margin: 4px;"><b>YELLLOW: </b>Severe Thunderstorm Warning</p>
<p style="padding-left: 5px; color: #FF0284; margin: 4px;"><b>MAGENTA: </b>Flood Warning</p>
<p style="padding-left: 5px; color: magenta; margin: 4px;"><b>MAGENTA: </b>Flood Warning</p>
<p style="padding-left: 5px; color: green; margin: 4px;"><b>GREEN: </b>Flash Flood Warning</p>
<p style="padding-left: 5px; color: blue; margin: 4px;"><b>BLUE: </b>Special Weather Statement</p>
<p style="padding-left: 5px; color: orange; margin: 4px;"><b>ORANGE: </b>Other</p>
Expand Down Expand Up @@ -256,7 +256,7 @@ <h3 id="alert_title" style="padding-left: 5px; margin: 4px; ">Unknown alert</h3>
} else if (alertInfo.properties.event.includes("Flash Flood")){
alertTitle.style.color = "green";
} else if (alertInfo.properties.event.includes("Flood")){
alertTitle.style.color = "#FF0284";
alertTitle.style.color = "magenta";
} else if (alertInfo.properties.event.includes("Special Weather")){
alertTitle.style.color = "blue";
} else {
Expand Down Expand Up @@ -377,7 +377,7 @@ <h3 id="alert_title" style="padding-left: 5px; margin: 4px; ">Unknown alert</h3>
getAlert(e.target.getLatLngs());
});
} else if (alert.properties.event.includes("Flood")){
var polygon = L.polygon(reverseSubarrays(thisItem), {color: '#FF0284'}).addTo(map);
var polygon = L.polygon(reverseSubarrays(thisItem), {color: 'magenta'}).addTo(map);
polygon.setStyle({fillOpacity: 0.4});
var thisAlert = [];
thisAlert.push(polygon.getLatLngs().join())
Expand All @@ -386,7 +386,7 @@ <h3 id="alert_title" style="padding-left: 5px; margin: 4px; ">Unknown alert</h3>
polygon.on('mouseover', function (e) {
polygon.setStyle({ color: 'orange', fillOpacity: 0.7 });
}); polygon.on('mouseout', function (e) {
polygon.setStyle({ color: '#FF0284', fillOpacity: 0.4 });
polygon.setStyle({ color: 'magenta', fillOpacity: 0.4 });
}); polygon.on('click', function (e) {
document.getElementById("alertDeets").style.visibility = "hidden";
getAlert(e.target.getLatLngs());
Expand Down

0 comments on commit 60ffe31

Please sign in to comment.