@@ -44,6 +44,7 @@ var modeList = [
4444// "Position",
4545 "1 hour" ,
4646 "6 hours" ,
47+ "12 hours" ,
4748 "1 day" ,
4849 "3 days" ,
4950 "All" ,
@@ -1684,10 +1685,13 @@ function addPosition(position) {
16841685 } ;
16851686 } else {
16861687 vehicle . marker . shadow . setVisible ( true ) ;
1687- vehicle . horizon_circle . setVisible ( true ) ;
1688- vehicle . horizon_circle . label . set ( 'visible' , true ) ;
1689- vehicle . subhorizon_circle . setVisible ( true ) ;
1690- vehicle . subhorizon_circle . label . set ( 'visible' , true ) ;
1688+
1689+ if ( offline . get ( 'opt_hide_horizon' ) == false ) {
1690+ vehicle . horizon_circle . setVisible ( true ) ;
1691+ vehicle . horizon_circle . label . set ( 'visible' , true ) ;
1692+ vehicle . subhorizon_circle . setVisible ( true ) ;
1693+ vehicle . subhorizon_circle . label . set ( 'visible' , true ) ;
1694+ }
16911695
16921696 if ( mode == "parachute" ) {
16931697 img = {
@@ -1713,7 +1717,6 @@ function addPosition(position) {
17131717 } ;
17141718
17151719 // Add landing marker if the payload provides a predicted landing position.
1716- // TODO: Only create this if the lat/lon are not zero.
17171720 if ( position . data . hasOwnProperty ( 'pred_lat' ) && position . data . hasOwnProperty ( 'pred_lon' ) ) {
17181721 // Only create the marker if the pred lat/lon are not zero (as will be the case during ascent).
17191722 if ( ( position . data . pred_lat !== 0.0 ) && ( position . data . pred_lon !== 0.0 ) ) {
@@ -1820,6 +1823,13 @@ function addPosition(position) {
18201823 google . maps . event . addListener ( subhorizon_circle , 'center_changed' , refresh_func ) ;
18211824 google . maps . event . addListener ( subhorizon_circle , 'radius_changed' , refresh_func ) ;
18221825
1826+ if ( offline . get ( "opt_hide_horizon" ) ) {
1827+ horizon_circle . setVisible ( false ) ;
1828+ horizon_circle . label . set ( 'visible' , false ) ;
1829+ subhorizon_circle . setVisible ( false ) ;
1830+ subhorizon_circle . label . set ( 'visible' , false ) ;
1831+ }
1832+
18231833 marker . setAltitude ( 0 ) ;
18241834 polyline_visible = true ;
18251835 polyline = [
@@ -2808,6 +2818,28 @@ function refreshUI() {
28082818 if ( follow_vehicle !== null ) update_lookangles ( follow_vehicle ) ;
28092819}
28102820
2821+
2822+ function hideHorizonRings ( ) {
2823+ for ( var vcallsign in vehicles ) {
2824+ if ( vehicles [ vcallsign ] . vehicle_type == "balloon" ) {
2825+ vehicles [ vcallsign ] . horizon_circle . setVisible ( false ) ;
2826+ vehicles [ vcallsign ] . horizon_circle . label . set ( 'visible' , false ) ;
2827+ vehicles [ vcallsign ] . subhorizon_circle . setVisible ( false ) ;
2828+ vehicles [ vcallsign ] . subhorizon_circle . label . set ( 'visible' , false ) ;
2829+ }
2830+ }
2831+ }
2832+ function showHorizonRings ( ) {
2833+ for ( var vcallsign in vehicles ) {
2834+ if ( vehicles [ vcallsign ] . vehicle_type == "balloon" ) {
2835+ vehicles [ vcallsign ] . horizon_circle . setVisible ( true ) ;
2836+ vehicles [ vcallsign ] . horizon_circle . label . set ( 'visible' , true ) ;
2837+ vehicles [ vcallsign ] . subhorizon_circle . setVisible ( true ) ;
2838+ vehicles [ vcallsign ] . subhorizon_circle . label . set ( 'visible' , true ) ;
2839+ }
2840+ }
2841+ }
2842+
28112843var ssdv = { } ;
28122844var status = "" ;
28132845var bs_idx = 0 ;
0 commit comments