Icons in preview version

Discussions about the preview versions of Virtual Radar Server.
Forum rules
Please bear in mind if you do install a preview version that it is unfinished code, there may be bugs, bits missing, things that don't work etc.

Posts in this forum will not show up in forum search results. Old threads will be pruned occasionally.
GregoryGHarding
Posts: 94
Joined: Mon Jan 26, 2015 9:01 am
Location: CYYT

Re: Icons in preview version

Postby GregoryGHarding » Thu Sep 17, 2015 12:52 am

is there a bug with the custom icons, i set custom icons and im wondering it theres a limit to how many VRS will cache, because some of them are giving 404 on the website, even though i know the filename is corrent

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

Re: Icons in preview version

Postby agw » Fri Sep 18, 2015 1:48 am

There's no bug as far as I'm aware. VRS doesn't have a limit on the number of icons that it will cache, although it will flush the cache after 60 seconds or so. It will cache 404s for the same period of time.

If you're running on Linux then bear in mind that the filename is case sensitive. Also VRS will expect the images to be in the markers folder under images.

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

Re: Icons in preview version

Postby GregoryGHarding » Fri Sep 18, 2015 9:34 pm

all the images are appropriately named, located in the markers folder, double checked and triple checked. im running on windows and what exactly i have happening is i have al custom icons, however im getting 404 randomly on AC types ive set up. on reset it might be a different AC type. it moves depending on what gets cached first apparently. now ive reset the entire system a few times, and i haven't seen it since. but if it does occur we may have found a bug

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

Re: Icons in preview version

Postby GregoryGHarding » Mon Sep 28, 2015 1:39 am

can i get an example of hooking a military AC to change military AC markers please

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

Re: Icons in preview version

Postby GregoryGHarding » Mon Sep 28, 2015 2:56 am

here's an example of what i have happening with custom Markers, this happen on random, and issue will most likely switch to a different modelicao on reboot

Code: Select all

VRS.globalOptions.aircraftMarkers.unshift(new VRS.AircraftMarker({
   normalFileName: 'Green-Type-A332.png',
   selectedFileName: 'Orange-Type-A332.png',
   size: { width: 50, height: 50 },
   matches: function(/** VRS.Aircraft */ aircraft) { return aircraft.modelIcao.val === 'A332'; }
}));

Directories and file names listed below are correct:

Code: Select all

C:\Program Files (x86)\VirtualRadar Web\images\markers\Green-Type-A332.png
C:\Program Files (x86)\VirtualRadar Web\images\markers\Orange-Type-A332.png


Image

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

Re: Icons in preview version

Postby agw » Thu Oct 01, 2015 1:57 am

If you could zip up your custom script, the markers folder and the Configuration.xml and PluginsConfiguration.txt files from your configuration folder and email the ZIP to me (or, if it's too large for email, use a file sharing site and email me the link) then I'll try to reproduce the problem here.

Regarding detecting whether an aircraft is military or not, you can use isMilitary.val, which is a bool. You can see all of the fields carried for an aircraft in $/Web/scripts/vrs/aircraft.js starting from around line 328.

Bhaal
Posts: 36
Joined: Wed Aug 12, 2015 10:20 am

Re: Icons in preview version

Postby Bhaal » Sat Oct 03, 2015 2:18 am

agw,

Going back to the aircraft icons.. Instead of changing colours via different images, I wonder if it's possible to use jQuery to tint the white images according to certain settings? That would make things much easier than trying to modify existing icons etc...?

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

Re: Icons in preview version

Postby agw » Sun Oct 04, 2015 2:46 pm

When you add a marker to a Google Map you need to give it a URL for the image to display, so any changes to the marker's colour need to be done server-side.

However, I was just looking at the Google Maps API and it appears that there may be support for using vector images for markers, and with those the colour can be specified in the JavaScript. I might take a look at those, although at first glance the API doesn't seem to support multiple paths and fill colours on a single marker so it might not be suitable for drawing some of the more complicated markers (like ground vehicles).

Bhaal
Posts: 36
Joined: Wed Aug 12, 2015 10:20 am

Re: Icons in preview version

Postby Bhaal » Mon Oct 05, 2015 9:57 am

How does the Mutability version of dump1090 do it then? They use multiple icons and change the colour according to altitude while the icon is on the map...? Also, because they use the vector images, they change the size of the aircraft according to type ... So there is some possibilities there as well? :)

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

Re: Icons in preview version

Postby GregoryGHarding » Wed Oct 07, 2015 9:15 am

quick update on my marker issue.

all is well. my server was under load from my home security software, so i assume it was stopping vrs from serving all the images


Return to “Preview Versions”

Who is online

Users browsing this forum: No registered users and 1 guest