Jump to content
md82

pilot profile recent flights on google maps?

Recommended Posts

Hi everyone! I have the Great Circle Maps currently on my pilot profiles. I would like to use google maps to show the last 15 flights instead.

Thanks

Share this post


Link to post
Share on other sites

To be honest i do not quite understand your request as mine setup shows last flight already on google maps do yo have a link of the page or a screenshot of your browser ?

Share this post


Link to post
Share on other sites

To be honest i do not quite understand your request as mine setup shows last flight already on google maps do yo have a link of the page or a screenshot of your browser ?

He is saying he has this, and would like it to be in google maps rather than gcmap.

Share this post


Link to post
Share on other sites

Now i understand thx flynryan692

Hi everyone! I have the Great Circle Maps currently on my pilot profiles. I would like to use google maps to show the last 15 flights instead.

Thanks

At the moment there is no easy way you can do it except if you write a function to do it

Share this post


Link to post
Share on other sites

Ignore my latest post it was quite fast to do it

Open PIREPS.php in core/modules/PIREPS

paste this code in it

public function publicroutesmap($pilotID)
   {


    $this->title = 'Flight Map of'.$pilotID;

    $pireps = PIREPData::findPIREPS(array('p.pilotid' => $pilotID));

    if(!$pireps)
    {
	    $this->set('message', 'There are no PIREPs for this pilot!!');
	    $this->render('core_error.tpl');
	    return;
    }

    $this->set('allschedules', $pireps);
    $this->show('flown_routes_map.tpl');
   }

now in pilot_public_profile.tpl and in profile_main.tpl

paste this where ever you want the map to be shown

<?php PIREPS::publicroutesmap($userinfo->pilotid) ?>

And you should have this result like on my test page

www.http://www.baggelis.com/phpvms/index.php/profile/view/2

  • Like 1

Share this post


Link to post
Share on other sites

With that code you can

Open PIREPS.php in core/modules/PIREPS

paste this code in it

public function publicroutesmap($pilotID,$limit='')
   {


       $this->title = 'Flight Map of'.$pilotID;

       $pireps = PIREPData::findPIREPS(array('p.pilotid' => $pilotID),$limit);

       if(!$pireps)
       {
           $this->set('message', 'There are no PIREPs for this pilot!!');
           $this->render('core_error.tpl');
           return;
       }

       $this->set('allschedules', $pireps);
       $this->show('flown_routes_map.tpl');
   }

now in pilot_public_profile.tpl and in profile_main.tpl

paste this where ever you want the map to be shown

<?php PIREPS::publicroutesmap($userinfo->pilotid,NumberOfFlightsyouwant)?>

Share this post


Link to post
Share on other sites

It would be like this right?

<?php PIREPS::publicroutesmap($userinfo->pilotid,10)?>

With that, and updating the function it still returns all of the flights flown and not the limit.

Share this post


Link to post
Share on other sites

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