Found a way to change Aircraft icons

Want to post something that doesn't quite fit into the other forums? This is the place for that.
GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Found a way to change Aircraft icons

Post by GregoryGHarding » Mon Apr 06, 2015 4:45 am

so guys i found a way to overwrite the default white icon used on the map for aircrafts.

there is no changes made to the server software, only the website, so you're gonna need the custom content plugin.

heres an example. once i finish it i will post the files for anyone interested.

Image

T-EGJA1
Posts: 107
Joined: Sun Sep 08, 2013 12:11 am
Location: Mid-Devon, UK

Re: Found a way to change Aircraft icons

Post by T-EGJA1 » Mon Apr 06, 2015 11:19 pm

Looks good - well done! :D

I look forward to seeing the code when you've finished it.
Terry

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: Found a way to change Aircraft icons

Post by GregoryGHarding » Sat Apr 11, 2015 11:11 pm

Its much simpler than you think. Because the aircraft pins are created within the program virtually, the links cannot be changed without changing the source. Any changes to the method of render, such as wake turbulence to determine pin image are still impossible.

All I'm doing is creating a physical directory to match the virtual directory in which the pins are created. Then the webserver takes over. The webserver prefers physical directories over virtual ones. So the result is changed pin icons.

First step is to move your entire web folder using custom content plugin. That was the files are editable and not locked to checksum.

Then you need to change the render method for pin text to test instead of image render. Using this:

aircraftMarkerSuppressTextOnImages = True
aircraftMarkerShowAltitudeStalk = False

Once that's done, the virtual directories used are:

Wdth-35/Hght-35/Rotate-*heading rotation*/Airplane.png
Wdth-35/Hght-35/Rotate-*heading rotation*/SelectedAirplane.png
Wdth-70/Hght-70/hiDpi/Rotate-*heading rotation*/Airplane.png
Wdth-70/Hght-70/hiDpi/Rotate-*heading rotation*/SelectedAirplane.png

Note: you don't need to render an image for each degree, as the server only does in it 5 degree increments.

here are the images i've edited, rotated etc. warning: anything heading west are blue, and heading east are green. i did this because on average, most flights heading west are oceania flights because of my location. feel free to change the icons how you wish. this is mainly shared as a proof of concept. also, dont forget to clear your cache after you drop in the files or else you won't see a change.

Download: http://www.filedropper.com/images_7

extract and drop the folders in your website's images folder.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Found a way to change Aircraft icons

Post by agw » Sun Apr 26, 2015 5:22 pm

That will work, but only for Mono installations. Unfortunately Windows installations will be sending the marker text in the link so it's harder to replace the markers that way.

However, support for changing the images used by the site will be coming up in the next release of VRS. You can download the bleeding edge versions of VRS and the Custom Content Plugin from here if you want to have a play with it: http://www.virtualradarserver.co.uk/Preview.aspx. You wouldn't be able to have it choose different images based on the heading with that, all you can do is replace the images that are currently coming from resources.

Custom images need to use the same name as the resource image, which is not always the same as the name that the site asks for. You can find a list of all of the images here (this link will probably break when the documentation site gets rebuilt after the next release): http://www.virtualradarserver.co.uk/Sou ... cba9f8.htm. The two images used by the site for aircraft markers are Marker_Airplane and Marker_AirplaneSelected. Note that if you change the marker sizes then you may also need to adjust the sizes declared in globalOptions so that the site gives Google Maps the right sizes for the markers. Also, remember to leave a large enough margin around the marker so that it doesn't clip when VRS rotates it.

You can download the original images from that page, just click on the image you're interested in and then right-click the image in the Remarks section and save it.

I might change this before release so be warned that if you do use the custom content plugin then you might need to rejigger things around a bit when 2.1.1 comes out :)

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: Found a way to change Aircraft icons

Post by GregoryGHarding » Mon Apr 27, 2015 3:21 am

im using windows server

guess you missed the requirement:

aircraftMarkerSuppressTextOnImages = True
aircraftMarkerShowAltitudeStalk = False

lol

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: Found a way to change Aircraft icons

Post by GregoryGHarding » Fri May 01, 2015 2:57 am

AGW

might be a good idea to set the aircraft pin based on Species, then Wake, for the best compatibility and prettiness :p

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Found a way to change Aircraft icons

Post by agw » Fri May 15, 2015 6:23 pm

One of the things that'll be coming in for the next release is different markers based on species and WTC. The JavaScript will be sticking those into the image URL somewhere.

GregoryGHarding
Posts: 96
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: Found a way to change Aircraft icons

Post by GregoryGHarding » Fri May 15, 2015 7:44 pm

one thing i reaaaaly wish was if the VRS website was highly customizable.

for example this is my VRS.
http://defyance.dyndns.org:85/virtualra ... raftdetail

some parts are pretty, others non functional. because of the code involved.

jary.85
Posts: 3
Joined: Fri Jan 22, 2016 5:08 pm

Re: Found a way to change Aircraft icons

Post by jary.85 » Fri Mar 04, 2016 7:59 am

Hello,

I had a question about the icons of aircraft in the VRS.
The first question is where to find the VRS, which assign an icon. Sometimes a helicopter and an airplane icon indicates VRS.
A second query is to modify. Change icons would go only a certain group of airplanes? In order to have a different color in the VRS military aircraft?

Thank Jary

T-EGJA1
Posts: 107
Joined: Sun Sep 08, 2013 12:11 am
Location: Mid-Devon, UK

Re: Found a way to change Aircraft icons

Post by T-EGJA1 » Sat Mar 05, 2016 12:03 pm

Terry

Post Reply