Skip to content

Commit

Permalink
popup added to hotspot
Browse files Browse the repository at this point in the history
  • Loading branch information
Harold Garbeil authored and Harold Garbeil committed Jun 7, 2024
1 parent 7545465 commit 8b4a558
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions firms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const confTE = document.getElementById('confField');
let latval ;
let lonval ;
let confval ;
let brighttemp ;
let acqtime ;


function get_firms_hotspots(minConf) {
Expand All @@ -13,21 +15,29 @@ $ajaxUtils.sendGetRequest (firms_url, function(responseText){
console.log(lines[0]);
let line0 = lines[0] ;
for (i in lines){

if (i == 0 || lines[i].length<10) {
continue ;
}
let cols = lines[i].split(',');


latval = cols[0];
lonval = cols[1];
brighttemp = cols[2];
confval = cols[8];
if (confval < minConf){
continue ;
}
acqtime = cols[5]+' '+cols[6]+" UTM";
let outstring = `${acqtime}<br>Lat: ${latval} , Lon: ${lonval}<br>Confidence : ${confval}<br>Brightness: ${brighttemp}` ;

// "latval+" , "+lonval+"<br>"+qdate+"<br>"+qplace+"<br>"+"<a target='_blank' href="+qlink+">Website</href>";
let marker = L.circleMarker([latval,lonval],{
radius:1,
color:"#930",
}) ;
marker.bindPopup (outstring);
marker.addTo(map);
firms_marks.push(marker);

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ body{
border-width:5px ;
border-color:white;
border-style: ridge;
padding:5px ;
padding:15px ;
background-color: tan;
}

Expand Down

0 comments on commit 8b4a558

Please sign in to comment.