Draw widget

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

The Draw widget enables end users to draw simple graphics and text onto the map display. It provides basic "sketching and redlining" functionality for the Viewer application. To snap a node to a node of another feature, press down the Ctrl key to enable snapping. It also provides some measurement capability, by displaying measurement values (if activated) for drawn features: lengths for lines, and areas and perimeters for polygons. When the widget is initially activated, the end user is presented with a simple dialog that contains 9 feature creation tools. From left to right, they are:

Screenshot of Draw widget

Workflow

  1. First, select a feature creation tool by clicking on it. When the feature creation tool is selected, its icon will display with a yellow highlight. Once a tool is selected, specific feature properties for that particular tool will appear in the widget dialog. Feature properties will vary for different types of features:
    • point
    • lines (includes polyline and freehand line)
    • polygons (includes rectangle, circle, ellipse, polygon, and freehand polygon)
    • text
  2. Before creating a new feature, end users have the option customize the feature properties for the feature they create. Note that line and polygon features also support measurement values, which must be activated by checking the Show Measurements checkbox.
  3. To add a new feature click on the map at the desired location and define the feature extent. A double-click will finish the feature. In the case of the text tool, the text string needs to be specified in the Text: input box first. Clicking on the map will place the text.

NoteNote:

For measurement options to appear for a feature, they need to be set before a feature is created to display on the map. Line features will have a length, polygon features will have an area and a perimeter.

To remove the newly added feature (or text), it can be discarded by clicking Clear drawings.

NoteNote:

This will remove ALL features and text from the display.

Created features and text are temporary and only visible when the Draw widget is active or minimized. They are located on a graphics layer that is automatically instantiated when the widget is opened for the first time. They are removed from the map display when the Draw widget is closed. Features and text will reappear when the Draw widget is reactivated.

Conceptual Workflow

Requires: geometry service

Test drive the Draw widget or read its tag reference.

2/15/2012