Page 1 of 1

aircraftMarkerRangeCircleDistanceUnit

Posted: Sun Feb 02, 2014 8:06 pm
by trigger
Hi all,

I've been having a play with VRS Global options Settings and I was trying to set aircraftMarkerRangeCircleDistanceUnit to NauticalMile. It didn't work so I used the example from the help text as below and that failed too.
The page doesn't render. No map, aircraft or information columns.
Here are the contents of my file:
<script type="text/javascript">
if(VRS && VRS.globalDispatch && VRS.serverConfig) {
VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {

VRS.globalOptions.aircraftMarkerAllowAltitudeStalk = false;
VRS.globalOptions.aircraftMarkerAllowRangeCircles = true;
VRS.globalOptions.aircraftMarkerShowRangeCircles = true;
VRS.globalOptions.aircraftMarkerRangeCircleInterval = 20;
VRS.globalOptions.aircraftMarkerRangeCircleCount = 3;
VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = StatuteMile;
VRS.globalOptions.aircraftMarkerRangeCircleOddColour = '#FF0000';
VRS.globalOptions.aircraftMarkerRangeCircleEvenColour = '#333333';
});
}
</script>


If I take out the VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = StatuteMile; line then the page renders fine with 3 black and red circles.

What have I missed?
Thanks
Dave

Re: aircraftMarkerRangeCircleDistanceUnit

Posted: Sun Feb 02, 2014 10:14 pm
by agw
Yes, the documentation is a little misleading - it shows the name of the value but not the object that it's sitting in. If you change:

Code: Select all

VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = StatuteMile;
to

Code: Select all

VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = VRS.Distance.StatuteMile;
then it should work. Likewise if you wanted it to be in nautical miles then it'd be VRS.Distance.NauticalMile. You can find the full list of values in enums.js in the standard web site, along with the prefixes for other values. If you have installed VRS into c:\program files (x86)\VirtualRadar then the full path to enums.js would be C:\Program Files (x86)\VirtualRadar\Web\script\vrs\enums.js.

Re: aircraftMarkerRangeCircleDistanceUnit

Posted: Mon Feb 03, 2014 9:37 am
by trigger
Hi Andrew,
Many thanks for the response. I'll give it a go later. I did take a look in enums.js but didn't understand it :lol:
Regards
Dave

Re: aircraftMarkerRangeCircleDistanceUnit

Posted: Mon Feb 17, 2014 10:26 pm
by trigger
Andrew, your suggestion worked - thanks.