Commit 5d0b0145 authored by JOE XMG's avatar JOE XMG
Browse files

update

parent d10371dc
Pipeline #6971 passed with stage
in 11 seconds
...@@ -127,7 +127,7 @@ var load_utility_line = function () { ...@@ -127,7 +127,7 @@ var load_utility_line = function () {
entity.polyline.classificationType = Cesium.ClassificationType.TERRAIN; entity.polyline.classificationType = Cesium.ClassificationType.TERRAIN;
entity.polyline.material = Cesium.Color.HOTPINK; entity.polyline.material = Cesium.Color.HOTPINK;
} }
$("#util_nw_line_loading").hide() $("#util_nw_line_loading").hide()
}) })
} else { } else {
...@@ -156,23 +156,23 @@ for (let i = 0; i < utility_point.length; i++) { ...@@ -156,23 +156,23 @@ for (let i = 0; i < utility_point.length; i++) {
name: nameub, name: nameub,
position: Cesium.Cartesian3.fromDegrees(lonub, latub), position: Cesium.Cartesian3.fromDegrees(lonub, latub),
description: "Handle: " + nameub, description: "Handle: " + nameub,
point : { point: {
pixelSize : 5, pixelSize: 5,
color : Cesium.Color.RED, color: Cesium.Color.RED,
outlineColor : Cesium.Color.WHITE, outlineColor: Cesium.Color.WHITE,
outlineWidth : 2, outlineWidth: 2,
heightReference: "CLAMP_TO_GROUND", heightReference: "CLAMP_TO_GROUND",
show: false, show: false,
}, },
label : { label: {
text : "Handle: " + nameub, text: "Handle: " + nameub,
font : '14pt monospace', font: '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE, style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth : 2, outlineWidth: 2,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
heightReference: "CLAMP_TO_GROUND", heightReference: "CLAMP_TO_GROUND",
show: false, show: false,
pixelOffset : new Cesium.Cartesian2(0, -9) pixelOffset: new Cesium.Cartesian2(0, -9)
}, },
// billboard: { // billboard: {
// image: pinBuilder.fromMakiIconId('bus', Cesium.Color.ORANGE.withAlpha(0.7), 60), // image: pinBuilder.fromMakiIconId('bus', Cesium.Color.ORANGE.withAlpha(0.7), 60),
...@@ -197,23 +197,39 @@ for (let i = 0; i < utility_point.length; i++) { ...@@ -197,23 +197,39 @@ for (let i = 0; i < utility_point.length; i++) {
// ); // );
var building_style = [] var building_style = []
var load_building_part_simstadt = false
var addBuilding = function () { var addBuilding = function () {
try { try {
tileset_3Dbuildings = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ if (load_building_part_simstadt) {
url: 'https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city/tileset.json', tileset_3Dbuildings = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
maximumScreenSpaceError: 8 // default value url: 'https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city/tileset.json',
maximumScreenSpaceError: 8 // default value
}));
tileset_3Dbuildings.readyPromise.then(function () {
var boundingSphere = tileset_3Dbuildings.boundingSphere;
var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 50);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
tileset_3Dbuildings.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
});
}
tileset_3Dbuildings_full = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city_function/tileset.json',
maximumScreenSpaceError: 8,
})); }));
} catch (err) { } catch (err) {
console.log('-> add 3DTiles failed!\n' + err); console.log('-> add 3DTiles failed!\n' + err);
} }
tileset_3Dbuildings.readyPromise.then(function () {
var boundingSphere = tileset_3Dbuildings.boundingSphere; tileset_3Dbuildings_full.readyPromise.then(function () {
var boundingSphere = tileset_3Dbuildings_full.boundingSphere;
var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center); var cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 50); var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 50);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
tileset_3Dbuildings.modelMatrix = Cesium.Matrix4.fromTranslation(translation); tileset_3Dbuildings_full.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
}); });
// Styling the 3d model // Styling the 3d model
building_style["AllWhite"] = new Cesium.Cesium3DTileStyle({ building_style["AllWhite"] = new Cesium.Cesium3DTileStyle({
...@@ -231,7 +247,7 @@ var addBuilding = function () { ...@@ -231,7 +247,7 @@ var addBuilding = function () {
// color: "color('#ffffff',0.25)" // color: "color('#ffffff',0.25)"
"color": { "color": {
"conditions": [ "conditions": [
["true", "color('#ffffff', 0.5)"] ["true", "color('#ffffff', 0.75)"]
] ]
} }
}); });
...@@ -280,7 +296,7 @@ var addBuilding = function () { ...@@ -280,7 +296,7 @@ var addBuilding = function () {
] ]
} }
}); });
tileset_3Dbuildings.style = building_style["AllWhite"]; tileset_3Dbuildings_full.style = building_style["AllWhite"];
}; };
addBuilding(); addBuilding();
...@@ -383,6 +399,25 @@ $('#BuildingStyleSelector').on('change', function () { ...@@ -383,6 +399,25 @@ $('#BuildingStyleSelector').on('change', function () {
console.log(`No ${this.value} Style in the html`) console.log(`No ${this.value} Style in the html`)
} }
}); });
$('#BuildingFunctionStyleSelector').on('change', function () {
// alert(this.value);
tileset_3Dbuildings_full.style = new Cesium.Cesium3DTileStyle({
color: {
conditions: [
["${citygml_function} === '"+ this.value +"'", "color('red')"],
["true", "color('white')"],
],
},
});
// $('.cesiumLegend').hide()
// try {
// $(`#${this.value}-legend`).show()
// // draw Chart
// activateChart(this.value);
// } catch (error) {
// console.log(`No ${this.value} Style in the html`)
// }
});
$("#shadow_check").change(function () { $("#shadow_check").change(function () {
if (this.checked) { if (this.checked) {
...@@ -413,6 +448,4 @@ $("#util_nw_point").change(function () { ...@@ -413,6 +448,4 @@ $("#util_nw_point").change(function () {
utility_Point_Entities[i].label.show = false; utility_Point_Entities[i].label.show = false;
} }
} }
}); });
\ No newline at end of file
...@@ -78,7 +78,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick( ...@@ -78,7 +78,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
selected.feature = undefined; selected.feature = undefined;
$("#attribute-table-area").html("") // refresh the attribute table area $("#attribute-table-area").html("") // refresh the attribute table area
$("#chart_intro").hide() // hide chart title $("#chart_intro").hide() // hide chart title
$("#chart_area").hide() // hide chart title
$("#sensor-hint").show()
} }
// Pick a new feature // Pick a new feature
const pickedFeature = viewer.scene.pick(movement.position); const pickedFeature = viewer.scene.pick(movement.position);
...@@ -120,7 +121,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick( ...@@ -120,7 +121,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
} }
} }
table_attribute_html = ` table_attribute_html = `
<h5>Attribute Table</h5> <h5> <i class="bi bi-card-list"></i> Attribute Table</h5>
<table class="table"> <table class="table">
<tbody> <tbody>
${attribute_text} ${attribute_text}
...@@ -197,6 +198,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick( ...@@ -197,6 +198,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
} }
] ]
$("#chart_intro").show() $("#chart_intro").show()
$("#chart_area").show()
$("#sensor-hint").hide()
drawChart(inputx, inputy_vor_vs_rueck, "line", "#chart_area","","Temperature") drawChart(inputx, inputy_vor_vs_rueck, "line", "#chart_area","","Temperature")
} }
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-12 col-lg-3"> <div class="col-12 col-lg-3">
<div class="card"> <div class="card">
...@@ -140,19 +140,112 @@ ...@@ -140,19 +140,112 @@
</label> </label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="util_nw_Enisyst" checked> <input class="form-check-input" type="checkbox" value="" id="util_nw_Enisyst"
checked>
<label class="form-check-label" for="util_nw_Enisyst"> <label class="form-check-label" for="util_nw_Enisyst">
Utility Network Stations (Enisyst) Utility Network Stations (Enisyst)
</label> </label>
</div> </div>
<hr> <hr>
<h6>Building Style</h6> <div style="display: none;">
<h6>Building Style</h6>
<select class="form-select" id="BuildingStyleSelector"> <select class="form-select" id="BuildingStyleSelector">
<option value="AllWhite" selected>Default</option> <option value="AllWhite" selected>Default</option>
<option value="transparent">Transparent</option> <option value="transparent">Transparent</option>
<option value="PVPotential">PV Potential</option> <option value="PVPotential">PV Potential</option>
<option value="PVSpecificYield">PV Specific Yield</option> <option value="PVSpecificYield">PV Specific Yield</option>
</select>
</div>
<h6>Building Function</h6>
<select class="form-select" id="BuildingFunctionStyleSelector">
<option value="AllWhite" selected>Select One</option>
<option value='31001_1010'>Wohnhaus | Residential building</option>
<option value='31001_1020'>Wohnheim | Residential home</option>
<option value='31001_1022'>Seniorenheim | Retirement home</option>
<option value='31001_1121'>Wohn- und Verwaltungsgebäude | Residential and
administrative building</option>
<option value='31001_1122'>Wohn- und Bürogebäude | Residential and office
buildings</option>
<option value='31001_1123'>Wohn- und Geschäftsgebäude | Residential and
commercial buildings</option>
<option value='31001_1131'>Wohn- und Betriebsgebäude | Residential and farm
buildings</option>
<option value='31001_1222'>Wohn- und Wirtschaftsgebäude | Residential and farm
building</option>
<option value='31001_1312'>Wochenendhaus | Weekend house</option>
<option value='31001_1313'>Gartenhaus | Garden house</option>
<option value='31001_2020'>Bürogebäude | Office building</option>
<option value='31001_2050'>Geschäftsgebäude | Business building</option>
<option value='31001_2055'>Kiosk | Kiosk</option>
<option value='31001_2071'>Hotel, Motel, Pension | hotel, motel, boarding house
</option>
<option value='31001_2072'>Jugendherberge | Youth hostel</option>
<option value='31001_2074'>Campingplatzgebäude | Campsite building</option>
<option value='31001_2081'>Gaststätte, Restaurant | pub, restaurant</option>
<option value='31001_2090'>Freizeit- und Vergnügungsstätte | Recreation and
amusement center</option>
<option value='31001_2111'>Fabrik | Factory</option>
<option value='31001_2112'>Betriebsgebäude | Factory building</option>
<option value='31001_2120'>Werkstatt | Workshop</option>
<option value='31001_2130'>Tankstelle | Gas station</option>
<option value='31001_2140'>Gebäude für Vorratshaltung | building for storage
</option>
<option value='31001_2461'>Parkhaus | Parking garage</option>
<option value='31001_2463'>Garage | Garage</option>
<option value='31001_2501'>Gebäude zur Energieversorgung | Energy supply
building</option>
<option value='31001_2513'>Wasserbehälter | Water tank</option>
<option value='31001_2523'>Umformer | Converter</option>
<option value='31001_2611'>Gebäude der Kläranlage | Building for sewage
treatment plant</option>
<option value='31001_2612'>Toilette | Toilet</option>
<option value='31001_2721'>Scheune | Barn</option>
<option value='31001_2723'>Schuppen | Shed</option>
<option value='31001_2724'>Stall | Stable</option>
<option value='31001_2726'>Scheune und Stall | Barn and stable</option>
<option value='31001_2729'>Wirtschaftsgebäude | Farm building</option>
<option value='31001_2740'>Treibhaus, Gewächshaus | Greenhouse, greenhouse
</option>
<option value='31001_3010'>Verwaltungsgebäude | Administration building</option>
<option value='31001_3012'>Rathaus | City hall</option>
<option value='31001_3013'>Post | Post office</option>
<option value='31001_3015'>Gericht | Court</option>
<option value='31001_3021'>Allgemein bildende Schule | General education school
</option>
<option value='31001_3023'>Hochschulgebäude (Fachhochschule, Universität) |
University building (technical college, university)</option>
<option value='31001_3034'>Museum | Museum</option>
<option value='31001_3036'>Veranstaltungsgebäude | Event building</option>
<option value='31001_3041'>Kirche | Church</option>
<option value='31001_3043'>Kapelle | Chapel</option>
<option value='31001_3044'>Gemeindehaus | Community center</option>
<option value='31001_3051'>Krankenhaus | Hospital</option>
<option value='31001_3062'>Freizeit-, Vereinsheim, Dorfgemeinschafts-,
Bürgerhaus | recreation center, clubhouse, village hall, community center
</option>
<option value='31001_3065'>Kinderkrippe, Kindergarten, Kindertagesstätte | Day
nursery, kindergarten, day care center</option>
<option value='31001_3071'>Polizei | Police</option>
<option value='31001_3072'>Feuerwehr | Fire department</option>
<option value='31001_3075'>Justizvollzugsanstalt | Correctional facility
</option>
<option value='31001_3080'>Friedhofsgebäude | Cemetery building</option>
<option value='31001_3090'>Empfangsgebäude | Reception building</option>
<option value='31001_3210'>Gebäude für Sportzwecke | Building for sports
purposes</option>
<option value='31001_3211'>Sport-, Turnhalle | Sports hall, gymnasium</option>
<option value='31001_3220'>Badegebäude | Building for bathing</option>
<option value='31001_3221'>Hallenbad | Indoor swimming pool</option>
<option value='31001_3281'>Schutzhütte | Shelter</option>
<option value='51001_1002'>Kirchturm | Church tower</option>
<option value='51001_1008'>Sende-,Funkturm | broadcasting tower, radio tower
</option>
<option value='51003_1201'>Silo | Silo</option>
<option value='51003_1205'>Tank | Tank</option>
<option value='51007_1400'>Befestigung (Burgruine) | Fortification (castle
ruins)</option>
<option value='51007_1510'>Stadtmauer | City wall</option>
<option value='51009_1610'>Überdachung | Roofing</option>
</select> </select>
<div class="form-check pt-2"> <div class="form-check pt-2">
<input class="form-check-input" type="checkbox" value="" id="shadow_check"> <input class="form-check-input" type="checkbox" value="" id="shadow_check">
...@@ -160,32 +253,33 @@ ...@@ -160,32 +253,33 @@
Building Shadow Building Shadow
</label> </label>
</div> </div>
<hr> <hr>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<section class="row"> <section class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<h4><i class="bi bi-graph-up"></i> Sensor</h4> <h4><i class="bi bi-graph-up"></i> Sensor</h4>
<p id="sensor-hint"> Click on the utility network station (Enisyst) on the 3D Map to see
</div> sensor data.</p>
<div class="card-body"> </div>
<div id="attribute-table-area"> <div class="card-body">
<p> Click on the utility network station (Enisyst) on the 3D Map to see sensor data.</p> <div id="attribute-table-area">
</div>
<div id="chart_area"></div>
</div> </div>
<div id="chart_area"></div>
</div> </div>
</div> </div>
</div>
</section> </section>
</div> </div>
......
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