MapFlight Function Returning Blanks


#1

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


#2

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.


#3

Thanks for your help!


#4

Hey,

So I tried getting the flight id first. I’m doing it in ruby so here is the 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


#5

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



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



#6

You are absolutely correct. That was a dumb mistake. Thank you for your help.

Felix