Jump to content

Routes map of Hubs


mark1million

Recommended Posts

  • Moderators

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

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • Moderators

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>

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...