GPResultImageLayer return blank imageLayer

1505
1
05-15-2012 12:31 AM
shanliu
New Contributor
I Made a GPTool which output parameter is GPFeatureRecordSetLayer. Because the result is large that I published it as ResultMapService[ATTACH=CONFIG]14324[/ATTACH

Now I test it in the silverlight application ,the return image is blank. Below is the code:
 private void button1_Click(object sender, RoutedEventArgs e)
        {

            _geoprocessorTask = new Geoprocessor("http://localhost/ArcGIS/rest/services/GP/liusFtoImage/GPServer/liusGP");

            List<GPParameter> parameters = new List<GPParameter>();

            _geoprocessorTask.SubmitJobAsync(parameters);

            _geoprocessorTask.JobCompleted += new EventHandler<JobInfoEventArgs>(_geoprocessorTask_JobCompleted);

            _geoprocessorTask.Failed += GeoprocessorTask_Failed;



        }
private void _geoprocessorTask_JobCompleted(object sender, JobInfoEventArgs e)
        {

            Geoprocessor geoprocessorTask = sender as Geoprocessor;
            geoprocessorTask.GetResultDataCompleted += (s1, ev1) =>
            {
                if (ev1.Parameter is GPFeatureRecordSetLayer)
                {
                      geoprocessorTask.GetResultImageLayerCompleted += (s2, ev2) =>
                            {
                                GPResultImageLayer gpImageLayer = ev2.GPResultImageLayer;
                                //gpImageLayer.Opacity = 0.5;
                                MyMap.Layers.Add(gpImageLayer);
                                MyMap.ZoomTo(gpImageLayer.FullExtent);
                            };

                            geoprocessorTask.GetResultImageLayerAsync(e.JobInfo.JobId, "RasterResult");
                            return;
                        
                }

            };
    
        }


And the fiddler watch the process ,the result was below [ATTACH=CONFIG]14325[/ATTACH]


Who Can tell me the reason?Thank you !
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
I think you need to click on "Response is encoded...", to see if an image had been returned in the response.
0 Kudos