Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

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.

What could be the reason? I am using ArcServer 10.

share|improve this question
add comment

2 Answers

< so I just deleted my previous answer - it looks like your raster isn't a "world" extent. After clicking inside Az it ran succesfully...my 1st suggestion is to either explain where you can click or limit the extent of your web app >

My new guess at the problem - your code is looking to add an ImageLayer as a result? Your final output in the service returns features.

You'll either need to change the code to get/draw features or turn on the Result Map Server.

If you turn on the result map server, then this sample should help Else, look at this sample and code to help draw.

 function drawViewshed(results, messages) {
        var polySymbol = new esri.symbol.SimpleFillSymbol();
        polySymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,0,0,0.5]), 1));
        polySymbol.setColor(new dojo.Color([255,127,0,0.7]));
        var features = results[0].value.features;
        for (var f=0, fl=features.length; f<fl; f++) {
          var feature = features[f];
          feature.setSymbol(polySymbol);
          map.graphics.add(feature);
        }
      }
share|improve this answer
add comment

I had this issue when building gp services on 10.0 ArcGIS Server. The fix for me was to set the the script tool to have an output parameter. Assign the results to of your final result in your python script to that parameter. Similar to how you assign the results to a script to have it added to ArcMap once the script tool is finished processing in ArcMap.

If I remember correctly you should be able to test this by looking at the jobid rest endpoint for that gp request. It should have your data.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.