@@ -709,7 +709,6 @@ function launchSitePredictions(times, station, properties, marker) {
709709 }
710710 function handleError ( error ) {
711711 completed += 1 ;
712- console . log ( error ) ;
713712 if ( completed == dates . length ) {
714713 popupContent += "<button onclick='deletePredictions(" + marker + ")' style='margin-bottom:0;'>Delete</button>" ;
715714 popup . setContent ( popupContent ) ;
@@ -781,7 +780,8 @@ function plotPrediction (data, dates, marker) {
781780 } ) . addTo ( map ) ;
782781
783782 var landingTime = new Date ( landingPoint . datetime ) ;
784- var landingTooltip = "<b>Time: </b>" + landingTime . toLocaleString ( ) ;
783+ var landingTooltip = "<b>Time:</b> " + landingTime . toLocaleString ( ) + "<br><b>Model Dataset:</b> " + data . request . dataset +
784+ "<br><b>Model Assumptions:</b><br>- " + data . request . ascent_rate + "m/s ascent<br>- " + data . request . burst_altitude + "m burst altitude<br>- " + data . request . descent_rate + "m/s descent" ;
785785 plot . landingMarker . bindTooltip ( landingTooltip , { offset : [ 13 , - 28 ] } ) ;
786786}
787787
@@ -894,9 +894,34 @@ function showLaunchSites() {
894894 if ( json [ key ] . hasOwnProperty ( 'burst_altitude' ) ) {
895895 burst_altitude = json [ key ] [ "burst_altitude" ] ;
896896 }
897+ popupContent += "<br><b>Launch schedule:</b>" ;
898+ for ( var x = 0 ; x < json [ key ] [ 'times' ] . length ; x ++ ) {
899+ popupContent += "<br>- " ;
900+ var day = json [ key ] [ 'times' ] [ x ] . split ( ":" ) [ 0 ] ;
901+ if ( day == 0 ) {
902+ popupContent += "Everyday at " ;
903+ } else if ( day == 1 ) {
904+ popupContent += "Monday at " ;
905+ } else if ( day == 2 ) {
906+ popupContent += "Tuesday at " ;
907+ } else if ( day == 3 ) {
908+ popupContent += "Wednesday at " ;
909+ } else if ( day == 4 ) {
910+ popupContent += "Thursday at " ;
911+ } else if ( day == 5 ) {
912+ popupContent += "Friday at " ;
913+ } else if ( day == 6 ) {
914+ popupContent += "Saturday at " ;
915+ } else if ( day == 7 ) {
916+ popupContent += "Sunday at " ;
917+ }
918+ popupContent += json [ key ] [ 'times' ] [ x ] . split ( ":" ) [ 1 ] + ":" + json [ key ] [ 'times' ] [ x ] . split ( ":" ) [ 2 ] + " UTC" ;
919+ }
920+ popupContent += "<br><b>Know when this site launches?</b> Contribute <a href='https://github.com/projecthorus/sondehub-tracker/issues/114' target='_blank'>here</a>" ;
897921 popupContent += "<br><button onclick='launchSitePredictions(\"" + json [ key ] [ 'times' ] . toString ( ) + "\", \"" + latlon . toString ( ) + "\", \"" + ascent_rate + ":" + descent_rate + ":" + burst_altitude + "\", \"" + launches . getLayerId ( marker ) + "\")' style='margin-bottom:0;'>Generate Predictions</button>" ;
898922 } else {
899923 popupContent = "<font style='font-size: 13px'>" + json [ key ] . station_name + "</font><br><br><b>Sondes launched:</b> " + sondes ;
924+ popupContent += "<br><b>Know when this site launches?</b> Contribute <a href='https://github.com/projecthorus/sondehub-tracker/issues/114' target='_blank'>here</a>" ;
900925 }
901926 popup . setContent ( popupContent ) ;
902927 }
0 commit comments