Hello,
My environment is the following:
- Windows 11
- Node 20.14.x
- arcgis/core 4.30.9
- react 18.3.1
I've created several SLPK files with ArcGIS Pro and uploaded them to ArcGIS Online as hosted layers. I'm rendering these layers with "@arcgis/core/layers/SceneLayer". Everything works great out of the box, however I'm trying to create a custom onclick event and having trouble retrieving layer feature attributes.
In my custom entity click callback, I can see a single value: OBJECTID. From what I've been able to gather thus far, this is the only attribute available from a scene layer to improve performance. The default Esri popup template has a process that queries an endpoint to then retrieve extra attributes to populate the displayed table. In my case, the features have 18 attributes (plus one for the OBJECTID) and default popup template makes 18 authenticated requests to fetch all 18 attributes. These requests look like "https://tiles.arcgis.com/tiles/xyzxyzxyzxyz/arcgis/rest/services/xyzxyzxyzx/SceneServer/layers/0/nodes/0/attributes/f_1/0?token=", where the "f_1" is incremented for each attribute, up to f_18.
I can't quite find the list of attributes, or the count of attributes, for a selected feature in the scene layer. Everything is obviously available since the default popup template can fetch and display the attributes, but I don't know if trying to replicate the behavior myself is the best way forward.
Is there a more proper way to achieve this feature attribute fetching in the context of a custom onclick event?
Thanks,
Jake