| @@ -17,10 +17,10 @@ discard block | ||
| 17 | 17 |  header('Content-Type: text/javascript'); | 
| 18 | 18 | |
| 19 | 19 | |
| 20 | -$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); | |
| 20 | +$polar = $Stats->getStatsSource(date('Y-m-d'), 'polar'); | |
| 21 | 21 |  $output = '{"type": "FeatureCollection","features": ['; | 
| 22 | 22 |  if (!empty($polar)) { | 
| 23 | -	foreach($polar as $eachpolar) { | |
| 23 | +	foreach ($polar as $eachpolar) { | |
| 24 | 24 | $data = json_decode($eachpolar['source_data']); | 
| 25 | 25 | $name = $eachpolar['source_name']; | 
| 26 | 26 | $coord = $Location->getLocationInfobySourceName($name); | 
| @@ -33,15 +33,15 @@ discard block | ||
| 33 | 33 | $initial_longitude = $globalCenterLongitude; | 
| 34 | 34 | } | 
| 35 | 35 | $first = ''; | 
| 36 | -		foreach($data as $value => $key) { | |
| 37 | - $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key); | |
| 38 | - if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; | |
| 36 | +		foreach ($data as $value => $key) { | |
| 37 | + $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude, $initial_longitude, $value*22.5, $key); | |
| 38 | + if ($first == '') $first = '['.round($final_coord['longitude'], 5).','.round($final_coord['latitude'], 5).']'; | |
| 39 | 39 | $output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],'; | 
| 40 | 40 | } | 
| 41 | 41 | $output .= $first; | 
| 42 | 42 | $output .= ']]}},'; | 
| 43 | 43 | } | 
| 44 | - $output = substr($output, 0, -1); | |
| 44 | + $output = substr($output, 0, -1); | |
| 45 | 45 | } | 
| 46 | 46 | $output .= ']}'; | 
| 47 | 47 | print $output; | 
| @@ -35,7 +35,9 @@ | ||
| 35 | 35 | $first = ''; | 
| 36 | 36 |  		foreach($data as $value => $key) { | 
| 37 | 37 | $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key); | 
| 38 | - if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; | |
| 38 | +			if ($first == '') { | |
| 39 | + $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; | |
| 40 | + } | |
| 39 | 41 | $output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],'; | 
| 40 | 42 | } | 
| 41 | 43 | $output .= $first; |