@@ -275,7 +275,12 @@ discard block |
||
| 275 | 275 | <?php |
| 276 | 276 | } else { |
| 277 | 277 | ?> |
| 278 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
| 278 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
| 279 | + print $globalMapRefresh*2000; |
|
| 280 | +} else { |
|
| 281 | + print '60000'; |
|
| 282 | +} |
|
| 283 | +?>)) { |
|
| 279 | 284 | viewer.dataSources.get(dsn).entities.remove(entity); |
| 280 | 285 | czmlds.entities.removeById(entityid); |
| 281 | 286 | } |
@@ -564,7 +569,12 @@ discard block |
||
| 564 | 569 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
| 565 | 570 | ?> |
| 566 | 571 | update_polarLayer(); |
| 567 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 572 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 573 | + print $globalMapRefresh*1000*2; |
|
| 574 | +} else { |
|
| 575 | + print '60000'; |
|
| 576 | +} |
|
| 577 | +?>); |
|
| 568 | 578 | <?php |
| 569 | 579 | } |
| 570 | 580 | ?> |
@@ -695,7 +705,12 @@ discard block |
||
| 695 | 705 | } |
| 696 | 706 | } |
| 697 | 707 | } |
| 698 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
| 708 | + ,<?php if (isset($globalMapRefresh)) { |
|
| 709 | + print $globalMapRefresh*1000; |
|
| 710 | +} else { |
|
| 711 | + print '30000'; |
|
| 712 | +} |
|
| 713 | +?>); |
|
| 699 | 714 | } else { |
| 700 | 715 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
| 701 | 716 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -724,7 +739,12 @@ discard block |
||
| 724 | 739 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
| 725 | 740 | ?> |
| 726 | 741 | update_atcLayer(); |
| 727 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
| 742 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
| 743 | + print $globalMapRefresh*1000*2; |
|
| 744 | +} else { |
|
| 745 | + print '60000'; |
|
| 746 | +} |
|
| 747 | +?>); |
|
| 728 | 748 | <?php |
| 729 | 749 | } |
| 730 | 750 | ?> |