diff --git a/js/tracker.js b/js/tracker.js index e01dec6..b401cb4 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -709,7 +709,6 @@ function launchSitePredictions(times, station, properties, marker) { } function handleError(error) { completed += 1; - console.log(error); if (completed == dates.length) { popupContent += ""; popup.setContent(popupContent); @@ -781,7 +780,8 @@ function plotPrediction (data, dates, marker) { }).addTo(map); var landingTime = new Date(landingPoint.datetime); - var landingTooltip = "Time: " + landingTime.toLocaleString(); + var landingTooltip = "Time: " + landingTime.toLocaleString() + "
Model Dataset: " + data.request.dataset + + "
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]}); } @@ -894,9 +894,34 @@ function showLaunchSites() { if (json[key].hasOwnProperty('burst_altitude')) { burst_altitude = json[key]["burst_altitude"]; } + popupContent += "
Launch schedule:"; + for (var x = 0; x < json[key]['times'].length; x++) { + popupContent += "
- "; + var day = json[key]['times'][x].split(":")[0]; + if (day == 0) { + popupContent += "Everyday at "; + } else if (day == 1) { + popupContent += "Monday at "; + } else if (day == 2) { + popupContent += "Tuesday at "; + } else if (day == 3) { + popupContent += "Wednesday at "; + } else if (day == 4) { + popupContent += "Thursday at "; + } else if (day == 5) { + popupContent += "Friday at "; + } else if (day == 6) { + popupContent += "Saturday at "; + } else if (day == 7) { + popupContent += "Sunday at "; + } + popupContent += json[key]['times'][x].split(":")[1] + ":" + json[key]['times'][x].split(":")[2] + " UTC"; + } + popupContent += "
Know when this site launches? Contribute here"; popupContent += "
"; } else { popupContent = "" + json[key].station_name + "

Sondes launched: " + sondes; + popupContent += "
Know when this site launches? Contribute here"; } popup.setContent(popupContent); }