Remington Box Posted May 24, 2013 Report Share Posted May 24, 2013 Is there a way to change the inair picture on the ACARS map per aircraft ICAO being flown? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 25, 2013 Administrators Report Share Posted May 25, 2013 *Not Tested But Should Work Or Get You Close In acarsmap.js change line 104 from icon: url+"/lib/images/inair/"+data[i].heading+".png", to icon: url+"/lib/images/inair/"+data[i].flightnum.substr(0,3)+".png", Put your flight image you want to use in the /lib/images/inair/ folder. Example if you have a flight ABC1234 then put an image for it in the folder named ABC.png Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 25, 2013 Report Share Posted May 25, 2013 I think he means the aircraft ICAO, as in B738, B763. In this case it would be more difficult. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 25, 2013 Administrators Report Share Posted May 25, 2013 I don't think flightnum contains the ICAO, does it? And is it not possible to do it by airline? Working with what is already in the array you really only have the "flightnum" field to work with which already has the "code" and "flightnum" fields combined, ie ABC1234. I was using the first three digits to create a way to differentiate between airlines, this is assuming that he is using the airline icao as the first three digits of the flights for that airline. Without creating some new code to supply the array to the map you are not going to be able to get the airline data, and then it will only be the airline that the pilot belongs to. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 25, 2013 Administrators Report Share Posted May 25, 2013 I think he means the aircraft ICAO, as in B738, B763. In this case it would be more difficult. If this is the case, then the code that creates the array for the map will have to be changed. Out of the box only the aircraft registration is in the array from the acars table. You clould join the aircraft information and the use the same method as I outlined above and substitute the aircraft icao for the schedule identifier. Without changing the data array you could also just use the aircraft registration but you would need an image for every registration in your database. ie NA1234SW.png Quote Link to comment Share on other sites More sharing options...
Remington Box Posted May 27, 2013 Author Report Share Posted May 27, 2013 Thanks, I did mean by aircraft type, how would I go about changing the data array? would it be icon: url+"/lib/images/inair/"+data[i].registration.substr(0,3)+".png", Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 27, 2013 Report Share Posted May 27, 2013 No, because if it was 'G-ABCD' you'd get 'G-AB' which doesn't get you anywhere. You need to get the aircraft ICAO somehow, so that it returns B738 or B763. Quote Link to comment Share on other sites More sharing options...
in2tech Posted April 19, 2015 Report Share Posted April 19, 2015 *Not Tested But Should Work Or Get You Close In acarsmap.js change line 104 from icon: url+"/lib/images/inair/"+data[i].heading+".png", to icon: url+"/lib/images/inair/"+data[i].flightnum.substr(0,3)+".png", Put your flight image you want to use in the /lib/images/inair/ folder. Example if you have a flight ABC1234 then put an image for it in the folder named ABC.png Would this work for different images for different airlines? I need an image on the live map for airline ABC and a different image on the live map for airline DEF by airline ICAO! Would this work, or is there another way this has to be done? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.