AnsweredAssumed Answered

Spatial reference for Geoprocessing Task

Question asked by ccgage on Jun 14, 2016
Latest reply on Jun 14, 2016 by KEkenes-esristaff

I am using the JS 4.0 API and am trying to get the return result from an asynchronous service, but I keep getting the error:

TypeError: d.spatialReference is undefined

on the result.

When I created the GP task I set the output spatial reference to that of the base map ...

gp = new Geoprocessor(testURL);

  gp.outSpatialReference = {

  wkid: 102100

  };

However, when I try to get the result image, I get the error stating that spatialReference is undefined.  I am getting the result as follows:

var resultImage = gp.getResultImageLayer(result.jobId, "myImage", imageParams);

 

Is there any way to force or set the spatialReference on the return result image?  Maybe in the "imageParams"?  But the docs on imageParameters don't really seem to say that I can set the spatialReference.  Is it possible?

 

Thanks,

Charlie

Outcomes