Hey I am using FlightInfoEx and DecodeFlightRoute in with Javascript in Ruby and when I type in the indent info for a flight I get the origin and destination but the map is not showing up… I get this error Uncaught TypeError: Cannot read property ‘data’ of undefined. It has to do with this part of code
var points = result.DecodeFlightRouteResult.data;
table.addRows(points.length);
for (rowid = 0; rowid < points.length; rowid++) {
table.setCell(rowid, 0, points[rowid].latitude);
table.setCell(rowid, 1, points[rowid].longitude);
table.setCell(rowid, 2, points[rowid].name + ’ (’ + points[rowid].type + ‘)’ );
}
I copied the jasvascript example and replaced the api and username with my info. Any ideas as to why I am not seeing the map?
The example doesn’t have exhaustive error handling, so it fails if an empty response is returned by the server. Not all flight routes can be successfully decoded, particularly if it is too far in the future or the flight route involves navaids outside of the continental United States. Although actual arbitrary positions can be returned by FlightXML’s GetHistoricalTrack, the route decoding functions can only handle state-side routes.
Thanks for the fast response… All of my searches have been state side. I am getting a blank map but I am getting the flight origin and destination… Do I have to have to save to the database to show me the points on the map?
There is no database in that sample. “addRow” just refers to the in-memory list that Google Maps API uses.
I am having same problem but I managed to get the values this morning.
But now I’m encountering this problem.
What is the problem…
TQ
The original post was about failing to decode routes. As I mentioned in my original reply, “Not all flight routes can be successfully decoded, particularly if it is too far in the future or the flight route involves navaids outside of the continental United States”