Solved! Go to Solution.
function createMapMenu() { // Creates right-click context menu for map ctxMenuForMap = new dijit.Menu({ onOpen: function (box) { currentLocation = getMapPointFromMenuPosition(box); var infoTemplate = new esri.InfoTemplate(); identifyParams.geometry = currentLocation; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function (response) { eturn dojo.map(response, function (result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if (result.layerName === 'LayerOfInterest') { //This can get you the list of attributes feature.attributes; } return feature; }); }); } });
function createMapMenu() { // Creates right-click context menu for map ctxMenuForMap = new dijit.Menu({ onOpen: function (box) { currentLocation = getMapPointFromMenuPosition(box); var infoTemplate = new esri.InfoTemplate(); identifyParams.geometry = currentLocation; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function (response) { eturn dojo.map(response, function (result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if (result.layerName === 'LayerOfInterest') { //This can get you the list of attributes feature.attributes; } return feature; }); }); } });