Commit e238b100 authored by BujarMuharemi's avatar BujarMuharemi
Browse files

small fixes

parent aabf5e17
var coordinatesBB = []
var url = "https://simstadt-api.iaf-ex.hft-stuttgart.de:8080/workflow/execute"
//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 buildingFunctionSort
var constructionYearSortPick
......@@ -25,7 +27,7 @@ async function fetchDataJSON() {
"rightLng": rightLng, //9.175336684,
"topLat": topLat //48.7822869656
},
// "cityGMLRef": "campus",
"cityGMLRef": "campusLOD2",
"interestedAttributes": [
"uValue",
"volume",
......
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjM5YzFjNC03NWNmLTQ2M2YtOWJiNC0xODNmMTY2ZjkwNTkiLCJpZCI6MzY3NjEsImlhdCI6MTYwMzk4NTU3Nn0.G3fnwzZ50towP1Nv9goyvu0JxJW5GtiudTR7X67Zo84';
var roofTiles= ["PolyIDGeo755601","PolyIDGeo787622","PolyIDGeo135906","PolyIDGeo534180","PolyIDGeo1597157","PolyIDGeo1628130","PolyIDGeo570789","PolyIDGeo206785","PolyIDGeo785307","PolyIDGeo1096586","PolyIDGeo25714307","PolyIDGeo772461","PolyIDGeo25430590"];
var viewer = new Cesium.Viewer('cesiumContainer', {
homeButton: false,
baseLayerPicker: false,
navigationHelpButton: false,
timeline: false,
timeline: true,
animation: false,
sceneModePicker: false,
geocoder: false,
......@@ -137,6 +140,35 @@ viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
}
}
//TODO: add roof selection
else if(document.getElementById("roof").checked){
tileContent.forEach(t => {
if (t === pickedFeature) {
console.log(t.getProperty("gml_id"));
console.log(t);
}
roofTiles.forEach(rt =>{
if(t.getProperty("gml_id")===rt){
var a = Math.floor(Math.random() * 3);
if(a==1){
t.color = Cesium.Color.RED;
}else if(0){
t.color = Cesium.Color.YELLOW;
}else{
t.color = Cesium.Color.GREEN;
}
}
})
});
}
else {
// A feature was picked, so show it's overlay content
......
......@@ -36,6 +36,7 @@
</style>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js" integrity="sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- TODO: maybe add this to a external js file -->
<script type="text/javascript">
var arrLang = {
'en': {
......@@ -211,7 +212,7 @@
</div>
<div class="hilfe">
<p> <a href="/public/pdf/Benutzerhandbuch.pdf" target="_blank"><button class="lang" id="Handbuch" key="userguide">User Guide</button></a></p>
<p> <a href="/pdf/Benutzerhandbuch.pdf" target="_blank"><button class="lang" id="Handbuch" key="userguide">User Guide</button></a></p>
</div>
<!--Sidebar-->
......@@ -244,6 +245,11 @@
<input id="surface" type="radio" name="credit-card" value="surface">
<div class="lang" key="surfaceview">Surface-View</div>
<label class="drinkcard-cc surface" for="surface"></label>
<input id="roof" type="radio" name="credit-card" value="roof">
<div class="lang" key="roofview">Roof-View</div>
<label class="drinkcard-cc surface" for="roof"></label>
</div>
</div>
<!--Chartbutton-->
......
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