@@ -57,9 +57,10 @@ |
||
57 | 57 | |
58 | 58 | $result = $route->GetLastLocation($params); |
59 | 59 | |
60 | -if (isset($result->tracking_history)) |
|
61 | -foreach ($result->tracking_history as $history) { |
|
60 | +if (isset($result->tracking_history)) { |
|
61 | + foreach ($result->tracking_history as $history) { |
|
62 | 62 | echo "Speed --> ".$history['s']."<br>"; |
63 | +} |
|
63 | 64 | echo "course --> ".$history['d']."<br>"; |
64 | 65 | echo "Timestamp --> ".$history['ts_friendly']."<br>"; |
65 | 66 | echo "Latitude --> ".$history['lt']."<br>"; |
@@ -54,8 +54,7 @@ |
||
54 | 54 | if (is_string($value)) |
55 | 55 | { |
56 | 56 | echo $key." --> ".$value."<br>"; |
57 | - } |
|
58 | - else |
|
57 | + } else |
|
59 | 58 | { |
60 | 59 | echo "************ $key ************* <br>"; |
61 | 60 | Route4Me::simplePrint((array)$value, true); |
@@ -19,7 +19,8 @@ |
||
19 | 19 | |
20 | 20 | $fgResult = $fGeoCoding->forwardGeocoding($geocodingParameters); |
21 | 21 | |
22 | -if ($geocodingParameters['strExportFormat'] == 'json') |
|
22 | +if ($geocodingParameters['strExportFormat'] == 'json') { |
|
23 | 23 | Route4Me::simplePrint($fgResult); |
24 | -else |
|
24 | +} else { |
|
25 | 25 | Route4Me::simplePrint($fgResult['destination']); |
26 | +} |
@@ -24,7 +24,7 @@ |
||
24 | 24 | Route4Me::simplePrint($dest); |
25 | 25 | echo "<br>"; |
26 | 26 | } |
27 | -} else { |
|
27 | +} else { |
|
28 | 28 | foreach ($fgResult['destination'] as $dest) { |
29 | 29 | Route4Me::simplePrint($dest); |
30 | 30 | echo "<br>"; |
@@ -59,5 +59,7 @@ |
||
59 | 59 | echo "========== Notes ==================<br>"; |
60 | 60 | echo "note_id --> ".$note['note_id']."<br>"; |
61 | 61 | $content = isset($note['contents']) ? $note['contents'] : ""; |
62 | - if (strlen($content)>0) echo "contents --> $content"."<br>"; |
|
63 | -} |
|
62 | + if (strlen($content)>0) { |
|
63 | + echo "contents --> $content"."<br>"; |
|
64 | + } |
|
65 | + } |
@@ -24,8 +24,7 @@ |
||
24 | 24 | if (is_array($value)) |
25 | 25 | { |
26 | 26 | Route4Me::simplePrint($value); |
27 | - } |
|
28 | - else |
|
27 | + } else |
|
29 | 28 | { |
30 | 29 | echo "$key => $value <br>"; |
31 | 30 | } |
@@ -29,7 +29,10 @@ |
||
29 | 29 | |
30 | 30 | $count++; |
31 | 31 | |
32 | - if ($count>5) break; // prevent from the infinite cycle, if there are less than 2 routes. |
|
32 | + if ($count>5) { |
|
33 | + break; |
|
34 | + } |
|
35 | + // prevent from the infinite cycle, if there are less than 2 routes. |
|
33 | 36 | } |
34 | 37 | |
35 | 38 | echo "Route ID 1 -> $route_id1 <br> Route ID 2 -> $route_id2 <br>"; |
@@ -32,7 +32,9 @@ |
||
32 | 32 | foreach ($routeResults['addresses'] as $key => $address) { |
33 | 33 | $araddress = (array)$address; |
34 | 34 | |
35 | - if (isset($araddress['route_destination_id'])) echo "route_destination_id=".$araddress['route_destination_id']."<br>"; |
|
35 | + if (isset($araddress['route_destination_id'])) { |
|
36 | + echo "route_destination_id=".$araddress['route_destination_id']."<br>"; |
|
37 | + } |
|
36 | 38 | |
37 | 39 | if (isset($araddress['path_to_next'])) { |
38 | 40 | echo "path_to_next:<br>"; |
@@ -24,9 +24,13 @@ |
||
24 | 24 | { |
25 | 25 | $results = (array)$routeResult; |
26 | 26 | |
27 | - if (isset($results['route_id'])) echo "Route ID - > " . $results['route_id'] . "<br>"; |
|
27 | + if (isset($results['route_id'])) { |
|
28 | + echo "Route ID - > " . $results['route_id'] . "<br>"; |
|
29 | + } |
|
28 | 30 | |
29 | - if (isset($results['parameters']->route_name)) echo "Route name - > " . $results['parameters']->route_name . "<br>"; |
|
31 | + if (isset($results['parameters']->route_name)) { |
|
32 | + echo "Route name - > " . $results['parameters']->route_name . "<br>"; |
|
33 | + } |
|
30 | 34 | |
31 | 35 | echo "<br>"; |
32 | 36 | } |