iframe header
  • Join FlightAware (Why Join?)
  • Login
  • US Flag 
11:13AM EDT

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: MapFlight Function Returning Blanks
PostPosted: Thu Feb 03, 2011 9:53 pm 
Offline

Joined: Thu Jul 26, 2007 9:00 am
Posts: 8
Hi

I'm trying to use MapFlight to get a map of the flight. I noticed that the docs say: "If the aircraft is not currently in the air, then a blank image may be returned." I'm seeing this a lot. When I get a map for a flight it's usually blank. This isn't a good user experience. I'd like to be able to show the map even if the airplane arrived just like the flightaware website does.

Is there any way I can display the map even if the flight has landed?

Thanks,
Felix


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2011 6:25 pm 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 234
Location: FlightAware WHQ
If you use MapFlightEx, it will let you map a specific flight even once it has landed. You will just need to use FlightInfoEx or InFlightInfo to first get the flight (such as the most recent) so that you can pass the identifier to MapFlightEx.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2011 9:23 pm 
Offline

Joined: Thu Jul 26, 2007 9:00 am
Posts: 8
Thanks for your help!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2011 4:46 pm 
Offline

Joined: Thu Jul 26, 2007 9:00 am
Posts: 8
Hey,

So I tried getting the flight id first. I'm doing it in ruby so here is the code:
Code:
flightId = $api.getFlightID(GetFlightIDRequest.new(ident, departureTime))
result = $api.mapFlight(MapFlightExRequest.new(flightId.GetFlightIDResult, height, width, nil, nil, true, true, true, nil))


I'm still getting blank maps. I specifically tried it on this flight id for example: N118ET-1297004108-34-0 (ident:N118ET departure:1297015380).

Can you take a look and see what could be wrong?

Thanks,
Felix


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2011 4:26 pm 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 234
Location: FlightAware WHQ
felixtcpip wrote:
Hey,

So I tried getting the flight id first. I'm doing it in ruby so here is the code:
Code:
flightId = $api.getFlightID(GetFlightIDRequest.new(ident, departureTime))
result = $api.mapFlight(MapFlightExRequest.new(flightId.GetFlightIDResult, height, width, nil, nil, true, true, true, nil))


I'm still getting blank maps. I specifically tried it on this flight id for example: N118ET-1297004108-34-0 (ident:N118ET departure:1297015380).

Can you take a look and see what could be wrong?

Thanks,
Felix



I think the problem is simply mismatched copy/paste. It should be mapFlightEx instead of mapFlight when you invoke the function call:

Code:
flightId = $api.getFlightID(GetFlightIDRequest.new(ident, departureTime))
result = $api.mapFlightEx(MapFlightExRequest.new(flightId.GetFlightIDResult, height, width, nil, nil, true, true, true, nil))


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2011 4:30 pm 
Offline

Joined: Thu Jul 26, 2007 9:00 am
Posts: 8
You are absolutely correct. That was a dumb mistake. Thank you for your help.

Felix


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
iframe sidebar


 

Airport Tracker/Info


-or-