Solved! Go to Solution.
You should be able to identify a raster simply by publishing it as map service, and identifying with a point. I do it with LiDAR data sets to get spot elevations, and to generate profiles by creating points along a line and using the results with dojox/charting to visualize it.
Identify returns pixel value and stretched value (0-255).
function mapReady(map){ dojo.connect(map,"onClick", executeIdentifyTask); //create identify tasks and setup parameters identifyTask = new esri.tasks.IdentifyTask("http://.../rest/services/atlantic/Atlantic/MapServer"); identifyParams = new esri.tasks.IdentifyParameters(); identifyParams.tolerance = 1; identifyParams.returnGeometry = true; identifyParams.layerIds = [0]; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_TOP; } //fundio executeIdentifyTask function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; identifyTask.execute(identifyParams,function(idResults) { alert(idResults[0]['pixel value']); }); };
Why is the layerName empty when you do an identify on a raster layer?? The layerId is populated correctly.