Completed
Push — master ( 0d46aa...9d1f31 )
by Yannick
28:02
created
location-geojson.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,43 +12,43 @@  discard block
 block discarded – undo
12 12
 if (!isset($globalDemo)) {
13 13
 	if (isset($_GET['coord'])) 
14 14
 	{
15
-		$coords = explode(',',$_GET['coord']);
15
+		$coords = explode(',', $_GET['coord']);
16 16
 		if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
17 17
 		    || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) {
18 18
 			//$spotter_array = $Source->getAllLocationInfo();
19
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs'));
19
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs'));
20 20
 		}
21 21
 		if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
22 22
 		    || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) {
23
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx'));
23
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx'));
24 24
 		}
25 25
 		if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
26 26
 		    || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) {
27
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning'));
27
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning'));
28 28
 		}
29
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType(''));
29
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType(''));
30 30
 	} else {
31 31
 		if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
32 32
 		    || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) {
33 33
 			//$spotter_array = $Source->getAllLocationInfo();
34
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs'));
34
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs'));
35 35
 		}
36 36
 		if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
37 37
 		    || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) {
38
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx'));
38
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx'));
39 39
 		}
40 40
 		if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
41 41
 		    || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) {
42
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning'));
42
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning'));
43 43
 		}
44
-		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType(''));
44
+		$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType(''));
45 45
 	}
46 46
 }
47 47
 
48 48
 $output = '{"type": "FeatureCollection","features": [';
49 49
 if (!empty($spotter_array) && count($spotter_array) > 0)
50 50
 {
51
-	foreach($spotter_array as $spotter_item)
51
+	foreach ($spotter_array as $spotter_item)
52 52
 	{
53 53
 		date_default_timezone_set('UTC');
54 54
 		//waypoint plotting
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 			$output .= '"icon": "'.$globalURL.'/images/'.$spotter_item['logo'].'",';
68 68
 			$output .= '"type": "'.$spotter_item['type'].'",';
69 69
 			if ($spotter_item['type'] == 'wx') {
70
-				$weather = json_decode($spotter_item['description'],true);
71
-				if (isset($weather['temp'])) $output.= '"temp": "'.$weather['temp'].'",';
70
+				$weather = json_decode($spotter_item['description'], true);
71
+				if (isset($weather['temp'])) $output .= '"temp": "'.$weather['temp'].'",';
72 72
 			}
73 73
 			$output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"';
74 74
 		    $output .= '},';
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		    $output .= '}';
81 81
 		$output .= '},';
82 82
 	}
83
-	$output  = substr($output, 0, -1);
83
+	$output = substr($output, 0, -1);
84 84
 }
85 85
 $output .= ']}';
86 86
 
Please login to merge, or discard this patch.