I have an ArcGIS Experience Builder application, which uses a Web Map I host in ArcGIS online. This Web Map contains a feature layer with several attributes, and I can use these in Experience Builder with the stock widgets (i.e. updating dynamic text based on attributes when the user clicks on a certain feature). I am now trying to write a custom widget using Jimu which displays some text when the user clicks on a feature:
jmv.view.on('click', evt => {
const point: Point = jmv.view.toMap({
x: evt.x,
y: evt.y
})
jmv.view.hitTest(evt).then((response) => {
console.log(response.results[0].graphic.attributes)
// Do things with the attributes of the clicked feature
})
})However, this code only returns the `ObjectID` attribute of the clicked feature, and none of the others. How do I access the rest of the features?