Jump to content

Recommended Posts

Posted

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

  • Members
Posted

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 ?

  • Members
Posted

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

  • Members
Posted

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
  • Members
Posted

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

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