Page 2 of 3

Re: Icons in preview version

Posted: Thu Sep 17, 2015 12:52 am
by GregoryGHarding
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

Re: Icons in preview version

Posted: Fri Sep 18, 2015 1:48 am
by agw
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.

Re: Icons in preview version

Posted: Fri Sep 18, 2015 9:34 pm
by GregoryGHarding
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

Re: Icons in preview version

Posted: Mon Sep 28, 2015 1:39 am
by GregoryGHarding
can i get an example of hooking a military AC to change military AC markers please

Re: Icons in preview version

Posted: Mon Sep 28, 2015 2:56 am
by GregoryGHarding
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

Re: Icons in preview version

Posted: Thu Oct 01, 2015 1:57 am
by agw
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.

Re: Icons in preview version

Posted: Sat Oct 03, 2015 2:18 am
by Bhaal
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...?

Re: Icons in preview version

Posted: Sun Oct 04, 2015 2:46 pm
by agw
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).

Re: Icons in preview version

Posted: Mon Oct 05, 2015 9:57 am
by Bhaal
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? :)

Re: Icons in preview version

Posted: Wed Oct 07, 2015 9:15 am
by GregoryGHarding
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