Settings: new json model structure

This commit is contained in:
quadbyte 2025-08-10 09:18:23 -04:00
parent 0c044c7b81
commit 2d47c2ed1b
10 changed files with 149 additions and 100 deletions

View file

@ -9,7 +9,7 @@ function getCountryCode(callback) {
return;
}
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://nominatim.openstreetmap.org/search?city="+ Settings.settings.weatherCity+"&country=&format=json&addressdetails=1&extratags=1", true);
xhr.open("GET", "https://nominatim.openstreetmap.org/search?city="+ Settings.data.location.name+"&country=&format=json&addressdetails=1&extratags=1", true);
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
var response = JSON.parse(xhr.responseText);