I am adding a GraphicsLayer with markers on the map and need to know which marker was clicked. How do I get a value of an attribute when I click on the marker? Thank you
const Layer1 = new GraphicsLayer({id: 'Layer1ID'});
map.add(Layer1);
const point = {
type: "point",
longitude: -80,
latitude: 25
};
const attributes = { "MarkerType": "Type1" }
const pointGraphic = new Graphic({
geometry: point,
symbol: simpleMarkerSymbol,
attributes: attributes
});
Layer1.add(pointGraphic);
view.on(""click"", e => {
alert(need to access the above attribute MarkerType);
});