@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | $Common = new Common(); |
10 | 10 | |
11 | 11 | if (isset($_GET['download'])) { |
12 | - if ($_GET['download'] == "true") |
|
13 | - { |
|
12 | + if ($_GET['download'] == "true") |
|
13 | + { |
|
14 | 14 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
15 | - } |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | header('Content-Type: text/javascript'); |
18 | 18 | |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | $polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
21 | 21 | $output = ''; |
22 | 22 | if (!empty($polar)) { |
23 | - $output = '{"type": "FeatureCollection","features": ['; |
|
23 | + $output = '{"type": "FeatureCollection","features": ['; |
|
24 | 24 | |
25 | - foreach($polar as $eachpolar) { |
|
25 | + foreach($polar as $eachpolar) { |
|
26 | 26 | $data = json_decode($eachpolar['source_data']); |
27 | 27 | $name = $eachpolar['source_name']; |
28 | 28 | $coord = $Location->getLocationInfobySourceName($name); |
29 | - $output .= '{"type": "Feature","properties": {"name": "'.$name.'","style": {"color": "#D3FFCF", "opacity": 0.5}},"geometry": {"type": "Polygon","coordinates": [['; |
|
29 | + $output .= '{"type": "Feature","properties": {"name": "'.$name.'","style": {"color": "#D3FFCF", "opacity": 0.5}},"geometry": {"type": "Polygon","coordinates": [['; |
|
30 | 30 | if (isset($coord[0]['latitude'])) { |
31 | 31 | $initial_latitude = $coord[0]['latitude']; |
32 | 32 | $initial_longitude = $coord[0]['longitude']; |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | //$output = substr($output, 0, -1); |
44 | 44 | $output .= $first; |
45 | 45 | $output .= ']]}},'; |
46 | - } |
|
47 | - $output = substr($output, 0, -1); |
|
48 | - $output .= ']}'; |
|
46 | + } |
|
47 | + $output = substr($output, 0, -1); |
|
48 | + $output .= ']}'; |
|
49 | 49 | } |
50 | 50 | print $output; |
51 | 51 |