Working with the GeoprocessingTask control


In this topic


Geoprocessing input types

The user interface (UI) for the GeoprocessingTask control cannot be customized. To create a custom UI in a task control, create the Web task and code logic to work with a geoprocessing service. Geoprocessing services can be utilized outside a Web task. For more information on working with geoprocessing in your application, see the following topics:
The following table shows the UI for the data types available as inputs to a geoprocessing model. The type name is used as the name of the input variable for demonstration purposes. If a type is not listed, it is not supported as an input parameter for a geoprocessing model in a service.
Model data type
Web control displayed
Example
Web ADF type for input
Boolean
Check box
GPBoolean
Date
Text box
GPDate
Double
Text box
GPDouble
Feature layer
Text box
GPString
Feature set
Interactive dialog box
GPFeatureGraphics
File
Select file dialog box
File-upload button in geoprocessing task 
GPDataFile
Layer
Text box
GPString
Linear unit
Text box and drop-down
list for unit type
GPLinearUnit
Long
Text box
GPLong
Raster layer
Text box
GPString
Record set
Interactive dialog box
GPDataTable
Table view
Text box
GPString
String
Text box
GPString

Tool symbology support

Geoprocessing tools often maintain a set of inputs and outputs associated with features rendered on a map. For example, a tool can have a FeatureSet input requiring that a point, line, or polygon be provided as input before executing the tool.   
A tool can also generate output as a feature class containing features to be rendered on a map. When using the GeoprocessingTask with a geoprocessing resource (tool) that requires a FeatureSet input, the Web Application Developer Framework (ADF) is always responsible for rendering the input features using Web ADF graphics. 
Output results can be rendered using a map service buddied with the geoprocessing service that contains the tool. If the map service is available and the GeoprocessingTask DrawResultsOnServer property is set to true, the map service is used to draw the results. If drawn by the map service, rendering and symbology associated with output results are defined in the map document offering complete access to ArcMap and ArcObjects rendering capabilities. If a map service is not available or the DrawResultsOnServer property is set to false, the Web ADF is responsible for drawing results using Web ADF graphics.   
The tool can define the symbology for the input and output features. If defined, the Web ADF must support the symbology. Renderers and symbology are limited in the Web ADF; therefore, pay careful attention to the structure and properties of the input and output symbology.  
The following are the parameters to consider when defining a symbol or renderer for features in a tool—symbol layers, and symbol and renderer properties.   

Symbol layers

The Web ADF only supports single layer symbols when drawing input and output features. The number of layers can be defined in ArcMap on the Symbol Property Editor dialog box for a feature layer. 
For the Web ADF to render input or output features on the client (using Web ADF graphics), only one layer can be specified. If a multi-layer symbol is used to define input or output features to be rendered on the client, the Web ADF uses a simple renderer or symbol, and randomly selects a color.
The following screen shots show the difference between a single layer symbol and a multi-layer symbol. The highlighted area on each dialog box indicates if you have a single layer symbol (one layer listed) or a multi-layer symbol (more than one layer listed): 

Symbol and renderer properties

Symbol and renderer properties can be defined for a set of input or output features in a geoprocessing tool. Since the Web ADF uses the ArcGIS Server Simple Object Access Protocol (SOAP) application programming interface (API) to interact with ArcGIS Server geoprocessing services and the tools they contain, the capabilities of the SOAP API can limit the information available to the Web ADF. 
Web ADF graphic layer rendering and symbology is limited by the capabilities of working with Graphical Device Interface (GDI+) in .NET. This means that only specific renderer and symbol properties on geoprocessing tool input and output layers are supported by Web ADF graphics layers.  
Since the SOAP API dictates the level of access to ArcGIS Server renderer and symbol properties, the following table shows the supported symbols and renderer types, and properties in the SOAP API. Each type and property corresponds to a type and property setting on the Symbol Property Editor dialog box or the Layer Properties, Symbology tab in ArcMap. 
If a type or property is not shown, it is not supported. If using an unsupported type, the Web ADF uses a simple renderer or symbol, and randomly selects a color. If using a supported type (with single layer symbols), the Web ADF ignores any properties that are not supported.
Symbol or renderer type
Property
Comments
SimpleMarkerSymbol
Style
 
 
 
 
Color
Outline
OutlineColor
OutlineSize
Size
XOffset
YOffset
The following styles are supported:
Circle
Cross
Square
 
 
 
 
Always set to 1 point
PictureMarkerSymbol
Color
Picture
XOffset
YOffset
 
CharacterMarkerSymbol
CharacterIndex
Color
FontName
Size
XOffset
YOffset
 
SimpleLineSymbol
Style
 
Color
Width
The following style is supported:
Solid
SimpleFillSymbol
Style
Color
Outline
 
 
Limited by SimpleLineSymbol properties.
RasterFillSymbol
Color
Picture
 
SimpleRenderer
Symbol
 
ClassBreaksRenderer
Field
 
 
MinimumValue
Only fields convertible to double are supported. Other data types are not supported.
UniqueValueRenderer
Field1
 
Field2
 
 
Field3
DefaultSymbol
DefaultLabel
FieldDelimiter
UniqueValueInfos
 
 
Only field types convertible to string are supported. Other data types are not supported.


See Also:

GeoprocessingTask control
Geoprocessing resources
Tasks and the Web ADF
Creating a custom task
Manager integration