Jump to content

Recommended Posts

Posted

In that case, this should work:

<?php $params['s.enabled'] = 1;
$flights = SchedulesData::findSchedules($params);
$string = "";
foreach($flights as $flight){
   $string = $string.$flight->dep.'+-+'.$flight->arr.',+';
} ?>
<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>

(Not tested)

Posted

Hmm... ok try this

<?php $params['s.enabled'] = 1;
$flights = SchedulesData::findSchedules($params);
$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>

Posted

Hmm... ok try this

<?php $params['s.enabled'] = 1;
$flights = SchedulesData::findSchedules($params);
$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>

i think u gave me the same code same error!

Posted

No the new code is correct. It doesn't work because you're trying to use an airport that doesn't exist:

VGHS: location error 0 (undefined code)
Posted

Ok, if you insist, of course you're not. I was telling you what the error was from the gcmap site, but obviously it was wrong. You try and solve it alone then ;)

  • Like 1
Posted

Ok, if you insist, of course you're not. I was telling you what the error was from the gcmap site, but obviously it was wrong. You try and solve it alone then ;)

well i tried to do something now it started displaying the image but not the routes. blank map

  • Like 1
  • Moderators
Posted

good luck fixing it alone.

Tom is trying to help you and you say his imput is not needed way to go here.

now for Tom would it also be possible to show the routes from 1 airport

Posted

good luck fixing it alone.

Tom is trying to help you and you say his imput is not needed way to go here.

now for Tom would it also be possible to show the routes from 1 airport

I am never saying that i will fix it alone i need help and i dont say that TOM is not trying to help me. ACTUALLY the code is not working may be because of ICAO code missing from GC Maps?

  • Moderators
Posted

dude stop begging

hey mark you are not the only one livving in the cloud :lol:

bad thing today is the second BBQ dauthers school recitle

pff thats gonna be one bigg head i am gonna have at work

and just take your time on the code <_<

  • Moderators
Posted

You could try this it seems to be working on my test install but i dont have that many schedules on it,

<?php $params['s.enabled'] = 1;
$flights = SchedulesData::findSchedules($params);
$string = "";
foreach($flights as $flight){
   $string = $string.EGKK.'+-+'.$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>

Just change the first bit of the call to the airport you want in my case i changed to EGKK (line 5)

  • Moderators
Posted

Ok i see whats its doing its bring all the airports not limiting to the departure filed, I will have another play about later but the url is too long, just look at the image url.

  • Moderators
Posted

Ok head hurts now lol,

Try this

<?php 
$params['depicao'] = EGKK;
$flights = SchedulesData::findSchedules($params);
$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>

Clearly this will being back all the schedules in your system just change the depicao to teh field you want to list.

  • Like 2
Posted

Ok head hurts now lol,

Try this

<?php 
$params['depicao'] = EGKK;
$flights = SchedulesData::findSchedules($params);
$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>

Clearly this will being back all the schedules in your system just change the depicao to teh field you want to list.

:D

TOPIC SOLVED BY THE ABOVE GIVEN CODE THANKS TO MARK

  • Like 1
Posted

Hi guys,

I was wondering if i could squeeze in another question about this...

My map is gone after doing a flight from VHHX (Kai Tak) to VVNB (No Bai Vietnam).

Of course the map does not know the old airport kai tak ;-)

Is there a work around? Should i just name it VHHH? Or is there a solution available.

thanks in advance guys

Lucas

www.serious-airlines.com

  • 2 weeks later...
Posted

<?php 
$params['depicao'] = OTBD;
$flights = SchedulesData::findSchedules($params);
$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>

how can i add more than 1 depicao in this code?

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