Jump to content

Inair by ICAO?


Remington Box

Recommended Posts

  • Administrators

*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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • Administrators

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

Link to comment
Share on other sites

  • 1 year later...

*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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...