Welcome to Radarspotting. Please login or sign up.

May 19, 2024, 12:31:41 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

VRS change currentLocationFixed

Started by ve2gqf, August 24, 2023, 12:36:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ve2gqf

HI,

I try to change the default current location of VRS. Default location is near London, UK.
According this doc : https://www.virtualradarserver.co.uk/Documentation/CustomContent/ChangeSettings.aspx

I had try to change it by use  CurstumGlobalOption script with no result, but I'm not sure about the syntax.

<script type="text/javascript">
    if(VRS && VRS.globalDispatch && VRS.serverConfig) {
        VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) {
        VRS.globalOption.currentLocationFixed { lat: 45.536, lng: -73.650};
           
        });
    }
</script>

Am I wrong ?

Can you help me,

Thanks

Gilles VE2GQF

gunterb

Maybe I'm misunderstanding, but isn't the option to make changes in the options ("Set current location") enough for you?

rikgale

Click set location in the Options.
Drag your marker to where you want it to be.
Go back into options and un-tick set location.
Also make sure to untick GPS location if using a PC - otherwise it may put you where your ISP is based on your IP, especially if your PC doesn't have GPS

Auto updated daily ZIP files on GitHub

SoCal Mac

I set mine under tools then options. A preset Configurations drop down appears.
Under Receiver Locations is Location. You can enter your Latitude and Longitude.
I got my numbers from a GPS or you can get from Google maps.

rikgale

Your method sets the location of the receiver, but not the location of the user. Although they are often one in the same, this is not always the case, i.e. if you have multiple receivers are different locations.
I think the OP was trying to set user location, but useful info if OP wanted to set his receiver location as well. Without receiver location set you don't get the range splats from the receiver(s).

Auto updated daily ZIP files on GitHub

ve2gqf

Many thanks for all,

At the first visit on the VRS web page, the map is centered on the default location (51.47000 / -0.60000), sure users are able to set your own location and recenter the map, but someone are not able to to this and it will be difficult to do with a phone or a tablet; it's why I would like to recenter the map. 

If you have other suggestions, please let me know.

Thanks,

Gilles

rikgale

You can set defaults in

Options -> Initial Settings

It is a bit hit and miss until you get what you want but you should have seeing stuff that looks a bit like this

{"ver":1,"values":{"VRadarServer-#desktop#-vrsCurrentLocation-default":{"userSuppliedLocation":{"lat":50.xxxxxxxxxx,"lng":-4.yyyyyyyyyyyy},"useBrowserLocation":true,"showCurrentLocation":true},"VRadarServer-#desktop#-vrsMapState-default":{"zoom":9,"mapTypeId":"m","center":{"lat":50.xxxxxxxxxxxx,"lng":-4.yyyyyyyyyyyyy},"brightnessMapName":"OpenStreetMap","brightness":0},"VRadarServer-#desktop#-vrsAircraftListFetcher-default":{"interval":2000,"requestFeedId":3,"hideAircraftNotOnMap":true},"VRadarServer-#global#-unitDisplayPreferences-vrsUnitDisplayPreferences":{"distanceUnit":"nm","heightUnit":"f","speedUnit":"kt","pressureUnit":"0","vsiPerSecond":false,"flTransitionAlt":18000,"flTransitionUnit":"f","flHeightUnit":"f","showAltType":false,"showVsiType":false,"showSpeedType":false,"showTrackType":false,"usePressureAltitude":true},"VRadarServer-#desktop#-vrsAircraftPlotterOptions-default":{"showAltitudeStalk":false,"suppressAltitudeStalkWhenZoomedOut":false,"showPinText":true,"pinTexts":["reg","csn","alt","typ","---","---"],"pinTextLines":4,"hideEmptyPinTextLines":true,"trailDisplay":"b","trailType":"d","showRangeCircles":true,"rangeCircleInterval":50,"rangeCircleDistanceUnit":"sm","rangeCircleCount":3,"rangeCircleOddColour":"#333333","rangeCircleOddWeight":1,"rangeCircleEvenColour":"#111111","rangeCircleEvenWeight":2,"onlyUsePre22Icons":false,"aircraftMarkerClustererMaxZoom":5},"VRadarServer-#desktop#-vrsAircraftDetailPlugin-default":{"showUnits":true,"items":["alt","vsi","spd","hdg","dis","bng","sqk","fct","mct","mlt","tim","pas","opi","rtf"],"useShortLabels":false},"VRadarServer-#desktop#-vrsAircraftSorter-default":{"sortFields":[{"field":"mil","ascending":false},{"field":"typ","ascending":true},{"field":"---","ascending":true}],"showEmergencySquawks":1,"showInteresting":1},"VRadarServer-#desktop#-vrsAircraftListPlugin-default":{"columns":["sil","opf","typ","reg","csn","alt","spd","dis"],"showUnits":true},"VRadarServer-#mobile#-vrsCurrentLocation-default":{"userSuppliedLocation":{"lat":50.yyyyyyyyyy,"lng":-4.xxxxxxxx},"useBrowserLocation":true,"showCurrentLocation":true},"VRadarServer-#mobile#-vrsMapState-default":{"zoom":8,"mapTypeId":"m","center":{"lat":50.xxxxxxxxxx,"lng":-3.yyyyyyyyyyyyy},"brightnessMapName":"OpenStreetMap","brightness":0},"VRadarServer-#mobile#-vrsAircraftListFetcher-default":{"interval":2000,"requestFeedId":3,"hideAircraftNotOnMap":true},"VRadarServer-#mobile#-vrsAircraftPlotterOptions-default":{"showAltitudeStalk":false,"suppressAltitudeStalkWhenZoomedOut":false,"showPinText":true,"pinTexts":["reg","csn","alt","typ","---","---"],"pinTextLines":4,"hideEmptyPinTextLines":true,"trailDisplay":"b","trailType":"d","showRangeCircles":true,"rangeCircleInterval":50,"rangeCircleDistanceUnit":"nm","rangeCircleCount":3,"rangeCircleOddColour":"#333333","rangeCircleOddWeight":1,"rangeCircleEvenColour":"#111111","rangeCircleEvenWeight":2,"onlyUsePre22Icons":false,"aircraftMarkerClustererMaxZoom":5},"VRadarServer-#mobile#-vrsAircraftInfoWindow-default":{"enabled":true,"items":["ico","reg","typ","opr","mod","csn","rts","spd","alt","opf"],"showUnits":true},"VRadarServer-#mobile#-vrsAircraftSorter-default":{"sortFields":[{"field":"mil","ascending":false},{"field":"typ","ascending":true},{"field":"---","ascending":true}],"showEmergencySquawks":1,"showInteresting":1},"VRadarServer-#mobile#-vrsAircraftListPlugin-default":{"columns":["sop","rai","csr","alv","spd","dis"],"showUnits":false},"VRadarServer-#mobile#-vrsAircraftAutoSelect-default":{"enabled":false,"selectClosest":true,"offRadarAction":"wfr","filters":[]},"VRadarServer-#mobile#-vrsAircraftDetailPlugin-default":{"showUnits":true,"items":["alt","vsi","spd","hdg","dis","bng","sqk","fct","mct","mlt","tim","pas","opi","rtf","pom"],"useShortLabels":false}}}
I can't remember exactly how you get to generating this, but keep playing about you'll get there... I think you click the desktop.html -> set it up as you want it, then go to the settings.html and export it and then copy into the exported setting box and hit save.... or something like that.

Auto updated daily ZIP files on GitHub