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
aircraftMarkerRangeCircleDistanceUnit
Re: aircraftMarkerRangeCircleDistanceUnit
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:
to
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.
Code: Select all
VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = StatuteMile;
Code: Select all
VRS.globalOptions.aircraftMarkerRangeCircleDistanceUnit = VRS.Distance.StatuteMile;
Re: aircraftMarkerRangeCircleDistanceUnit
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
Regards
Dave
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

Regards
Dave
Re: aircraftMarkerRangeCircleDistanceUnit
Andrew, your suggestion worked - thanks.