Skip to content

Commit 19fcb9b

Browse files
committed
Infotable based on layer type
1 parent 8c3bc32 commit 19fcb9b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

3dwebclient/script.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,8 +1174,7 @@ function createInfoTable(res, citydbLayer) {
11741174

11751175
const kvp = res[1];
11761176

1177-
const thematicDataSourceDropdown = document.getElementById("thematicDataSourceDropdown");
1178-
const selectedThematicDataSource = thematicDataSourceDropdown.options[thematicDataSourceDropdown.selectedIndex].value;
1177+
const selectedThematicDataSource = citydbLayer.dataSourceController.dataSource;
11791178

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

0 commit comments

Comments
 (0)