Settings: new json model structure
This commit is contained in:
parent
0c044c7b81
commit
2d47c2ed1b
10 changed files with 149 additions and 100 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue