AnsweredAssumed Answered

Retrieve attributes of a feature when clicked

Question asked by greenkarmic on May 22, 2012
Latest reply on May 24, 2012 by greenkarmic
Hi,

Here is a screenshot of my map, where a feature in the map is clicked and an InfoTemplate is displaying the attributes for that feature.

[ATTACH=CONFIG]14527[/ATTACH]

What I want to do is when I click one of the buttons in my InfoTemplate, I want to save the attributes of the feature I just clicked moments before. How do I know what feature I just clicked?


One idea I had was maybe assign a click handler for the layer graphics, but since the features are obtained from a REST map service (which is an asynchronous request) I cannot figure out when to make this assignment since I don't know exactly when the graphics have all been added to the map.

Thanks

Outcomes