Hello everyone,
I import a BuildingSceneLayer in a webscene and and when I click on a component of the 3d model a popup appears with information about that component. I want to access some of these information and use it. I thought it should be straightforward but I cannot seem to extract these information.
I tried with an 'on-click ' event and 'hitTest':
view.on("click", (event) => {
view.hitTest(event).then((response) => {
// check if a graphic is returned from the hitTest
if (response.results[0].graphic) {
// Create query object: by specifying objectIds, the query will return results only for
// the feature matching the graphic's objectid
const query = new Query({
attributes: [
response.results[0].graphic.attributes
],
// indicates the query should return all attributes
outFields: ["*"]
});
console.log('query', query)
}
});
});
but only the first of the entries displayed in the popup in found in 'attributes' (see attached screenshots).
Thank you in advance for the time and help.