You have two choices for drawing the data output by a geoprocessing task:
- The client can view the result with a map service.
- The client draws the data.
Drawing results with a map service
When publishing a geoprocessing service, you can choose to view the result of your task as a map (in addition to any other results of your task). The map is created on the server using ArcMap, then transported back to the client. The symbology, labeling, transparency, and all other properties of the returned map are the same as the output layer in your current ArcMap session. The workflow to create a result map service is:
- Run your tool to create a result in the Result window. Any data created by your tool will be added to the ArcMap table of contents as a layer.
- Change the symbology of layers that are the output of your tool.
- Right-click the result and share as a geoprocessing service.
- In the Service Editor, click Parameters and enable View result with a map service.
When your task completes, new data is created, and the map service will draw the data using the symbology you defined in the output layer. If your output layer is drawing unique values, you may need to uncheck <all other values> in the layer properties to force recalculation of the unique values prior to drawing. If your output layer is classifying data into ranges, you may want to use a manual classification so that your data isn't reclassified. See the topic Creating a layer symbology file for more details about controlling how unique values and class breaks are handled when layers are redrawn with new data.
Client display of data
If you don't use a result map service as described above, the client is responsible for drawing the results. There are two broad categories of clients:
- ArcMap clients.
- Web applications built with the JavaScript, SilverLight, or Flex APIs.
ArcMap clients
For ArcMap clients, two pieces of information are sent by your task: the data and a layer drawing description. The layer drawing description contains most of the information you specify on the Symbology tab of a layer's Properties dialog box:
- How to classify data (unique values, graduated colors or symbols, and so on) and what symbols to use for each class.
- The transparency, brightness, and contrast for the layer on the Display tab of the Layer Properties dialog box. Transparency is available for both feature and raster layers. Brightness and contrast are only available for raster layers.
The layer drawing description is created using the same techniques you use for symbolizing the outputs of models or scripts; by creating a layer file (.lyr) and associating it with the output of your tool. See the topics below for more information.
Web applications
Web applications built with the JavaScript, SilverLight, or Flex APIs are responsible for drawing all results.