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