diff --git a/src/Command/TestClosestOpenHubsCommand.php b/src/Command/TestClosestOpenHubsCommand.php index f82a1400..f2cd25a2 100644 --- a/src/Command/TestClosestOpenHubsCommand.php +++ b/src/Command/TestClosestOpenHubsCommand.php @@ -13,7 +13,7 @@ use App\Service\MapTools; class TestClosestOpenHubsCommand extends Command { - $protected $maptools; + protected $maptools; protected function configure() { @@ -37,7 +37,16 @@ class TestClosestOpenHubsCommand extends Command $lat = $input->getArgument('lat'); $point = new Point($long, $lat); - $this->maptools->getClosestOpenHubs(); + + $hubs_with_distance = $this->maptools->getClosestOpenHubs($point, 10); + + foreach($hubs_with_distance as $hub_dist) + { + $hub = $hub_dist['hub']; + $distance = $hub_dist['distance']; + + error_log('Hub ID ' . $hub->getID() . ' - ' . $hub->getName() . ' = ' . $distance . ' kms away.'); + } return 0; }