AnsweredAssumed Answered

How can I capture attribute values in a variable?

Question asked by ghaskett on Mar 11, 2015
Latest reply on Feb 25, 2016 by geohaskett

I have a simple map built using the latest version of JavaScript API.


The map is initially opened by passing parameters, thus allowing the map to open in the desired area.  The end user will then pan and zoom to the precise area in question and click on the map.  Upon releasing the mouse, I would like to capture various attribute data associated to where that click interests a certain layer.  I have managed to capture the Lat and Long coordinates, and can display the desired values within the default popup window.  However I need to properly access the attribute of the layer in question and capture these values in a variable.  The variables will then be used to create a JSON object that another application consumes.


What is the best way to go about this?  Do I get the information from my popup window for my feature layer, is there an object already associated with the popup, or do I somehow use a different approach?


Any help would be greatly appreciated.