Jump to content

Recommended Posts

Posted

"What! He's asking another question?"

Yes. He is. Don't judge him, he doesn't know anything. :rolleyes:

Moving on.

I came across this snippet a few days ago that will allow me to display recent flights underneath a map (GCMap), and it works like a charm. I sized it down and added it to the sidebar on my home page.

Now, the question is this. And please understand that I do a lot of wingin' it when it comes to code, and while I can generally understand how things work and how to change them, I just don't understand this map thing quite yet. I have a list on my home page as well, that shows upcoming flights (pulled from pilot bids), and I want to display a similar GCMap to display these results, too. Any idea as to how I might approach that?

I appreciate your help. I really do. You complete (the virtual aviation enthusiast looking to start his own VA part of) me.

Website link.

  • Moderators
Posted

Don't Worry, lol. I won't Judge you.

I know everyone's new with that stuff.

So on your request, you want the GC Map to map the current flight bids, is that correct?

Posted

Don't Worry, lol. I won't Judge you.

I know everyone's new with that stuff.

So on your request, you want the GC Map to map the current flight bids, is that correct?

Yes, that's correct.

  • 1 month later...
  • Moderators
Posted

Kyle :huh: , do you have a solution to this yet?

Crap!!! I forgot about that.

Let me work on it. I'll return shortly if I can get it.

  • Moderators
Posted

Ummm, Well. I tried and I'm not sure what's up.

It's not returning me the latest bid and I must missed something here for pilots.

<?php
if(!$lastbids)
{
  echo '<p>Sorry No recent bids have been found</p></div>';
  return;
}
        $flights = SchedulesData::getLatestBids($userinfo->pilotid, '5');                                                                     
       $string = "";
       foreach($flights as $flight)
       {       
               $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+';
       }
?>
<p align="center"><strong>Pilots Bids</strong><br />
 <img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=685x360&PM=pemr:star10:white%2b%22%25I%22:white&PC=orange" /><br />
 Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L.Swartz</a></p>

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...