atulumello Posted May 2, 2015 Report Posted May 2, 2015 Hey all, Does anyone have a snippet that will display a pilot his past flights on a google map? I am planning on putting it under the pilot center. Thanks! Quote
atulumello Posted May 2, 2015 Author Report Posted May 2, 2015 Scratch this, I ended up using the gcm as posted. <?php // The user is logged in, so show the map if(Auth::LoggedIn() == true) { ?> <?php $pilotid = AUTH::$userinfo->pilotid; $flights = PIREPData::findPireps(array('u.pilotid'=>$pilotid), 200); $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=790x400&PM=permr:diamond7:green%2b%22%25I%22:white&PC=%fffff" /> <?php } //The user is not logged in so don't show anything else { // Do nothing } ?> It was posted by multiple members here in past threads. 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.