mriaz1

Identify Task on Point/Line Features

Discussion created by mriaz1 on May 18, 2010
Latest reply on May 18, 2010 by digy79
Hi Guys,

I want the user to click on a point/line feature on the map and display the feature's attributes in a grid. I am using Identify Task to perform this action but for some reason no attributes are being returned. My code snippet is below:

var identifyTask = new esri.tasks.IdentifyTask("Rest API URL");
var identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [10];
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.width  = map.width;
identifyParams.height = map.height;
identifyTask.execute(identifyParams,results);

I am not sure what I am doing wrong, any comments/ideas would be appreciated.

Thanks!

Outcomes