Modifying data

# Editing data

If your Web application has this feature enabled, the Editor task allows you to edit data on the server.

In this section: Start and stop editing Setting the edit layer Creating a new feature Selecting features Modifying and deleting features Settings options

#### Start and stop editing

- Editing is done within an edit session. To save your edits, you must use the Save button to save your edits. If you make changes and simply close the browser without saving, your edits will not be saved.
- If it is not visible, open the Editor task from the Console. Expand the Tasks panel by clicking on its down arrow . Click the Editor task in the task list. The Editor task window will open. If the Editor link is not visible on the page, then this Web application does not allow editing.
- In the Editor task window, choose a version from the drop-down list. Then click Start Editing. This closes the Editor task window and opens the Editor tools window.
- To save your changes, click the Save Edits button. You can then close the Editor tools window, and exit the website or browser as desired.

#### Setting the edit layer

- Only one layer may be edited at a time. To choose the layer to edit, select the layer from the drop-down list at the top of the Editor tools window.
- Optionally, modify the settings for editing, such as snapping and selection, with the Settings window. Open Settings from the link at the bottom of the Editor tools window. For more information, see the section below on Settings options.

#### Edit functions

Edit buttons just below the edit layer name enable actions common to all edit operations:

Tool | Description
--- | ---
Select Feature |  | Click on this tool, then click or click and drag a rectangle on the map. Features clicked on, or within the drawn rectangle, will be selected. Selection is shown with a cyan (blue-green) color (see Settings to change selection color). Features must be selected before they can be modified or deleted.
Clear Feature(s) |  | Clears any selected features so that no features are selected.
Show Vertices |  | If feature(s) are selected, displays their vertices in red. Vertices are the points that define the shape of a feature.
Undo |  | Reverses the last editing operation. If pressed again, works its way backward to undo actions done. Once you do a Save of your work, you cannot undo operations done before the save.
Redo |  | After an Undo, reinstates the action that had been reversed.
Save Edit(s) |  | Saves all changes to the data in the edit session. You must do a Save before exiting the browser in order to preserve your changes to the data.
Enter XY value(s) |  | Creates a new feature by entering coordinates of vertices in the feature. Clicking this button opens a new window to input the coordinates. For lines and polygons, you can enter multiple vertices by clicking the Continue Adding button. When you enter the last vertex, click Add Final to finish the feature.

#### Creating a new feature

1. In the section of the Editor tools window labeled Create <layer name>, click a button for the type of feature to create. One or more buttons will be available. If the layer has multiple classes defined for the map display, a button will display for each class. You can hover over the button, and the name of the class type will pop up next to the button. After you click a button, it will have a pressed appearance.
2. Click on the map to create the feature. For lines, click once at each vertex (point), and double-click at the last vertex. For polygons, click at each vertex, then double-click to finish. Do not click back on the original vertex, as the polygon will automatically close. temporarily shows a red marker at the location to which the cursor will snap if you click to add a vertex. It also shows the layer to which snapping will occur.
3. You can also enable snapping options while adding vertices: see Settings options below.
4. After finishing the feature, it will be highlighted on the map, and the attribute fields will display in the Editor window. Attributes may be entered for the feature and the feature's shape may be edited at this point.
5. You can continue adding features by clicking on the map. Remember to save your edits.

#### Selecting features

Before modifying or deleting a feature, it must be selected.

- Click the Select tool
- With the select tool active, click on the map to select the feature. You can also draw a rectangle to select features within the rectangle.
- After a few moments, the selected features are highlighted. These features can then be modified or deleted.

#### Modifying and deleting features

After features are selected, they can be modified using the editing tools. The set of tools displayed differs for point, line and polygon layers.

Attributes can also be modified in the Editor task window. If an attribute is entered that does not match the data type, a message will display and the value will be erased. For example, if an attribute field is a numeric type and a value of "Test" is entered, the value will not be allowed.

Tool | Action
--- | ---
Move feature |  | Moves the feature to a new location. Click first on some point in the feature. As you move the cursor to the new location, a line follows the cursor to indicate the move. Click the second time on the new location. The feature is moved, with the point on the feature click first moved to the location clicked second.
Copy feature |  | To copy a selected feature, click once on the feature, then move the cursor to the new location and click again. The feature is copied, with the point on the feature clicked first located at the point clicked second.
Split feature |  | Splits a selected feature into two features. For a line, click the tool, then click once at the location to split the line. For a polygon, click to draw a line to define the split. At the last point in the the line for splitting the polygon, double-click on the map to finish and split the polygon. Each feature takes the attributes of the existing feature.
Merge features |  | Merges two or more selected lines or polygons into a single feature. If polygons overlap, the boundary between them is dissolved so that they form a single polygon. Note that this does not snap vertices. The merged feature takes the attributes of the first feature selected.
Delete feature |  | Deletes the entire point, line or polygon feature(s) that are selected. No warning message is shown, but you can use the Undo button to undo the delete.
Add vertex |  | For a line or polygon, adds a vertex along the edge where you click.
Delete vertex |  | For a line or polygon, deletes the vertex clicked on. You cannot delete the last two vertices of a line, or the last three vertices of a polygon.
Move vertex |  | For a line or polygon, moves a vertex. First click on the vertex to move. After clicking, a line follows the cursor, indicating the move action. Click on the new location for the vertex.

#### Settings options

Settings options modify how selection and snapping occur. Click the Settings link in the lower right of the Editor tools window to open the Settings options. Click the down arrows within the Settings window to display sections of the options. The administrator of the website may limit the options that you can set.

Snapping settings

When you draw a line or polygon, you may want vertices (points) to fall exactly along other existing features. Snapping forces a click to take the precise coordinate of a feature, if the feature falls within the Snapping Tolerance of the click.
Snap tips are automatically available when editing. When adding or moving vertices, press and hold the 's' key to show a marker at the location to which the cursor will be snapped:
The cursor does not actually snap to this location while drawing a line or polygon. But once you finish adding the feature, the snapped locations will be the ones used and displayed.

- Snapping Rules determine which parts of features within a layer can be snapped to. For each layer, you can snap to specific locations within features.
  - Vertex: mouse click location will be snapped to the nearest vertex in a feature of the layer, if within the snapping tolerance.
  - Edge: mouse click location will be snapped to the nearest line or polygon of a feature. Snapped location does not have to fall on a vertex.
  - End: mouse click location will be snapped to an end point of a line or polygon.
- Snapping Tolerance: the location clicked with the mouse will be snapped only if it is within this distance of a feature. The smaller the snapping tolerance, the closer you must click to a feature in order to snap to it.
- Display snap circle: when adding or moving vertices, displays a circle halo around the cursor as you move the mouse. This indicates the snapping tolerance. If a feature in a layer with snapping enabled is within this circle, depending on the snapping rules for end, vertex or edge. Be aware that enabling this option uses CPU time on your computer as you move the mouse.

Select Features settings

- Tolerance: When selecting features, features within this distance of the mouse click will be selected. This allows easier selection of point and line features.
- Limit selection to: No more than this number of features can be selected at one time. This limits the potential load on the server and prevents inadvertently selecting large numbers of features.
- Selection Color: Selected features are shown with this color. To change the selection color, click the drop-down arrow, and choose a color from the palette.