Routes map of Hubs

Nabeel, i have watched your tutorial about the rout map hubs, it works fine apart from one hub, EGKK for some reason, any ideas?

EGCC KJFK KLAX EGPH works fine but i have the most routes coming out of KK but that was limited with the code to 20 i believe.

http://grantsva.com/index.php/routemap/hubmap/egkk

most likely you would take out the 20 in this out below, and you will see all schedules. or you could make it a higher number only problem with that is you would have to keep updating it everytime unless you put it to a million or something…but that would be pointless when you could just remove the 20 leave it blank and they all show up..

$allschedules = SchedulesData::GetSchedules(20);

Try some debugging, below the all schedules line:

<?php
$allschedules = ...

# Add this:
print_r($allschedules);
?>

See if anything outputs. The GMap code seems to be there (when you view source). Try googling it as well (“Google Map missing”), etc, I will as well

Thanks Nabeel will give that a go now.

Just loaded in IE and it throws up the following,

Message: Syntax error

Line: 131

Char: 25

Code: 0

URI: http://grantsva.com/index.php/routemap/hubmap/egkk

Message: ‘onLoad’ is undefined

Line: 329

Char: 1

Code: 0

URI: http://grantsva.com/index.php/routemap/hubmap/egkk

Line 131 is.    var point = new GLatLng(,);

Line 329 is.    <script language=“javascript” type=“text/javascript” charset=“utf-8”>window.onload=onLoad;</script></script>

Ahh, this:

var point = new GLatLng(,);

Is one your airports missing a latitude/longitude?

Mo thats fine and just to make sure i have edited and done a lookup and save, still the same. How strange, what about if i delete and add again or would that mess up the existing schedules?

Which one is missing?

Inside the loop, after the:

<?php
foreach($allschedules as $schedule)
{
?>

adding this:

<?php
if($schedule->deplong == '' || $schedule->deplat == '' || 
      $schedule->arrlong=='' ||  $schedule->arrlat == '')
{ 
  continue;
}
?>

Will skip that if any of the coordinates are blank. Let’s see if that works

Yes, Thats fixed it

Hi all

I to have watch the tutorial and got this working, now my question is how do I pull this into a .tpl file with the correct hub name so that I can do some fancy design formating on the page?