Change range colour (by Custom Content Plugin)

Are you having problems with using or developing a plugin? Let me know here.
Post Reply
matthys70
Posts: 21
Joined: Thu Mar 13, 2014 9:24 am

Change range colour (by Custom Content Plugin)

Post by matthys70 » Mon Feb 19, 2018 3:55 pm

Hello,

Can anyone point me in the direction where I can change the colour of the Receiver Range?
I know this can be done with the Custom Content Plugin but no clue how.
I search this forum for range colour, but nothing ...

Thanks,
Matthijs

UA4WIY
Posts: 31
Joined: Mon Aug 29, 2016 7:41 pm

Re: Change range colour (by Custom Content Plugin)

Post by UA4WIY » Wed Feb 21, 2018 2:40 am

If you want to color the diagrams of several receivers in different colors, then the script that is listed below does this.

Code: Select all

<script type="text/javascript"> 
    if(VRS && VRS.globalDispatch && VRS.serverConfig) { 
        VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) { 
            var _PageSettings = null; 
            bootStrap.hookInitialised(function(pageSettings) { 
                _PageSettings = pageSettings; 
            }); 
             
            VRS.globalOptions.polarPlotFillColourCallback = function(feedId, lowAlt, highAlt) { 
                var result = '#FFFFFF'; // цвет по умолчанию 
                var feed = _PageSettings && _PageSettings.aircraftListFetcher ? _PageSettings.aircraftListFetcher.getFeed(feedId) : null; 
                if(feed) { 
                    switch(feed.name.toUpperCase()) { 
                        case "RECEIVER":        result = '#000000'; break;  // receiver, color chart in HEX
                        case "RECEIVER1":    result = '#0000FF'; break; 
                        case "RECEIVER2":    result = '#АА00FF'; break; 
                    } 
                } 
                 
                return result; 
            }; 
        }); 
    } 
</script> 

matthys70
Posts: 21
Joined: Thu Mar 13, 2014 9:24 am

Re: Change range colour (by Custom Content Plugin)

Post by matthys70 » Wed Feb 21, 2018 7:50 am

Thanks, that will help a lot.

Somebody pointed me that under options/map you can change some settings, for me the "Fill opacity" was a big help.

Thanks!

Post Reply