Add flight route map; algorithm for picking from multiple nav points; some tests
This commit is contained in:
@@ -25,6 +25,7 @@ class CreateNavdataTables extends Migration
|
|||||||
$table->float('lon', 7, 4)->default(0.0);
|
$table->float('lon', 7, 4)->default(0.0);
|
||||||
$table->string('freq', 7)->nullable();
|
$table->string('freq', 7)->nullable();
|
||||||
|
|
||||||
|
$table->primary(['id', 'name']);
|
||||||
$table->index('id');
|
$table->index('id');
|
||||||
$table->index('name');
|
$table->index('name');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,13 +13,9 @@ class CreateAcarsTables extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* See for defs, modify/update based on this
|
|
||||||
* https://github.com/skiselkov/openfmc/blob/master/airac.h
|
|
||||||
*/
|
|
||||||
Schema::create('acars', function (Blueprint $table) {
|
Schema::create('acars', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('acars_id', 12);
|
$table->string('pirep_id', 12);
|
||||||
$table->string('name', 10)->nullable();
|
$table->string('name', 10)->nullable();
|
||||||
$table->float('lat', 7, 4)->default(0.0);
|
$table->float('lat', 7, 4)->default(0.0);
|
||||||
$table->float('lon', 7, 4)->default(0.0);
|
$table->float('lon', 7, 4)->default(0.0);
|
||||||
@@ -29,8 +25,8 @@ class CreateAcarsTables extends Migration
|
|||||||
# polymorphic relation columns.
|
# polymorphic relation columns.
|
||||||
# parent_type can be flight, pirep or acars
|
# parent_type can be flight, pirep or acars
|
||||||
# once
|
# once
|
||||||
$table->unsignedBigInteger('parent_id');
|
#$table->unsignedBigInteger('parent_id');
|
||||||
$table->string('parent_type');
|
#$table->string('parent_type');
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ flights:
|
|||||||
flight_number: 100
|
flight_number: 100
|
||||||
dpt_airport_id: KAUS
|
dpt_airport_id: KAUS
|
||||||
arr_airport_id: KJFK
|
arr_airport_id: KJFK
|
||||||
route: KAUS KJFK
|
route: KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK
|
||||||
dpt_time: 6PM CST
|
dpt_time: 6PM CST
|
||||||
arr_time: 11PM EST
|
arr_time: 11PM EST
|
||||||
- id: flightid_2
|
- id: flightid_2
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Frontend;
|
|||||||
|
|
||||||
use App\Repositories\AirlineRepository;
|
use App\Repositories\AirlineRepository;
|
||||||
use App\Repositories\AirportRepository;
|
use App\Repositories\AirportRepository;
|
||||||
|
use App\Services\GeoService;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -19,16 +20,21 @@ use Prettus\Repository\Exceptions\RepositoryException;
|
|||||||
|
|
||||||
class FlightController extends AppBaseController
|
class FlightController extends AppBaseController
|
||||||
{
|
{
|
||||||
private $airlineRepo, $airportRepo, $flightRepo;
|
private $airlineRepo,
|
||||||
|
$airportRepo,
|
||||||
|
$flightRepo,
|
||||||
|
$geoSvc;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
AirlineRepository $airlineRepo,
|
AirlineRepository $airlineRepo,
|
||||||
AirportRepository $airportRepo,
|
AirportRepository $airportRepo,
|
||||||
FlightRepository $flightRepo
|
FlightRepository $flightRepo,
|
||||||
|
GeoService $geoSvc
|
||||||
) {
|
) {
|
||||||
$this->airlineRepo = $airlineRepo;
|
$this->airlineRepo = $airlineRepo;
|
||||||
$this->airportRepo = $airportRepo;
|
$this->airportRepo = $airportRepo;
|
||||||
$this->flightRepo = $flightRepo;
|
$this->flightRepo = $flightRepo;
|
||||||
|
$this->geoSvc = $geoSvc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
@@ -110,13 +116,22 @@ class FlightController extends AppBaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update()
|
/**
|
||||||
{
|
* Show the flight information page
|
||||||
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
|
$flight = $this->flightRepo->find($id);
|
||||||
|
if (empty($flight)) {
|
||||||
|
Flash::error('Flight not found!');
|
||||||
|
return redirect(route('frontend.dashboard.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$coords = $this->geoSvc->flightGeoJson($flight);
|
||||||
|
|
||||||
|
return $this->view('flights.show', [
|
||||||
|
'flight' => $flight,
|
||||||
|
'coords' => $coords,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class PirepController extends Controller
|
|||||||
return redirect(route('frontend.pirep.index'));
|
return redirect(route('frontend.pirep.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$coords = $this->geoSvc->getRouteCoordsGeoJSON($pirep);
|
$coords = $this->geoSvc->pirepGeoJson($pirep);
|
||||||
|
|
||||||
return $this->view('pireps.show', [
|
return $this->view('pireps.show', [
|
||||||
'pirep' => $pirep,
|
'pirep' => $pirep,
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ class Airport extends Model
|
|||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
'lat' => 'float',
|
||||||
|
'lon' => 'float',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -61,11 +61,15 @@ class Flight extends Model
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the flight ident, e.,g JBU1900
|
* Get the flight ident, e.,g JBU1900
|
||||||
* @param $value
|
|
||||||
*/
|
*/
|
||||||
public function getIdentAttribute()
|
public function getIdentAttribute()
|
||||||
{
|
{
|
||||||
|
$flight_id = $this->airline->code;
|
||||||
|
$flight_id .= $this->flight_number;
|
||||||
|
|
||||||
|
# TODO: Add in code/leg if set
|
||||||
|
|
||||||
|
return $flight_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ class Navdata extends Model
|
|||||||
];
|
];
|
||||||
|
|
||||||
public $casts = [
|
public $casts = [
|
||||||
'id' => 'string',
|
'id' => 'string',
|
||||||
'type' => 'integer',
|
'type' => 'integer',
|
||||||
|
'lat' => 'float',
|
||||||
|
'lon' => 'float',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories;
|
||||||
|
|
||||||
|
use App\Models\Navdata;
|
||||||
|
use App\Repositories\Traits\CacheableRepository;
|
||||||
|
use Prettus\Repository\Contracts\CacheableInterface;
|
||||||
|
|
||||||
|
class NavdataRepository extends BaseRepository implements CacheableInterface
|
||||||
|
{
|
||||||
|
use CacheableRepository;
|
||||||
|
|
||||||
|
// Super short lived cache for when the navdata stuff is re-imported
|
||||||
|
protected $cacheMinutes = 5;
|
||||||
|
|
||||||
|
public function model()
|
||||||
|
{
|
||||||
|
return Navdata::class;
|
||||||
|
}
|
||||||
|
}
|
||||||
+172
-17
@@ -2,45 +2,200 @@
|
|||||||
|
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
|
use Log;
|
||||||
//use \League\Geotools\Geotools;
|
//use \League\Geotools\Geotools;
|
||||||
|
use App\Models\Flight;
|
||||||
|
use App\Repositories\NavdataRepository;
|
||||||
use \GeoJson\Geometry\LineString;
|
use \GeoJson\Geometry\LineString;
|
||||||
use \GeoJson\Feature\Feature;
|
use \GeoJson\Feature\Feature;
|
||||||
use \GeoJson\Feature\FeatureCollection;
|
use \GeoJson\Feature\FeatureCollection;
|
||||||
|
|
||||||
|
use League\Flysystem\Exception;
|
||||||
use \League\Geotools\Geotools;
|
use \League\Geotools\Geotools;
|
||||||
use \League\Geotools\Coordinate\Coordinate;
|
use \League\Geotools\Coordinate\Coordinate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all of the coordinates, start to finish
|
||||||
|
* Returned in the GeoJSON format
|
||||||
|
* https://tools.ietf.org/html/rfc7946
|
||||||
|
*
|
||||||
|
* TODO: Save this data:
|
||||||
|
* Once a PIREP is accepted, save this returned structure as a
|
||||||
|
* JSON-encoded string into the raw_data field of the PIREP row
|
||||||
|
*
|
||||||
|
*/
|
||||||
class GeoService extends BaseService
|
class GeoService extends BaseService
|
||||||
{
|
{
|
||||||
|
private $navRepo;
|
||||||
|
|
||||||
|
public function __construct(NavdataRepository $navRepo)
|
||||||
|
{
|
||||||
|
$this->navRepo = $navRepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getClosestCoords($coordStart, $all_coords, $measure='flat')
|
||||||
|
{
|
||||||
|
$distance = [];
|
||||||
|
$geotools = new Geotools();
|
||||||
|
$start = new Coordinate($coordStart);
|
||||||
|
|
||||||
|
foreach($all_coords as $coords) {
|
||||||
|
$coord = new Coordinate($coords);
|
||||||
|
$dist = $geotools->distance()->setFrom($start)->setTo($coord);
|
||||||
|
|
||||||
|
if($measure === 'flat') {
|
||||||
|
$distance[] = $dist->flat();
|
||||||
|
} elseif ($measure === 'greatcircle') {
|
||||||
|
$distance[] = $dist->greatCircle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$distance = collect($distance);
|
||||||
|
$min = $distance->min();
|
||||||
|
return $all_coords[ $distance->search($min, true) ];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all of the coordinates, start to finish
|
* @param $dep_icao string ICAO to ignore
|
||||||
* Returned in the GeoJSON format
|
* @param $arr_icao string ICAO to ignore
|
||||||
* https://tools.ietf.org/html/rfc7946
|
* @param $start_coords array [x, y]
|
||||||
*
|
* @param $route string Textual route
|
||||||
* TODO: Save this data:
|
|
||||||
* Once a PIREP is accepted, save this returned structure as a
|
|
||||||
* JSON-encoded string into the raw_data field of the PIREP row
|
|
||||||
*
|
|
||||||
* @param \App\Models\Pirep|\App\Models\Flight $model
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getRouteCoordsGeoJSON($model): array
|
public function getCoordsFromRoute($dep_icao, $arr_icao, $start_coords, $route)
|
||||||
{
|
{
|
||||||
# NOTE!! GeoJSON takes coords in [lon, lat] format!!
|
$coords = [];
|
||||||
$line = new LineString([
|
$split_route = explode(' ', $route);
|
||||||
[$model->dpt_airport->lon, $model->dpt_airport->lat],
|
|
||||||
[$model->arr_airport->lon, $model->arr_airport->lat],
|
$skip = [
|
||||||
|
$dep_icao,
|
||||||
|
$arr_icao,
|
||||||
|
'SID',
|
||||||
|
'STAR'
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($split_route as $route_point) {
|
||||||
|
|
||||||
|
$route_point = trim($route_point);
|
||||||
|
|
||||||
|
if (\in_array($route_point, $skip, true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Log::info('Looking for ' . $route_point);
|
||||||
|
|
||||||
|
$points = $this->navRepo->findWhere(['id' => $route_point]);
|
||||||
|
$size = \count($points);
|
||||||
|
|
||||||
|
if($size === 0) {
|
||||||
|
continue;
|
||||||
|
} else if($size === 1) {
|
||||||
|
|
||||||
|
$point = $points[0];
|
||||||
|
|
||||||
|
Log::info('name: ' . $point->id . ' - ' . $point->lat . 'x' . $point->lon);
|
||||||
|
|
||||||
|
$coords[] = [
|
||||||
|
$point->lat,
|
||||||
|
$point->lon,
|
||||||
|
];
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find the point with the shortest distance
|
||||||
|
Log::info('found ' . $size . ' for '. $route_point);
|
||||||
|
|
||||||
|
$potential_coords = [];
|
||||||
|
foreach($points as $point) {
|
||||||
|
#Log::debug('name: ' . $point->id . ' - '.$point->lat .'x'.$point->lon);
|
||||||
|
$potential_coords[] = [$point->lat, $point->lon];
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the start point and then reverse the lat/lon reference
|
||||||
|
# If the first point happens to have multiple possibilities, use
|
||||||
|
# the starting point that was passed in
|
||||||
|
if(\count($coords) > 0) {
|
||||||
|
$start_point = $coords[\count($coords) - 1];
|
||||||
|
$start_point = [$start_point[0], $start_point[1]];
|
||||||
|
} else {
|
||||||
|
$start_point = $start_coords;
|
||||||
|
}
|
||||||
|
|
||||||
|
$coords[] = $this->getClosestCoords($start_point, $potential_coords);
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error($e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $coords;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a FeatureCollection GeoJSON object
|
||||||
|
* @param Flight $flight
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function flightGeoJson(Flight $flight): array
|
||||||
|
{
|
||||||
|
$coords = [];
|
||||||
|
$coords[] = [$flight->dpt_airport->lon, $flight->dpt_airport->lat];
|
||||||
|
|
||||||
|
// TODO: Add markers for the start/end airports
|
||||||
|
// TODO: Read from the ACARS data table
|
||||||
|
if($flight->route) {
|
||||||
|
$route_coords =$this->getCoordsFromRoute(
|
||||||
|
$flight->dpt_airport->icao,
|
||||||
|
$flight->arr_airport->icao,
|
||||||
|
[$flight->dpt_airport->lat, $flight->dpt_airport->lon],
|
||||||
|
$flight->route);
|
||||||
|
|
||||||
|
// lat, lon needs to be reversed for GeoJSON
|
||||||
|
foreach($route_coords as $rc) {
|
||||||
|
$coords[] = [$rc[1], $rc[0]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$coords[] = [$flight->arr_airport->lon, $flight->arr_airport->lat];
|
||||||
|
|
||||||
|
$line = new LineString($coords);
|
||||||
|
|
||||||
|
$features = new FeatureCollection([
|
||||||
|
new Feature($line, [], 1)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
return [
|
||||||
|
'features' => $features,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a GeoJSON FeatureCollection for a PIREP
|
||||||
|
* @param Pirep $pirep
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function pirepGeoJson(Pirep $pirep)
|
||||||
|
{
|
||||||
|
$coords = [];
|
||||||
|
$coords[] = [$pirep->dpt_airport->lon, $pirep->dpt_airport->lat];
|
||||||
|
|
||||||
// TODO: Add markers for the start/end airports
|
// TODO: Add markers for the start/end airports
|
||||||
// TODO: Read from the ACARS data table
|
// TODO: Read from the ACARS data table
|
||||||
|
|
||||||
$feature = new Feature($line, [], 1);
|
$coords[] = [$pirep->arr_airport->lon, $pirep->arr_airport->lat];
|
||||||
$features = new FeatureCollection([$feature]);
|
|
||||||
|
$line = new LineString($coords);
|
||||||
|
|
||||||
|
$features = new FeatureCollection([
|
||||||
|
new Feature($line, [], 1)
|
||||||
|
]);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'features' => $features,
|
'features' => $features,
|
||||||
//'center' => $center,
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -46,7 +46,8 @@
|
|||||||
"tivie/php-os-detector": "1.1.0",
|
"tivie/php-os-detector": "1.1.0",
|
||||||
"santigarcor/laratrust": "5.0.3",
|
"santigarcor/laratrust": "5.0.3",
|
||||||
"pragmarx/version": "0.2.2",
|
"pragmarx/version": "0.2.2",
|
||||||
"nabeel/vacentral": "dev-master"
|
"nabeel/vacentral": "dev-master",
|
||||||
|
"jmikola/geojson": "1.0.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "6.4.0",
|
"phpunit/phpunit": "6.4.0",
|
||||||
|
|||||||
Generated
+63
-63
@@ -427,7 +427,7 @@
|
|||||||
"Doctrine\\DBAL\\": "lib/"
|
"Doctrine\\DBAL\\": "lib/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -750,7 +750,7 @@
|
|||||||
"Egulias\\EmailValidator\\": "EmailValidator"
|
"Egulias\\EmailValidator\\": "EmailValidator"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -796,7 +796,7 @@
|
|||||||
"Parsedown": ""
|
"Parsedown": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -856,7 +856,7 @@
|
|||||||
"GuzzleHttp\\": "src/"
|
"GuzzleHttp\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -914,7 +914,7 @@
|
|||||||
"src/functions_include.php"
|
"src/functions_include.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -969,7 +969,7 @@
|
|||||||
"src/functions_include.php"
|
"src/functions_include.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1031,7 +1031,7 @@
|
|||||||
"Hashids\\": "src/"
|
"Hashids\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1138,7 +1138,7 @@
|
|||||||
"InfyOm\\AdminLTETemplates\\": "src/"
|
"InfyOm\\AdminLTETemplates\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1157,7 +1157,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"templates"
|
"templates"
|
||||||
],
|
],
|
||||||
"time": "2017-11-25 04:43:54"
|
"time": "2017-11-25T04:43:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "infyomlabs/laravel-generator",
|
"name": "infyomlabs/laravel-generator",
|
||||||
@@ -1199,7 +1199,7 @@
|
|||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1223,7 +1223,7 @@
|
|||||||
"test",
|
"test",
|
||||||
"view"
|
"view"
|
||||||
],
|
],
|
||||||
"time": "2017-11-25 05:18:22"
|
"time": "2017-11-25T05:18:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jackiedo/timezonelist",
|
"name": "jackiedo/timezonelist",
|
||||||
@@ -1249,7 +1249,7 @@
|
|||||||
"Jackiedo\\Timezonelist\\": "src/Jackiedo/Timezonelist"
|
"Jackiedo\\Timezonelist\\": "src/Jackiedo/Timezonelist"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1360,7 +1360,7 @@
|
|||||||
"stubs/"
|
"stubs/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1406,7 +1406,7 @@
|
|||||||
"Traitor\\": "src/"
|
"Traitor\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -1594,7 +1594,7 @@
|
|||||||
"Illuminate\\": "src/Illuminate/"
|
"Illuminate\\": "src/Illuminate/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2017,7 +2017,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Bloom filter implementation",
|
"description": "Bloom filter implementation",
|
||||||
"time": "2017-11-30 17:51:14"
|
"time": "2017-11-30T17:51:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
@@ -2123,7 +2123,7 @@
|
|||||||
"Cron\\": "src/Cron/"
|
"Cron\\": "src/Cron/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2172,7 +2172,7 @@
|
|||||||
"src/DeepCopy/deep_copy.php"
|
"src/DeepCopy/deep_copy.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2217,11 +2217,11 @@
|
|||||||
"VaCentral\\": "src/"
|
"VaCentral\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"time": "2017-12-08 04:00:06"
|
"time": "2017-12-08T04:00:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
@@ -2311,7 +2311,7 @@
|
|||||||
"PhpParser\\": "lib/PhpParser"
|
"PhpParser\\": "lib/PhpParser"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -2744,7 +2744,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -2897,7 +2897,7 @@
|
|||||||
"Prophecy\\": "src/"
|
"Prophecy\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3015,7 +3015,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3156,7 +3156,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3237,7 +3237,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -3358,7 +3358,7 @@
|
|||||||
"PragmaRX\\Version\\Tests\\": "tests/"
|
"PragmaRX\\Version\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3379,16 +3379,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pragmarx/yaml",
|
"name": "pragmarx/yaml",
|
||||||
"version": "v0.1.4",
|
"version": "v0.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/antonioribeiro/yaml.git",
|
"url": "https://github.com/antonioribeiro/yaml.git",
|
||||||
"reference": "b510623eb5008cc468e00a31259a3c860dd2b267"
|
"reference": "cc27a84e8d9760d82014596ef155c34c816c4ea5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/antonioribeiro/yaml/zipball/b510623eb5008cc468e00a31259a3c860dd2b267",
|
"url": "https://api.github.com/repos/antonioribeiro/yaml/zipball/cc27a84e8d9760d82014596ef155c34c816c4ea5",
|
||||||
"reference": "b510623eb5008cc468e00a31259a3c860dd2b267",
|
"reference": "cc27a84e8d9760d82014596ef155c34c816c4ea5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3418,7 +3418,7 @@
|
|||||||
"PragmaRX\\Yaml\\Tests\\": "tests/"
|
"PragmaRX\\Yaml\\Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3435,7 +3435,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"yaml"
|
"yaml"
|
||||||
],
|
],
|
||||||
"time": "2017-12-05T20:32:21+00:00"
|
"time": "2017-12-19T02:25:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "prettus/l5-repository",
|
"name": "prettus/l5-repository",
|
||||||
@@ -3481,7 +3481,7 @@
|
|||||||
"Prettus\\Repository\\": "src/Prettus/Repository/"
|
"Prettus\\Repository\\": "src/Prettus/Repository/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -3950,7 +3950,7 @@
|
|||||||
"Laratrust\\": "src/"
|
"Laratrust\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4153,7 +4153,7 @@
|
|||||||
"src/"
|
"src/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-3-Clause"
|
"BSD-3-Clause"
|
||||||
],
|
],
|
||||||
@@ -4728,7 +4728,7 @@
|
|||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4911,7 +4911,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -4960,7 +4960,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5020,7 +5020,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5076,7 +5076,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5139,7 +5139,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5188,7 +5188,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5242,7 +5242,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5330,7 +5330,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5379,7 +5379,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5531,7 +5531,7 @@
|
|||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5588,7 +5588,7 @@
|
|||||||
"bootstrap.php"
|
"bootstrap.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5647,7 +5647,7 @@
|
|||||||
"Resources/stubs"
|
"Resources/stubs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5699,7 +5699,7 @@
|
|||||||
"Symfony\\Polyfill\\Util\\": ""
|
"Symfony\\Polyfill\\Util\\": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5754,7 +5754,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5811,7 +5811,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5894,7 +5894,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -5978,7 +5978,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6046,7 +6046,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6111,7 +6111,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6173,7 +6173,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6304,7 +6304,7 @@
|
|||||||
"Tivie\\OS\\": "src/"
|
"Tivie\\OS\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"APACHE 2.0"
|
"APACHE 2.0"
|
||||||
],
|
],
|
||||||
@@ -6525,7 +6525,7 @@
|
|||||||
"Webpatser\\Uuid": "src/"
|
"Webpatser\\Uuid": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6654,7 +6654,7 @@
|
|||||||
"src/helper.php"
|
"src/helper.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -6711,7 +6711,7 @@
|
|||||||
"Zend\\Diactoros\\": "src/"
|
"Zend\\Diactoros\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"BSD-2-Clause"
|
"BSD-2-Clause"
|
||||||
],
|
],
|
||||||
@@ -6937,7 +6937,7 @@
|
|||||||
"Whoops\\": "src/Whoops/"
|
"Whoops\\": "src/Whoops/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
@@ -7279,7 +7279,7 @@
|
|||||||
"/Tests/"
|
"/Tests/"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "http://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ const phpvms= (function() {
|
|||||||
render_elem: 'map',
|
render_elem: 'map',
|
||||||
overlay_elem: '',
|
overlay_elem: '',
|
||||||
zoom: 5,
|
zoom: 5,
|
||||||
|
geodesic: true,
|
||||||
layers: [],
|
layers: [],
|
||||||
set_marker: false,
|
set_marker: false,
|
||||||
});
|
});
|
||||||
@@ -82,26 +83,27 @@ const phpvms= (function() {
|
|||||||
|
|
||||||
let map = draw_base_map(opts);
|
let map = draw_base_map(opts);
|
||||||
|
|
||||||
var geodesicLayer = L.geodesic([], {
|
if(opts.geodesic) {
|
||||||
weight: 7,
|
let geodesicLayer = L.geodesic([], {
|
||||||
opacity: 0.5,
|
weight: 7,
|
||||||
color: '#ff33ee',
|
opacity: 0.5,
|
||||||
steps: 50,
|
color: '#ff33ee',
|
||||||
wrap: false,
|
steps: 50,
|
||||||
}).addTo(map);
|
wrap: false,
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
geodesicLayer.geoJson(opts.features)
|
geodesicLayer.geoJson(opts.features)
|
||||||
map.fitBounds(geodesicLayer.getBounds());
|
map.fitBounds(geodesicLayer.getBounds());
|
||||||
|
} else {
|
||||||
|
let route = L.geoJSON(opts.features, {
|
||||||
|
"color": "#ff7800",
|
||||||
|
"weight": 5,
|
||||||
|
"opacity": 0.65
|
||||||
|
});
|
||||||
|
|
||||||
/*let route = L.geoJSON(opts.features, {
|
route.addTo(map);
|
||||||
"color": "#ff7800",
|
map.fitBounds(route.getBounds());
|
||||||
"weight": 5,
|
}
|
||||||
"opacity": 0.65
|
|
||||||
});*/
|
|
||||||
|
|
||||||
//map.setView(opts.center, opts.zoom);
|
|
||||||
//map.fitBounds(route.getBounds());
|
|
||||||
//route.addTo(map)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<h3 class="description">map</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="box-body">
|
||||||
|
<div id="map" style="width: 100%; height: 800px"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section('scripts')
|
||||||
|
<script type="text/javascript">
|
||||||
|
phpvms.render_route_map({
|
||||||
|
features: {!! json_encode($coords['features']); !!},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -1,23 +1,53 @@
|
|||||||
@extends('layouts.default.app')
|
@extends('layouts.default.app')
|
||||||
|
@section('title', 'Flight '.$flight->ident)
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@include('layouts.default.flights.show_fields')
|
<div class="col-md-12">
|
||||||
|
<h3 class="description">{!! $flight->ident !!} - {!! $flight->dpt_airport->full_name !!} to {!! $flight->arr_airport->full_name !!}</h3>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
@section('scripts')
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
$(".select2_dropdown").select2();
|
|
||||||
|
|
||||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
<div class="row">
|
||||||
event.preventDefault();
|
<div class="col-md-12">
|
||||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
<table class="table">
|
||||||
});
|
<tr>
|
||||||
|
<td>Departure</td>
|
||||||
|
<td>{!! $flight->dpt_airport->icao !!} @ {!! $flight->dpt_time !!}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
$(document).on('pjax:complete', function() {
|
<tr>
|
||||||
$(".select2_dropdown").select2();
|
<td>Arrival</td>
|
||||||
});
|
<td>{!! $flight->arr_airport->icao !!} @ {!! $flight->arr_time !!}</td>
|
||||||
});
|
</tr>
|
||||||
</script>
|
|
||||||
|
<tr>
|
||||||
|
<td>Route Code/Leg:</td>
|
||||||
|
<td>{!! $flight->route_code ?: '-' !!}/{!! $flight->route_leg ?: '-' !!}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Alternate Airport</td>
|
||||||
|
<td>
|
||||||
|
@if($flight->alt_airport_id)
|
||||||
|
{!! $flight->alt_airport->full_name !!}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Route</td>
|
||||||
|
<td>{!! $flight->route !!}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>Notes</td>
|
||||||
|
<td>{!! $flight->notes !!}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@include('layouts.default.flights.map')
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,81 +0,0 @@
|
|||||||
<div class="form-group col-sm-6">
|
|
||||||
<div class="box box-solid">
|
|
||||||
<div class="box-header with-border">
|
|
||||||
{{--<i class="fa fa-text-width"></i>--}}
|
|
||||||
<h3 class="box-title">{!! Form::label('dpt_airport_id', 'Dep ICAO') !!}</h3>
|
|
||||||
</div>
|
|
||||||
<div class="box-body"><p class="lead">
|
|
||||||
{!! $flight->dpt_airport->icao !!} - {!! $flight->dpt_airport->name !!}
|
|
||||||
</p></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<div class="box box-solid">
|
|
||||||
<div class="box-header with-border">
|
|
||||||
{{--<i class="fa fa-text-width"></i>--}}
|
|
||||||
<h3 class="box-title">{!! Form::label('arr_airport_id', 'Arrival ICAO') !!}</h3>
|
|
||||||
</div>
|
|
||||||
<div class="box-body"><p class="lead">
|
|
||||||
{!! $flight->arr_airport->icao !!} - {!! $flight->arr_airport->name !!}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-sm-12">
|
|
||||||
<div class="box box-primary">
|
|
||||||
<div class="box-body">
|
|
||||||
<!-- Route Code Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('route_code', 'Route Code:') !!}
|
|
||||||
{!! $flight->route_code !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Route Leg Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('route_leg', 'Route Leg:') !!}
|
|
||||||
{!! $flight->route_leg !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Alt Airport Id Field -->
|
|
||||||
@if($flight->alt_airport_id)
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('alt_airport_id', 'Alt Airport Id:') !!}
|
|
||||||
<p>{!! $flight->alt_airport->icao !!}</p>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<!-- Route Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('route', 'Route:') !!}
|
|
||||||
<p>{!! $flight->route !!}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Dpt Time Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('dpt_time', 'Departure Time:') !!}
|
|
||||||
{!! $flight->dpt_time !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Arr Time Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('arr_time', 'Arrival Time:') !!}
|
|
||||||
{!! $flight->arr_time !!}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Notes Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('notes', 'Notes:') !!}
|
|
||||||
<p>{!! $flight->notes !!}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Active Field -->
|
|
||||||
<div class="form-group">
|
|
||||||
{!! Form::label('active', 'Active:') !!}
|
|
||||||
<p>{!! $flight->active !!}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -11,11 +11,8 @@
|
|||||||
|
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
let opts = {
|
phpvms.render_route_map({
|
||||||
features: {!! json_encode($coords['features']); !!},
|
features: {!! json_encode($coords['features']); !!},
|
||||||
|
});
|
||||||
};
|
|
||||||
|
|
||||||
phpvms.render_route_map(opts);
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Facades\Utils;
|
||||||
|
|
||||||
|
class GeoTest extends TestCase
|
||||||
|
{
|
||||||
|
public function setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testClosestPoint()
|
||||||
|
{
|
||||||
|
$geoSvc = app('\App\Services\GeoService');
|
||||||
|
/**
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: Looking for ATL
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: ATL - 36.58106 x 26.375603
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: Looking for SIE
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: found 3 for SIE
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: name: SIE - 39.0955x-74.800344
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: name: SIE - 41.15169x-3.604667
|
||||||
|
* [2017-12-21 00:54:10] dev.INFO: name: SIE - 52.15527x22.200833
|
||||||
|
*/
|
||||||
|
# Start at ATL
|
||||||
|
$start_point = [36.58106, 26.375603];
|
||||||
|
|
||||||
|
# These are all SIE
|
||||||
|
$potential_points = [
|
||||||
|
[39.0955, -74.800344],
|
||||||
|
[41.15169, -3.604667],
|
||||||
|
[52.15527, 22.200833],
|
||||||
|
];
|
||||||
|
|
||||||
|
$coords = $geoSvc->getClosestCoords($start_point, $potential_points);
|
||||||
|
$this->assertEquals([52.15527, 22.200833], $coords);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user