Skip to content

Commit

Permalink
Working on wildfire
Browse files Browse the repository at this point in the history
  • Loading branch information
Harold Garbeil authored and Harold Garbeil committed Jun 1, 2024
1 parent 5bae26b commit c8f1155
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fire_perim.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fetch (fireurl).then(res=>res.json())

onEachFeature: function (f, l) {
l.bindPopup('<pre>'+f.properties.poly_IncidentName+'<br>'+
f.properties.poly_GISAcres+' Acres<br>'+
f.properties.attr_IncidentSize+' Acres<br>'+
f.properties.attr_FireBehaviorGeneral+'</pre>');
}

Expand Down
21 changes: 15 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,35 @@ <h3>Earthquake Parameters</h3>
</form>
</div>
<div class="eventtype">
<h3>Volcano Parameters</h3>
<h3>Volcano Alert Level</h3>
<form id="volc_event_type">
<div>
<!-- <div>
<input type="checkbox" id="volc_all_cb" name="volc_all" checked />
<label for="volc_cb_all">All</label>
</div>
</div> -->
<div>
<input type="checkbox" id="volc_green_cb" name="volc_green" />
<input type="checkbox" id="volc_green_cb" name="volc_green" checked />
<label for="volc_green">Green</label>
</div>
<div>
<input type="checkbox" id="volc_yellow_cb" name="volc_yellow" />
<input type="checkbox" id="volc_yellow_cb" name="volc_yellow" checked />
<label for="volc_yellow">Yellow</label>
</div>
<div>
<input type="checkbox" id="volc_red_cb" name="volc_red" />
<input type="checkbox" id="volc_red_cb" name="volc_red" checked/>
<label for="volc_red">Red</label>
</div>
</form>
</div>
<div class="eventtype">
<h3>Current Wildfire Parameters</h3>
<form id="myForm1" class="form">
<label for="minAcre">Minimum Acreage (0 - 100000): </label>
<input type="number" id="acreField" name="minAcre" value="1000">
<div></div>
<input type="button" onclick="updateFires()" value="Update Fires">
</form>
</div>


</div>
Expand Down
14 changes: 7 additions & 7 deletions volcano.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const volc_all_cb = document.getElementById ('volc_all_cb');
// const volc_all_cb = document.getElementById ('volc_all_cb');
const volc_green_cb = document.getElementById('volc_green_cb') ;
const volc_yellow_cb = document.getElementById('volc_yellow_cb') ;
const volc_red_cb = document.getElementById('volc_red_cb') ;
Expand Down Expand Up @@ -57,7 +57,7 @@ function getFlags(){
green_flag = volc_green_cb.checked ;
yellow_flag = volc_yellow_cb.checked ;
red_flag = volc_red_cb.checked ;
all_flag = volc_all_cb.checked ;
// all_flag = volc_all_cb.checked ;

}

Expand Down Expand Up @@ -85,11 +85,11 @@ fetch ('https://volcanoes.usgs.gov/vsc/api/volcanoApi/vhpstatus').then(res=>res.
for (var i in volcdata){
let volc = volcdata[i];
//console.log(volcdata[i]);
if (volcdata[i].alertLevel!='UNASSIGNED' && all_flag) {
markerOptions.icon= volcBlkIcon ;
marker = L.marker([volc.lat,volc.long],markerOptions);
addMarker(volc,marker);
}
// if (volcdata[i].alertLevel!='UNASSIGNED' && all_flag) {
// markerOptions.icon= volcBlkIcon ;
// marker = L.marker([volc.lat,volc.long],markerOptions);
// addMarker(volc,marker);
// }
if (volc.colorCode=='GREEN' && green_flag){
markerOptions.icon= volcGreenIcon ;
marker = L.marker([volc.lat,volc.long],markerOptions);
Expand Down

0 comments on commit c8f1155

Please sign in to comment.