Commit fb79964a authored by Kolokolnikova's avatar Kolokolnikova
Browse files

-updated api data(buildinginformationdata)

-timeout for local api data load added
parent 0258c397
......@@ -103,16 +103,15 @@ function processData() {
shadowdata = response ;
}).catch((error)=>{ //catching the error(no connection)/ timeout and displaying an alert for the user
swal({text:"Could not connect to Server. Using now: local data",icon:"info" } );
console.log("Using local test data");
//loadLocalAPIshadowData here...
})
fetchDataJSON().then(data => {
calculateData(data);
}).catch(() => {
console.log("wird nix")
timeout(1000, fetchDataJSON()).then((response)=>{
calculateData(response);
}).catch((error) => {
console.log(error)
fetch("/3dclient4simstadtapi/public/test/APIdata/buildingInformation.json")
.then(response => response.text())
.then(text => calculateData( JSON.parse(text)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment