Geoprocessing widget tags

This page describes an older version, please read about the latest version at:
http://resources.arcgis.com/en/help/flex-viewer/concepts/

Configuration file for the geoprocessing widget

The general structure of the geoprocessing widget configuration file is shown by the conceptual graphic below.

Conceptual overview of configuration options for geoprocessing widget

The file is defined by a <configuration> tag that identifies it as a configuration file for the Viewer. It supports changing the input and output parameters for most geoprocessing tasks, as well as the rendering for the returned features. It has the following child tags:

<description>
Description of the widget. Optional.
<taskurl>
The URL to the geoprocessing task. Required.
<helpurl>
The URL to the help for this geoprocessing task. Optional.
<updatedelay>
How often (in milliseconds) to check for results from an asynchronous tasks. Default is 4000 milliseconds. Optional.
<layerorder>
Comma-separated list of layer ids. Used to specify the order of graphic layers created by parameters of type featurerecordset.
<useamf>
If true, will use AMF as the communication protocol. If false, JSON will be used. This property is auto-detected if the server is version 10.1 or above. For earlier versions, the default is false (i.e. use JSON). If you have a 10.0 server, you might want to set this property to true. Optional.
<useproxy>
If true, will use the proxy specified in the main configuration file. Useful if the URL specified above is on a different server and does not have a crossdomain.xml file (or if the file exist but doesn't allow you access).
<autosubmit>
If true, the widget will automatically run the geoprocessing task after drawing an input feature. The default is false. Optional. Useful when the only input is a single graphic and you would like users to not have to click submit after drawing that graphic.
<inputparams>
The input parameters for the geoprocessing task. It has the following child tag:
<param>
The input parameter. It has the following attributes and child tag:
The <param> attributes:
name - Name of the input parameters as defined on the server. Required.
type - Type of parameter. Valid values are "featurerecordset", "string", "boolean", "long", "double", "date", "linearunit", "datafile", "recordset", "rasterdatalayer" and "multivalue". Required.
label - A parameter label to display in the widget instead of the parameter name. Optional.
geometrytype - Valid values are "point", "polyline" and "polygon". Specific draw tools will be displayed for each geometry type. Optional.
required - The default is false. Optional.
tooltip - Tool tip for the input parameter. Optional.
visible - The default is false. Optional.
wkid - The wkid of the input features. Needed if map is in a different spatial reference than the geoprocessing task input features. Optional.
wkt - The wkt of the input features. Needed if map is in a different spatial reference than the geoprocessing task input features. Optional.
One <param> child tag:
<renderer> - how to render the input geometries. Only applies to input parameters of type featurerecordset. Has one attribute "type" which supports "simple", "classbreaks" or "uniquevalue". For the latter two you also need to specify the "attribute". See Renderer & Symbols (Feature record set parameters) below.
<choicelist> - Used to provide options in a drop-down list. Only applies to input parameters of type string and linearunit. Optional. One child tag <choice> with one one property value
<outputparams>
The output parameters for the geoprocessing task. It has the following child tag:
<param>
The output parameter. It has the following attributes and child tag:
The <param> attributes:
name - Name of the output parameters as defined on the server.
label - The parameter label, or alias, to display instead of the name. Optional.
type - The type of the parameter. Valid values are "featurerecordset", "string", "boolean", "long", "double", "date", "linearunit", "datafile", "recordset", "rasterdatalayer" and "multivalue".
One <param> child tag:
<renderer> - how to render the input geometries. Only applies to input parameters of type featurerecordset. Has one attribute "type" which supports "simple", "classbreaks" or "uniquevalue". For the latter two you also need to specify the "attribute". See Renderer & Symbols (Feature record set parameters) below.

Renderer & Symbols for feature record set parameters

The features for parameters of type feature record set are represented by renderers.

<renderer>
The renderer properties used to display input and output geometries. It has the following attributes:
The <renderer> attributes:
attribute - which attribute to use for thematic rendering. Only applies to unique value and class breaks.
type - the renderer type. Valid values are "simple", "uniquevalue" and "classbreaks".
The <renderer> child tags:
<defaultsymbol> - the default symbol to use. It has the following attributes and child tags:
Attributes
alpha - The alpha transparency of the symbol. Values range from 0.0 (transparent) to 1.0 (opaque).
color - Color of the symbol.
size - Size of the symbol.
type - The type of marker to use. Valid values are "simplemarker" and "picturemarker" for points, "simpleline" for polylines and "simplefill" for polygons.

<renderer type="simple">
    <defaultsymbol alpha="0.5"
                   color="0x008844"
                   size="15"
                   type="simplemarker">
        <outline width="1" color="0x22DD00"/>
    </defaultsymbol>
</renderer>
<renderer type="simple">
    <defaultsymbol url="assets/images/i_widget.png"
                   height="25"
                   width="25"
                   type="picturemarker">
    </defaultsymbol>
</renderer>

The following snippet from the drive time sample shows how to use a renderer with different symbols for different unique values:

<renderer attribute="ToBreak" type="uniquevalue">
    <defaultsymbol alpha="0.5"
                   color="0xFF00FF"
                   type="simplefill">
        <outline color="0x000000"/>
    </defaultsymbol>
    <infos>
        <symbol color="0xFF0000"
                type="simplefill"
                value="5">
            <outline color="0x000000"/>
        </symbol>
        <symbol color="0x00FF00"
                type="simplefill"
                value="10">
            <outline color="0x000000"/>
        </symbol>
        <symbol color="0x0000FF"
                type="simplefill"
                value="15">
            <outline color="0x000000"/>
        </symbol>
    </infos>
</renderer>

Test drive the Geoprocessing widget.

Fields for pop-up windows

You can add pop-up functionality for output geometries. To enable pop-ups, specify which fields to display (or not) and how to label and format them. The content of the pop-up window can be configured with either <description> or <fields>.

<popups>
See API Reference for more details about pop-up windows.
<title>
The title of the pop-up window.
<description>
The main content of the pop-up unless <fields> are specified.
<fields>
Which fields to display (or not) and how to label and format them. It has one child tag:
<field>
The field to use in the pop-up window. This tag has the following attributes and child tag:
  • name - Name of the field to use. Required.
  • alias - Alias to display instead of the name field. Optional.
  • visible Boolean indicating whether to include a field or not. Default value is false. Optional.
The <field> tag has one child tag:
<format>
Information for displaying and/or formatting fields inside a pop-up. It has the following attributes:
  • dateformat - Can be set to either one of the PopUpFieldFormat constants or a DateFormatter formatString like YYYY-MM-DD.
  • precision - Number of decimal places to show. The default is -1. Optional.
  • usethousandsseparator - Whether numbers should have thousands separator. The default is true. Optional.
<medias>
Which medias to display. It has one child tag:
<media>
Information for how to display media in a pop-up. See API Reference for more details. This tag has the following attributes:
  • caption - Caption to display. Optional.
  • chartfields - Comma-separated list of field names to show in chart. Required for charts.
  • chartnormalizationfield - Value to divide the chart field's value by. Optional.
  • imagelinkurl - the link to open when the image is clicked. Optional.
  • imagesourceurl - The URL or field containing the URL to the image to display.
  • title - title to display. Optional
  • type - type of media to display. Required
<showattachments>
If true, and layer supports attachments, displays attachments using the AttachmentInspector. Optional.

Labels

In addition, the configuration file also supports changing the labels used in the widget dialog (this is not shown in the conceptual graphic).

<labels>
Container for labels that can be modified in this widget. It has several child tags:
<clearfeaturelabel>
Label for Clear Drawing tool. The default for English is "Clear".
<submitlabel>
Label for the submit button of the geoprocessing widget. The default for English is "Submit".
<inputlabel>
Label for input view of the geoprocessing widget. The default for English is "Input".
<outputlabel>
Label for output view of the geoprocessing widget. The default for English is "Output".

NoteNote:

#1. Multi-value parameters only support String types.

#2. RasterDataLayer & RecordSet types are not supported as input parameters.

2/15/2012