I Made a GPTool which output parameter is GPFeatureRecordSetLayer. Because the result is large that I published it as ResultMapService[ATTACH=CONFIG]14324[/ATTACHNow 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 !