Select to view content in your preferred language

Geoprocessor : Gp service with result map service : getResultImageLayer : question

822
2
10-07-2011 02:10 AM
MichalGasparovic
Occasional Contributor
Hi,

here is other of the issues with the geoprocessing and the js api geoprocessor.
The first issue I'm having is described here

This is about the 'layer' being returned from the getResultImageLayer method of the geoprocessor object.
The background: I have a gp service running at the server (v10.0.2.3200), this is asynchronous service, and has a result map service assigned, so I'm expecting the server to draw the results.

Once the gp job is completed, I ask the server for the result layer via getResultImageLayer. In a callback function handling the result, I'm trying to at the 'layer' into the map, but I can't see anything. It's just empty.

Here are my questions:
- the resulting 'layer' is of declaredClass esri.layers._GPResultImageLayer, is that ok?
- the 'layer' has no layerInfo information, it's empty array, I reckon that's not ok
- the 'layer' has a URL similar to following, and I just don't think that one is correct, shouldn't it be MapServer somewhere??
[HTML]
http://someserver/ArcGIS/rest/services/GPbuffer/GPServer/Buffer GP/jobs/j928b1975df17450e9c83783507015561/results/Vysledok_GP
[/HTML]

I've noticed, that adding a layer returned from the getResultImageLayer into the map sends out the request like this one -
[HTML]http://someserver/ArcGIS/rest/services/GPbuffer/GPServer/Buffer%20GP/jobs/j928b1975df17450e9c8378350...
which ends up in 500 Internal Server error.

could someone pls shed some more light into this for me?

I've written the code by following the samples, especially the one handling the results for the gp service with result map service. it's just not working.

Thanks heaps
0 Kudos
2 Replies
nicogis
MVP Alum
here I have written in my blog about result map service:
http://nicogis.blogspot.com/2011/09/non-ti-scordar-mai-del-result-map.html (open with firefox and use translate this page)
0 Kudos
MichalGasparovic
Occasional Contributor
for anyone who runs into similar issues with gp service with result map service:
make sure you read carefully through the step-by-step instructions on the webhelp.esri.com, especially the sections : Preparing map documents containing tool layers
Our analyst forgot to run the tool so the tool layer haven't been created.
Thus the map service hasn't been returning anything.
cheers.
0 Kudos