The Draw widget allows you to create graphics that display on the map. You can also use it to add line distance or polygon area to the feature as text.
The widget enables you to draw simple graphics and text on the map. It provides basic sketching and redlining functionality to a web app. It also displays some measurements (if configured to do so) for drawn features, such as length for lines and area and perimeter for polygons. When the widget initially opens, a dialog box appears that contains 11 feature draw tools. From left to right, they are as follows:
- Point
- Line
- Polyline
- Freehand Line
- Triangle
- Rectangle
- Circle
- Ellipse
- Polygon
- Freehand Polygon
- Text
Configure the Draw widget
This widget can be set to open automatically when an app starts. To enable this feature, click the Open this widget automatically when the app starts button on the widget, which turns it dark green.
To configure the Draw widget, complete the following steps:
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- Set the location, distance, or area units.
- Select the unit for the location, distance, or area. The abbreviation and conversion factor are not editable.
- Optionally change the order of the units. Click the up or down arrow of the unit in the Actions column to modify the order.
- To delete a unit of measure, click the close button of the unit in the Actions column.
- To add a unit of measure, select Add Location Unit, Add Length Unit, or Add Area Unit on the Locations, Distances, or Areas tab, respectively.
- Select the unit for the location, distance, or area. The abbreviation and conversion factor are not editable.
- Check Add the drawing as an operational layer of the map if needed.
- Click OK to close the dialog box.
By default, all supported units appear on the Locations, Distances, and Areas tabs.
Use the Draw widget
To get started with the Draw widget, complete the following steps:
- Click the symbol type to select the drawing mode.
- Optionally change the symbol for the feature using the symbol picker.
- For point symbols, select the marker category (different symbols are available in each category) to set the symbol size, color, transparency, outline color, and outline width of the symbol. Only the size category is available for picture marker symbols. You can set font color and font size for the measurement.
Click the Show location measurement toggle button and select the location unit from the Unit drop-down list to display the measurement with the point.
- For line symbols, select a predefined symbol from the box. You can also customize the color, style, transparency, and width of the symbol. Click the Show distance measurement toggle button and choose a unit from the Unit drop-down list to display the measurement with the line.
You can set font color and font size for the measurement.
- For polygon symbols, select a predefined symbol from the box. You can also customize the fill color, transparency, outline color, and outline width of the symbol. Click the Show area measurement or Show distance measurement toggle button and choose a unit from the Unit drop-down list to display the measurement with the polygon.
- For text, type the text to be drawn in the Text box, and select a font color and size for the text.
You can set font color and font size for the measurement.
- For point symbols, select the marker category (different symbols are available in each category) to set the symbol size, color, transparency, outline color, and outline width of the symbol. Only the size category is available for picture marker symbols. You can set font color and font size for the measurement.
- Draw the desired features and text on the map.
- If the Add the drawing as an operational layer of the map check box is checked, open the Layer List widget.
The Draw Results layer appears.
- Click Undo or Redo to undo or redo the drawing features, or click Clear to remove all of them.