Page 1 of 1

Define distance filter via JavaScript for adsbexchange

Posted: Mon Aug 07, 2017 11:54 pm
by rdjsb
I can see all the aircraft from my own receiver and the aircraft from http://www.adsbexchange.com
But all the aircraft worldwide from http://www.adsbexchange.com are shown on the map and in te list. I want to restrane the amount of aircraft I see from here.

I know that I can enable a distance filters in the filtermenu (via options), but I want to do this via a JavaScript like the example in http://www.virtualradarserver.co.uk/Documentation/CustomContent/ChangeSettings.aspx.

I only want to see aircraft at a distance between 0 and 600 km from my own receiver location. So I like to put this Variables in the JavaScript.
If possible I like to hide the option that users can not alter this distance. So it would be nice that the distance filter is not visible for users.

Is there anyone who has such a script?

I hope someone can help. I saw multiple people struggle with the large amount of data on the map/list from http://www.adsbexchange.com, but still no joy. Maybe this helps more people than just me.

Regards,
Roland

Re: Define distance filter via JavaScript for adsbexchange

Posted: Sun Aug 27, 2017 10:34 pm
by rdjsb
This is the script-line I wrote, but it doesn't work.

Code: Select all

VRS.globalOptions.AircraftFilter = {"filters":[{"property":"dis","valueCondition":{"condition":"btw","value1":0,"value2":600}}],"enabled":true};


I still see all the aircraft.
I only want to see aircraft at a distance between 0 and 600 km from my own receiver location (between value1 and value2 in the script).
The distance filter is also still visible for users, instead of hidden.

What's wrong in my code of the script (Custom Content plugin) ??
Who can help ?

Re: Define distance filter via JavaScript for adsbexchange

Posted: Sat Sep 09, 2017 5:05 pm
by rdjsb
Is there no one who can help?
Or someone who can give me a direction??