Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been building a Model builder which is hosted on the ArcServer to execute a geoprocessing task which then returns the result as a Map Layer which is overlaid over the basemap. I have been using this blog to create the toolbox.

The flaw that I found was that, when the geoprocessing tool was setup with the parameters as A Map, I receive the result layer but no attribute data associated with it. I am receiving the layer using the,

gp.getResultImageLayer(jobInfo.jobId,"final_shp", imageParams, function(gpLayer) {
            map.addLayer(gpLayer);
          });

But this does not return the LayerInfo or any of the attribute details. This is the output image on ArcServer.

I also tried changing the parameters to A toolbox but even that does not return any feature attribute values and it also does not return any Map Layer. The code I am using to fetch the results is,

gp.getResultData(jobInfo.jobId,"final_shp", addResults, errResults);
function addResults(results) {
console.log(results);
var features = results.value.features;
}
function errResults(err) {
console.log(err);
}

Is this a flaw in the JavaScript API that it needs a associate MapServer to display the Map Layer. In the Flex API, we can use A toolbox and still receive the output results and the result Map Layer? In all the API examples of Geoprocessing tool, I have seen that the GPServer has a associated MapServer. Is it not possible to fetch the result Map Layer along with result attribute Info?

I am using ArcServer 10.03 and JavaScript API for my project. Pls provide a solution.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.