draw route when you click on a flight

This commit is contained in:
Nabeel Shahzad
2017-12-28 14:59:42 -06:00
parent 9d92d8af55
commit 5a6bc1a7ba
2 changed files with 61 additions and 13 deletions

View File

@@ -184,11 +184,12 @@ class GeoService extends BaseService
$route_line[] = [$point->lon, $point->lat];
$route_points[] = new Feature(
new Point([$point->lon, $point->lat]), [
'name' => $point->altitude,
'popup' => $counter . '<br />GS: ' . $point->gs . '<br />Alt: ' . $point->altitude,
]);
'pirep_id' => $pirep->id,
'name' => $point->altitude,
'popup' => $counter . '<br />GS: ' . $point->gs . '<br />Alt: ' . $point->altitude,
]);
$counter += 1;
++$counter;
}
# Arrival
$route_line[] = [$pirep->arr_airport->lon, $pirep->arr_airport->lat];
@@ -222,7 +223,7 @@ class GeoService extends BaseService
'gs' => $point->gs,
'alt' => $point->altitude,
'heading' => $point->heading ?: 0,
'popup' => 'Flight: ' . $pirep->ident,
'popup' => $pirep->ident . '<br />GS: ' . $point->gs . '<br />Alt: ' . $point->altitude,
]);
}