Edit widget tags
This page describes an older version, please read about the latest version at:
http://resources.arcgis.com/en/help/flex-viewer/concepts/
http://resources.arcgis.com/en/help/flex-viewer/concepts/
Configuration file for the Edit widget
The general structure of the the Edit widget configuration file is shown by the conceptual graphic below.
The file is defined by a <configuration> tag that identifies it as a configuration file for the Viewer. It supports changing the geometry service used by the widget as well as the available edit tools displayed in the widget. It has the following child tags:
- <addfeatures>
- Permit new features to be created. Boolean value (default is "true"). New in version 2.3.
- <deletefeatures>
- Option to delete features.
- <updateattributes>
- Permit attributes to be updated. Boolean value (default is "true"). New in version 2.3.
- <updategeometry>
- Permit geometry (the locations of features) to be updated. Boolean value (default is "true"). New in version 2.3.
- <geometryservice>
- Deprecated as of version 2.3 - instead set the geometry service in the main configuration file.
- <toolbarvisible>
- Determines if the toolbar will be visible; Boolean value (default is "true").
- <toolbarcutvisible>
- Determines if the cut tool will be visible; Boolean value (default is "true").
- <toolbarmergevisible>
- Determines if the merge tool will be visible; Boolean value (default is "true").
- <toolbarreshapevisible>
- Determines if the reshape tool will be visible; Boolean value (default is "true").
- <excludelayer>
- When a layer is specified (by its name which should match the layer name in the
Viewer application's main configuration file), it will not display
in the Edit widget, and therefore will not be editable. Multiple
excludelayer tags can be specified if you want to exclude multiple
layers.
Example for excluding layers from Edit widget:
In main configuration file: <layer label="thelayername".../> In the widget configuration file: <excludelayer>thelayername</excludelayer>
- <createoptions>
- Specifies the
available edit options in the widget.
It has the following child tags:
- <polygondrawtools>
- Tools
available for creating polygons:
- polygon - Create polygon tool.
- freehandpolygon - Create polygon with freehand drawing tool.
- extent - Create extent polygon tool.
- autocomplete - Auto polygon complete tool.
- circle - Create circle tool.
- ellipse - Create ellipse tool.
- <polylinedrawtools>
- Tools
available for creating lines:
- polyline - Create polygonline tool.
- freehandpolyline - Create polyline with freehand drawing tool.
- line - Create line tool.
Sample code for the Edit widget XML configuration file:
<configuration>
<geometryservice>http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
</configuration>
or with more settings changed from the defaults:
<configuration>
<createoptions>
<polygondrawtools>DrawTool.POLYGON, DrawTool.FREEHAND_POLYGON, DrawTool.EXTENT, CreateOptions.AUTO_COMPLETE</polygondrawtools>
<polylinedrawtools>DrawTool.POLYLINE, DrawTool.FREEHAND_POLYLINE, DrawTool.LINE</polylinedrawtools>
</createoptions>
<toolbarvisible>true</toolbarvisible>
<toolbarcutvisible>true</toolbarcutvisible>
<toolbarmergevisible>true</toolbarmergevisible>
<toolbarreshapevisible>true</toolbarreshapevisible>
</configuration>
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 the following child tags:
- <attributeslabel>
- Label for the Attributes dialog title (default for English is "Attributes").
- <attachmentslabel>
- Label for the Attachments dialog title (default for English is "Attachments").
- <featurelayernotvisibletext>
- Label to display when a feature layer is not visible (default for English is "feature layer is either not visible or out of scale range").
2/15/2012