Skip to content

Commit

Permalink
Infotable based on layer type
Browse files Browse the repository at this point in the history
  • Loading branch information
Son-HNguyen committed Sep 27, 2024
1 parent 8c3bc32 commit 19fcb9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions 3dwebclient/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1174,8 +1174,7 @@ function createInfoTable(res, citydbLayer) {

const kvp = res[1];

const thematicDataSourceDropdown = document.getElementById("thematicDataSourceDropdown");
const selectedThematicDataSource = thematicDataSourceDropdown.options[thematicDataSourceDropdown.selectedIndex].value;
const selectedThematicDataSource = citydbLayer.dataSourceController.dataSource;

function getGmlid(kvp) {
// Search for gmlid in the result, accounting for all key names, case-insensitive
Expand Down Expand Up @@ -1227,7 +1226,10 @@ function createInfoTable(res, citydbLayer) {
gmlid["key"] = "gml_id"; // default
gmlid["value"] = cesiumEntity.name; // for KML
}
if (selectedThematicDataSource === "Embedded") {
const isEmbedded = !(selectedThematicDataSource instanceof GoogleSheets)
&& !(selectedThematicDataSource instanceof PostgreSQL)
&& !(selectedThematicDataSource instanceof OGCFeatureAPI);
if (isEmbedded) {
if (Cesium.defined(res[1])) {
displayKvp(res[1], gmlid); // embedded properties are stored here
} else {
Expand Down

0 comments on commit 19fcb9b

Please # to comment.