Website Initial Settings - Blank but Location is Stuck

Want to post something that doesn't quite fit into the other forums? This is the place for that.
Post Reply
Me109
Posts: 37
Joined: Sat Nov 01, 2014 4:54 pm
Location: KORH

Website Initial Settings - Blank but Location is Stuck

Post by Me109 » Mon Dec 19, 2016 8:33 pm

Looking to see if anyone can help or provide some guidance.

At some point in the past, I hard coded a GPS coordinate into the Web Site Initial Settings option. In spite of the Initial Settings window now being blank, the map is still identifying the previous fixed location. Is there another location where this location information is stored? The receiver GPS location is not the same as the map location identified, so I've ruled it out.

Thanks.

agw
Posts: 1957
Joined: Fri Feb 17, 2012 3:20 am

Re: Website Initial Settings - Blank but Location is Stuck

Post by agw » Thu Dec 22, 2016 1:55 am

VRS stores state in the browser's local storage and that state includes the current location.

On the main VRS screen change the dropdown box in the middle of the screen from "Default Version" to "Settings Page" and then click the link. It'll open up the settings page which will show you everything that VRS has recorded in the browser's local storage, from there you can find and remove the map settings or you can just wipe the lot and go back to default on that browser.

(Just noticed there's a JavaScript error on that page that stops you from removing individual settings - you should still be able to remove all of them though).

Me109
Posts: 37
Joined: Sat Nov 01, 2014 4:54 pm
Location: KORH

Re: Website Initial Settings - Blank but Location is Stuck

Post by Me109 » Thu Dec 22, 2016 12:46 pm

Hi Andrew -

I still haven't solved this, so a little more information. Accessing the settings page on the server (127.0.0.1/settings.html) as you described confirms that the settings are blank/empty (going so far as to "Export Settings" to confirm the settings are empty). Accessing the settings page from a client on the local network (<server lanIP>/settings.html) shows the "#desktop#-vrsCurrentLocation-default" setting with the "userSuppliedLocation" hardcoded location identified.

I've tried 2 things on the client:
1) In settings, clicked "Remove All," then "Refresh" to confirm the settings are cleared, then refreshed the VRS web page. The hard code location is still present.
2) In settings, clicked "Remove All," then "Refresh" to confirm the settings are cleared, cleared the browser cache, restarted the browser, then reloaded the webpage. The hard code location is still present.

I'm confused why the accessing what I think is the same settings.html page returns different results between server and client.

agw
Posts: 1957
Joined: Fri Feb 17, 2012 3:20 am

Re: Website Initial Settings - Blank but Location is Stuck

Post by agw » Sat Dec 31, 2016 1:31 am

I've fixed the settings.html bug that stops you clicking on individual keys, I'll be uploading a preview of that over the weekend.

The settings are stored in the browser's local storage so every browser has its own copy of the settings. The browser on the server has different settings to the browser on the client. If you've removed the settings on the browser and your Exported Settings field in VRS is empty then VRS should default to a location just west of London.

However, back in the days before you could just import everything from the browser I used to have some configuration fields for a handful of initial browser settings, one of which was the initial location. The data entry fields for that have gone away but the Configuration.xml file probably still has them, I've just had a look and there's still code hanging around that's picking them up and sending them as a part of the server configuration message that's sent to the site. You can see what's being sent for the server configuration by going to http://127.0.0.1/VirtualRadar/ServerConfig.json. I imagine that's probably where your mystery initial location is coming from.

There's a couple of ways past that - the first is that you can just configure up another set of Initial Settings settings with the initial location that you want - that'll get used in preference to the old initial location - or alternatively if you just want to reset back to the default west of London then go to Help | About, click on the link for the configuration folder, edit Configuration.xml in notepad and in the <GoogleMapSettings> section remove or update the two lines for <InitialMapLatitude> and <InitialMapLongitude>. You'll need to restart VRS (without loading or saving the configuration or you'll lose your edit) before VRS will pick up your changes.

Me109
Posts: 37
Joined: Sat Nov 01, 2014 4:54 pm
Location: KORH

Re: Website Initial Settings - Blank but Location is Stuck

Post by Me109 » Mon Jan 02, 2017 1:09 pm

Andrew -

Thank you, all set now. I edited the xml file, and will give the preview a look later on too.

gamebox13
Posts: 1
Joined: Tue Feb 28, 2017 7:52 pm

Re: Website Initial Settings - Blank but Location is Stuck

Post by gamebox13 » Tue Feb 28, 2017 8:03 pm

For what need Receiver location in VRS setting? If it not shows on map and location point always goes to Windsor and all distances compute from this place but not from receiver location

Post Reply