diff --git a/img/markers/payload-recovery-planned.png b/img/markers/payload-recovery-planned.png new file mode 100644 index 0000000..e314714 Binary files /dev/null and b/img/markers/payload-recovery-planned.png differ diff --git a/js/sondehub.js b/js/sondehub.js index 6e2f0d2..6449673 100644 --- a/js/sondehub.js +++ b/js/sondehub.js @@ -4765,6 +4765,13 @@ function updateRecoveryMarker(recovery) { _recovery_icon = host_url + markers_url + "payload-not-recovered.png"; } + // Override icon if 'is planned' field exists and is true + if(recovery.hasOwnProperty('planned')){ + if(recovery.planned == true){ + _recovery_icon = host_url + markers_url + "payload-recovery-planned.png"; + } + } + recoveryIcon = new L.icon({ iconUrl: _recovery_icon, iconSize: [17, 19], diff --git a/js/station.js b/js/station.js index df1ce29..76da9fa 100644 --- a/js/station.js +++ b/js/station.js @@ -705,6 +705,7 @@ function launchSitePredictions(times, station, properties, marker, id) { } } +//VK6DI Changes function plotPrediction (data, dates, marker, properties) { if (!launchPredictions.hasOwnProperty(marker)) { launchPredictions[marker] = {}; @@ -768,15 +769,24 @@ function plotPrediction (data, dates, marker, properties) { icon: new L.NumberedDivIcon({number: dates.indexOf(data.request.launch_datetime)+1}) }).addTo(map); + var coords_text = format_coordinates(landingPoint.latitude, landingLongitude, "Prediction"); + var landingTime = new Date(landingPoint.datetime); if (properties[3] != "" && properties[4] != "") { var landingTooltip = "Time: " + landingTime.toLocaleString() + "
Model Dataset: " + data.request.dataset + + "
Prediction: " + coords_text + "
Model Assumptions:
- " + data.request.ascent_rate + "m/s ascent
- " + data.request.burst_altitude + "m burst altitude (" + properties[3] + " samples)
- " + data.request.descent_rate + "m/s descent (" + properties[4] + " samples)"; } else { var landingTooltip = "Time: " + landingTime.toLocaleString() + "
Model Dataset: " + data.request.dataset + + "
Prediction:" + coords_text + "
Model Assumptions:
- " + data.request.ascent_rate + "m/s ascent
- " + data.request.burst_altitude + "m burst altitude
- " + data.request.descent_rate + "m/s descent"; } - plot.landingMarker.bindTooltip(landingTooltip, {offset: [13,-28]}); + + plot.landingMarker.bindPopup(landingTooltip, { autoClose: false, closeOnClick: false }) + .on('click', function (e) { + this.openPopup(); + }); + } function showPrediction(url) {