Auto-populating the InfoBox with default behaviour when feature picking

Hi, I’ve implement feature picking as outlined in the feature picking sandcastle example: Cesium Sandcastle

After highlighting a picked object the example shows how to get each individual property from a 3DTile. Instead of doing that manually is it possible to call an existing function to invoke the default behaviour on left click which auto-populates the infobox?

  // Save the selected feature's original color
  if (pickedFeature === highlighted.feature) {
    Cesium.Color.clone(highlighted.originalColor, selected.originalColor);
    highlighted.feature = undefined;
  } else {
    Cesium.Color.clone(pickedFeature.color, selected.originalColor);
  }
  // Highlight newly selected feature
  pickedFeature.color = Cesium.Color.ORANGE;
  <WHAT FUNCTION / PROPERTY TO CALL OR REFERENCE HERE>
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);

I’ve looked at the InfoBox.js script and documentation but I’m still unsure what I need to do to make it follow the default left-click behaviour. If you could suggest how to proceed that would be much appreciated.

Hi @virtualarchitectures,

The viewer.selectedEntity property controls what is currently shown in the infobox. If that is not overriden, it should show a list of feature properties by default: