md82 Posted December 26, 2010 Report Posted December 26, 2010 Hi guys ! hope everyone is having a nice holiday ! I know this has come up before, but I cant find what I'm looking for. I've got the great circle mapper installed on my front page and working, but I want to install it in the pilot profile to show an individuals recent flights on the map. Anyone have this code ? 1 Quote
Administrators simpilot Posted December 27, 2010 Administrators Report Posted December 27, 2010 You can use the recent pireps function for the individual pilot and then echo out the 'dep' and 'arr' fields into the url for the map. Quote
md82 Posted January 11, 2011 Author Report Posted January 11, 2011 I'm still a noob at php, is there a code I could copy and paste ? Thanks again ! Quote
Guest lorathon Posted January 11, 2011 Report Posted January 11, 2011 Look here. http://forum.phpvms.net/topic/3358-gcmap-great-circle-mapper/ You may need to modify for the profile Quote
md82 Posted January 13, 2011 Author Report Posted January 13, 2011 When I put the code in the pilot profile, it still shows the VA's most recent flights instead of the pilots ??? Quote
Guest lorathon Posted January 13, 2011 Report Posted January 13, 2011 Try this for profiles <?php $flights = PIREPData::getLastReports($userinfo->pilotid, '10'); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=650x360&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" /><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> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.