absolute# FlightAware path to KML A simple JS ES5 snipet to get a KML file from a flight path in FlightAware, can be used as a bookmarklet:
Bookmark JS Code
javascript:!function()%7Bvar%20e%2Ct%2Cl%2Ci%2Cn%2Co%2Ca%3D(o%3Ddocument.title.match(%2F%5C((%5Ba-z0-9%5D%2B)%5C)%2Fi))%3Fo%5B1%5D%3Adocument.title%2Cr%3D%5B%27%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%27%2C%27%3Ckml%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fkml%2F2.2%22%3E%27%2C%22%3CDocument%3E%22%2C%22%3Cname%3E%22%2Ca%2C%22%3C%2Fname%3E%22%2C%27%3CStyle%20id%3D%22lineStyle%22%3E%27%2C%22%3CLineStyle%3E%22%2C%22%3Ccolor%3Eff0000ff%3C%2Fcolor%3E%22%2C%22%3Cwidth%3E4%3C%2Fwidth%3E%22%2C%22%3C%2FLineStyle%3E%22%2C%22%3CPolyStyle%3E%3Cfill%3E0%3C%2Ffill%3E%3C%2FPolyStyle%3E%22%2C%22%3C%2FStyle%3E%22%2C%22%3CPlacemark%3E%22%2C%22%3Cname%3E%22%2Ca%2C%22%3C%2Fname%3E%22%2C%22%3Cdescription%3E%22%2Cdocument.title%2C%22%5Cn%22%2Cdocument.URL%2C%22%3C%2Fdescription%3E%22%2C%22%3CstyleUrl%3E%23lineStyle%3C%2FstyleUrl%3E%22%2C%22%3CLineString%3E%22%2C%22%3Cextrude%3E1%3C%2Fextrude%3E%22%2C%22%3Ctessellate%3E1%3C%2Ftessellate%3E%22%2C%22%3CaltitudeMode%3Eabsolute%3C%2FaltitudeMode%3E%22%2C%22%3Ccoordinates%3E%22%5D%3Bfor(var%20d%20in%20trackpollBootstrap.flights)if(trackpollBootstrap.flights.hasOwnProperty(d))%7Bn%3DtrackpollBootstrap.flights%5Bd%5D%3Bbreak%7Dfor(var%20s%3Dn.track%2Cc%3D0%3Bc%3Cs.length%3Bc%2B%2B)r.push(s%5Bc%5D.coord%5B0%5D%2C%22%2C%22%2Cs%5Bc%5D.coord%5B1%5D%2C%22%2C%22%2C30.48*s%5Bc%5D.alt%2C%22%5Cn%22)%3Br.push(%22%3C%2Fcoordinates%3E%22%2C%22%3C%2FLineString%3E%22%2C%22%3C%2FPlacemark%3E%22%2C%22%3C%2FDocument%3E%22%2C%22%3C%2Fkml%3E%22)%2Ce%3Dr.join(%22%22)%2Ct%3Ddocument.title%2Cl%3D%22data%3Aapplication%2Fvnd.google-earth.kml%2Bxml%3Bcharset%3Dutf-8%2C%22%2BencodeURIComponent(e)%2C(i%3Ddocument.createElement(%22a%22)).setAttribute(%22href%22%2Cl)%2Ci.setAttribute(%22download%22%2Ct)%2Cdocument.body.appendChild(i)%2Ci.click()%2Cdocument.body.removeChild(i)%7D()%3B