gasparovic

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

Discussion created by gasparovic on Oct 7, 2011
Latest reply on Oct 10, 2011 by gasparovic
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/j928b1975df17450e9c83783507015561/results/Vysledok_GP?dpi=96&transparent=true&format=png8&imageSR=102067&f=image&bbox=%7B%22xmin%22%3A-632441.7182510166%2C%22ymin%22%3A-1265352.5714890272%2C%22xmax%22%3A-124440.70224898527%2C%22ymax%22%3A-1149994.007438566%2C%22spatialReference%22%3A%7B%22wkid%22%3A102067%7D%7D&bboxSR=102067&size=1920%2C436[/HTML]
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

Outcomes