How VRS displays aircraft icons

Want to post something that doesn't quite fit into the other forums? This is the place for that.
Posts: 32
Joined: Fri Feb 19, 2016 11:58 pm

How VRS displays aircraft icons

Postby WeKnowMC » Tue May 23, 2017 5:59 pm

I am trying to edit ProHill's flight database setup ( to allow for the map page to display aircraft icons (in the exact same way VRS does) instead of the standard google map api arrows in the tracked log map. If you are unfamiliar with the setup, I am basically trying to implement the SVGs from VRS as a symbol on a google maps polyine. So far, I have added the ability to display aircraft icons on the google map polyine, which is working fine.

The problem is that I am failing to work out how VRS knows which aircraft icon to serve for each aircraft. Judging by the existing aircraft icon names, I understand that model code specific names (e.g. TypeA380) is specifically for an A380, the same for TypeA340 and TypeGLID etc. However, the TypeGLFx icon doesn't seem to follow the same rules as this as I have seen many other jets with the TypeGLFx icon in VRS that don't start with GLF (e.g. FA20, C550 etc.). Are there exceptions to this icon? Is there possibly a list of model codes that VRS will serve the TypeGLFx icon to when the aircraft's model code matches?

Posts: 1883
Joined: Fri Feb 17, 2012 3:20 am

Re: How VRS displays aircraft icons

Postby agw » Fri Jun 09, 2017 12:12 am

VRS sets up an array of AircraftMarker objects in AircraftPlotter.ts (which gets compiled down to JavaScript) - at time of writing the list starts at line 227 here:

When it wants to choose an aircraft icon it works its way through the list passing the aircraft object to a function called matches() on each AircraftMarker object. The first aircraft marker that returns true is the one that gets used. The rest of the chosen AircraftMarker object describes the marker.

The last entry in the list has a matches() function that always returns true, and that describes the generic aircraft marker.

Most matches() methods are along the lines that you've described, they just compare type codes. The one for Type-GLFx.png is a bit more complicated, it returns true if:

1. The engine type is "Jet" and either
2a. The wake turbulence category is "Light" or
2b. The wake turbulence category is "Medium" and the engine placement is "Aft Mounted".

Users can add their own custom markers to VRS by shifting their own AircraftMarker objects to the beginning of the array that VRS constructs when the site starts up.

Posts: 23
Joined: Sun Jul 16, 2017 10:01 pm

Re: How VRS displays aircraft icons

Postby MK2wx » Mon Aug 21, 2017 9:54 am

I'd really appreciate some time taken to allow VRS to know how to show glider types correctly. They are beautiful to see and watch, but not so much when they are represented by a generic icon. ;)

They do seem to be a somewhat special case as there really are so many variants, and all valid as far as I can discover. I'd guess that GLID is almost in the minority by now too.

I've tired and failed with custom etc, and so have others. It's too technical for some of us who really are just end users. I've even downloaded work from others where they have offered it, installed the plugin and still not had it work. I've followed whatever instructions exist and I could find, but apparently those are sadly not sufficient for a good outcome to date.

It's all a bit frustrating really.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest