Commit 72aad392 authored by Muharemi's avatar Muharemi
Browse files

added descriptions to TODOs

parent b1a534a8
var coordinatesBB = []
//var url = "https://simstadt-api.iaf-ex.hft-stuttgart.de:8080/workflow/execute" //old link
var url = "http://vm24.fkc.hft-stuttgart.de:8080/workflow/execute"
var url = "http://vm24.fkc.hft-stuttgart.de:8080/workflow/execute" // URL to API
var buildingFunctionSort
......@@ -55,8 +55,8 @@ async function fetchDataJSON() {
}
document.getElementById("loader").style.visibility = "hidden"
/*TODO: -use local test data
-no connection handeling
/*TODO#1: -get current data from the api and create local test data (apiData foler)
-add connection handeling (error messages when there isnt a connection and then using the local test data)
*/
function processData() {
console.log(coordinatesBB)
......@@ -289,15 +289,16 @@ window.onclick = function (event) {
}
//-------------------------------------------------------------------------------
var tileData = null
var tileset = null
var tileData = null;
var tileset = null;
var tilesetURL = 'http://vm24.fkc.hft-stuttgart.de:8081/CampusLOD2/CityModel/tileset.json';
var localTestTileset = '/3dclient4simstadtapi/public/test/tileset/gmlTileset_v1.json';
//fetching the tileset and handling the connection
// TODO: cancel timemout when there isnt a connection
// TODO#2: add a timemout when there isnt a connection (1sec) -> so the user doesnt have to wait 10sec for the failed fetch
async function fetchTileset(){
fetch(tilesetURL).then((response)=>{
if(response.status >= 200 && response.status<=299){ //successful connection
//const tilesetJSON = response.json();
......@@ -313,32 +314,35 @@ async function fetchTileset(){
swal("Could not connect to Server",errorString , "error");
console.log("Using local test data");
loadAndZoomTime(localTestTileset); //TODO: fix loading local data
});
swal({text:"Connecting to Server ... Please wait !",icon:"info" ,buttons: false}); //displays waiting alert
loadAndZoomTime(localTestTileset); //TODO#3: fix the link so the local tileset can be loaded
})
//swal({text:"Connecting to Server ... Please wait !",icon:"info" ,buttons: false}); //displays waiting alert
}
//loads tileset after submit button is clicked
/*
FIXME: -load the models but the are in the too high in the "air"
-building view doesn´t work because all buildings are grouped together
-surfaces are also broken
NOTE #1: -load the models but the are in the too high in the "air"
-building view doesn´t work because all buildings are grouped together
-surfaces are also broken
-->this fixme is the problem of the backendteam !
? maybe add old menu back and the option to also load the new ones
*/
function loadTileset() {
viewer.scene.primitives.remove(tileset)
tileContent = []
viewer.scene.primitives.remove(tileset);
tileContent = [];
modal.style.display = "block";
fetchTileset();
//var userurl = document.getElementById("3Durl").value; //returns the chosen area from the dropdown
}
//loads the tileset from the url into the cesium viewer and zooms to it
function loadAndZoomTime(url){
tileset=viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: url
......
Markdown is supported
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