How to set up geoprocessing widget with uncompiled file?

3493
2
Jump to solution
10-09-2014 02:57 PM
LeiZhou1
Occasional Contributor

I download the source code of Flex Viewer 3.6 and input it to Flash builder.  After reading the following post from ESRI, I realize the config file of GeoprocessingWidget.xml does not even exist, then how do we set the widget? Thanks!

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Geoprocessing_widget_tags/01m30...

The set up codes in main config.xml is as the following:

<widget label="Geoprocessing" left="10" top="400"

                icon="assets/images/GeoprocessingTool48.png"

                config="widgets/Geoprocessing/GeoprocessingWidget.xml"

                url="widgets/Geoprocessing/GeoprocessingWidget.swf"/>

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Lei,

  Most people either just create the XML themselves or use App Builder to configure the widget.

Here is a sample:


<?xml version="1.0"?>


<configuration label="Drive time analysis">


   <taskurl>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/Create...</taskurl>


   <helpurl>http://sampleserver1.arcgisonline.com/arcgisoutput/Network_ESRI_DriveTime_US/CreateDriveTimePolygons...</helpurl>


   <inputparams>


   <param name="Input_Location"
   geometrytype="point"
   label="Start location"
   required="true"
   type="featurerecordset"
   visible="true">


   <simplerenderer>


   <simplemarkersymbol color="0xBEEFEE" size="15">


   <outline width="2" color="0x00AADD"/>


   </simplemarkersymbol>


   </simplerenderer>


   </param>


   <param name="Drive_Times"
   defaultvalue="5 10 15"
   label="Drive times"
   required="false"
   type="string"
   visible="false"/>


   </inputparams>


   <outputparams>


   <param name="Output_Drive_Time_Polygons"
   geometrytype="polygon"
   label="Output Drive Time Polygons"
   required="true"
   type="featurerecordset"
   visible="true">


   <popup>


   <title>{Name}</title>


   <fields>


   <field name="FromBreak"
   alias="From Break"
   visible="true"/>


   <field name="ToBreak"
   alias="To Break"
   visible="true"/>


   </fields>


   </popup>


   <uniquevaluerenderer field="ToBreak">


   <simplefillsymbol alpha="0.5" color="0xFF00FF">


   <outline color="0x000000"/>


   </simplefillsymbol>


   <uniquevalueinfo value="5">


   <simplefillsymbol color="0xFF0000">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   <uniquevalueinfo value="10">


   <simplefillsymbol color="0x00FF00">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   <uniquevalueinfo value="15">


   <simplefillsymbol color="0x0000FF">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   </uniquevaluerenderer>


   </param>


   </outputparams>


   <layerorder>Input_Location,Output_Drive_Time_Polygons</layerorder>


</configuration>



<!--
  See Geoprocessing widget tag reference at
  http://links.esri.com/geoprocessingwidget
-->




View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Lei,

  Most people either just create the XML themselves or use App Builder to configure the widget.

Here is a sample:


<?xml version="1.0"?>


<configuration label="Drive time analysis">


   <taskurl>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Network/ESRI_DriveTime_US/GPServer/Create...</taskurl>


   <helpurl>http://sampleserver1.arcgisonline.com/arcgisoutput/Network_ESRI_DriveTime_US/CreateDriveTimePolygons...</helpurl>


   <inputparams>


   <param name="Input_Location"
   geometrytype="point"
   label="Start location"
   required="true"
   type="featurerecordset"
   visible="true">


   <simplerenderer>


   <simplemarkersymbol color="0xBEEFEE" size="15">


   <outline width="2" color="0x00AADD"/>


   </simplemarkersymbol>


   </simplerenderer>


   </param>


   <param name="Drive_Times"
   defaultvalue="5 10 15"
   label="Drive times"
   required="false"
   type="string"
   visible="false"/>


   </inputparams>


   <outputparams>


   <param name="Output_Drive_Time_Polygons"
   geometrytype="polygon"
   label="Output Drive Time Polygons"
   required="true"
   type="featurerecordset"
   visible="true">


   <popup>


   <title>{Name}</title>


   <fields>


   <field name="FromBreak"
   alias="From Break"
   visible="true"/>


   <field name="ToBreak"
   alias="To Break"
   visible="true"/>


   </fields>


   </popup>


   <uniquevaluerenderer field="ToBreak">


   <simplefillsymbol alpha="0.5" color="0xFF00FF">


   <outline color="0x000000"/>


   </simplefillsymbol>


   <uniquevalueinfo value="5">


   <simplefillsymbol color="0xFF0000">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   <uniquevalueinfo value="10">


   <simplefillsymbol color="0x00FF00">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   <uniquevalueinfo value="15">


   <simplefillsymbol color="0x0000FF">


   <outline color="0x000000"/>


   </simplefillsymbol>


   </uniquevalueinfo>


   </uniquevaluerenderer>


   </param>


   </outputparams>


   <layerorder>Input_Location,Output_Drive_Time_Polygons</layerorder>


</configuration>



<!--
  See Geoprocessing widget tag reference at
  http://links.esri.com/geoprocessingwidget
-->




0 Kudos
LeiZhou1
Occasional Contributor

Thanks a lot!

0 Kudos