I am having an issue obtaining attribute data off of a raster layer from my map service. The attribute data is retrieved but when I call attributes in the code, it claims it is undefined. If I call idResults[0].value, I get the value of -1842.
This is the code trying to obtain the attributes and returns nothing. Calling idResults[0].attributes produces undefined:
identifyTask.execute(identifyParams, function(idResults){
alert(idResults[0].attributes['Pixel Value']);
});
The identify task returns:
{"results":[{"layerId":0,"layerName":"phm_7605_wma","value":"-1842","displayFieldName":"","attributes":{"Class value":"359","Pixel Value":"-1842","Rowid":"2172","COUNT":"7277"},"geometryType":"esriGeometryPoint","geometry":{"x":-10942189.7542115,"y":4446207.90340335,"spatialReference":{"wkid":102100}}}]}
Any ideas?