Select to view content in your preferred language

Unable to fetch the results from GP Service Toolbox

545
1
12-05-2012 04:27 PM
SmaranHarihar
Deactivated User
Ok I am really confused. I can see the output of the result from geoprocessing tool. But why am I not able to add it to the map. As you can see the result returns all the attribute values.
gp.getResultImageLayer(jobInfo.jobId,"final_shp", imageParams, function(gpLayer) {
   console.log(jobInfo.jobId);
   map.addLayer(gpLayer);
   map.graphics.clear();
}


This is my application and you will see the job id in the console. If you are not able to view the link I have added for result change the job id with the new one (in the console) that you ran and you will see the results. Executing the model, once you submit takes upto 20-25 seconds.

What could be the reason? I am using ArcServer 10.
0 Kudos
1 Reply
nicogis
MVP Alum
You haven't results because in your gp service you haven't set result map service so if you use
    gp.getResultImageLayer(jobInfo.jobId,"final_shp", imageParams, function(gpLayer) {
   console.log(jobInfo.jobId);
   map.addLayer(gpLayer);

...


it doesn't return result because you haven't map service for generate image of output gp (render server side)

You have a featureset so you can use getResultData and render client side your results
0 Kudos