Editor task
The Editor task provides a suite of tools for Web-based editing of features and attributes in ArcSDE geodatabases. This task requires that your application contain a map service accessed through an ArcGIS Server local connection that includes at least one layer from an ArcSDE geodatabase. Shapefiles, personal geodatabase layers, and file geodatabase layers are not editable; however, you can include these types of layers in the map service.
What can I do with the Editor task?
When you add the Editor task to an application, users of that application will be able to access various tools to edit data and save their edits. The Editor task includes tools for creating, moving, copying, splitting, merging, and deleting features. Additionally, you can view and edit the locations of feature vertices. When you configure the Editor task for your application, you can select which versions and layers users will be able to edit. When editing, users of your application can adjust the snapping and selection options.
Editing in the Web environment has a slightly different feel from desktop editing, and you may want to use a practice dataset to accustom yourself to the available tools and their behavior. For instance, when editing with snapping enabled, you will not see the snapping occur on the screen until after you place the vertex. The placed vertex will be snapped to the appropriate vertex, edge, or end.
Note: To see the snapping tolerance, check the Show snap circle check box, and to see where the current cursor location will snap to, press the S key.
How do I use the tools contained in the Editor task?
You can find detailed help about each tool in the Editor task by clicking the Help button in the upper right corner of the Web Mapping Application. The Editing Data page contains graphics and instructions for using all the tools contained in the Editor task.
Is the Editor task customizable?
The Editor task is customizable. See the Editor task control discussion in the Developer Help for samples and instructions on how you can add your own functionality to the Editor task.
You can also customize the Web Mapping Application Help to document any tools you add to the Editor task. The help file for the Editing data topic is located in C:\Inetpub\wwwroot\<Application name>\Help\EditorTask.htm. You can use any text or HTML editor to modify this topic with a description of your customized Editor task.
Editing with pooled and nonpooled services
You can use the Editor task with both pooled and nonpooled services. When you use pooled services, your server can support a larger number of concurrent users because the server does not have to create a dedicated service instance for each user during an application session. Instead, users can share service instances from a pool. Before you implement the Editor task with a pooled service, you should be aware of the following:
- Editing of pooled services is only available with nonversioned data.
- You cannot undo or redo edits when you edit a pooled service.
- Conflicts are always resolved in favor of the edit session, meaning that the most recent edit will overwrite any previous edits performed on the same feature.
Editing versioned and nonversioned data
The Editor task supports editing versioned and nonversioned data. To edit versioned data with the Editor task, you must be using a nonpooled service.
You can edit nonversioned data with either pooled or nonpooled services. When editing nonversioned data, you cannot undo or redo edits or adjust the autoreconciliation options. The last edit to be saved always overwrites any previous edits to the same feature.
How are conflicts resolved?
What happens when two users edit the same feature at the same time using the Editor task? The Editor task autoreconciles any conflicts based on two important settings:
- Are conflicts defined by object (row) or by attribute (column)? If two users edit different attributes of the same feature, is this considered a conflict? If you've chosen to define conflicts by object (row), this situation is treated as a conflict, and only one of the users' edits can be applied. However, if you've chosen to define conflicts by attribute (column), both edits may be applied. In this case, a conflict would only occur if the two users edited the same attribute.
- Are conflicts resolved in favor of the database or the edit session? If someone else edits the same feature as you and saves his or her edits first, what happens when you save? If you've chosen to resolve conflicts in favor of the database, your edits will not be applied. This setting can be thought of as "First in wins". If you've chosen to resolve conflicts in favor of the edit session, your changes will overwrite the other user's edits. Resolving conflicts in favor of the edit version can be thought of as "Last in wins".
By default, conflicts are resolved by object (row) in favor of the database. If you want different settings, click the Configure button for the Editor task in Manager and click the Advanced tab to set the autoreconciliation options.
You can also choose whether users will receive a message when attempting to save a conflicting edit. The message reads "The target version has been updated since you started editing. While merging these changes into your edit session, conflicts were detected and resolved." You can see the changes from others' edits when the map refreshes.
Additional information about the Editor task
Following is some additional information that you should know about the behavior and abilities of the Editor task:
- The Editor task is designed for simple feature and attribute editing and is unaware of the behavior of the underlying geodatabase. Consequently, you cannot use the Editor task to validate topology or networks, administer ArcSDE, create versions, and so on. These types of operations are best completed in ArcGIS Desktop before or after the Web editing session.
- The Editor task cannot be used with map services published from a map service definition (MSD) file. MSD-based map services are designed for optimized map display and do not have access to the fine-grained ArcObjects required for editing. All map services used with the Editor task must be published from ArcMap documents (MXDs).
- The Editor task cannot be used with annotation layers, joined fields, or stand-alone tables (including related tables).
- The Editor task supports subtypes and domains created in the geodatabase. Additionally, users performing editing operations will see the domain description instead of the coded value. For instance, if you are performing a Web editing session on a county zoning infrastructure database, the Web ADF will allow you to select the desired subtype, such as City, then choose from the appropriate domain, such as Residential, Commercial, or Industrial. Most important is that the domain description Residential will display instead of the coded value R.
- You should only include one Editor task per application.
- You cannot use the Editor task to create multipoint features. Attempting to do so will return the message "No support for this geometry type." However, you can move, copy, or delete existing multipoint features with the Editor task. You can also use the Editor task to edit the attributes of existing multipoint features.
-
By default, the Editor task creates a new selection every time you apply the Select Features tool. You change this behavior at run time so that the selection envelope always adds to the current selection set, removes from the current selection set, or toggles the selected state of features within the envelope. To do this, click Settings on the Editor task, expand the Select Features panel, and change the Selection Mode.
-
When editing a layer that has a unique value renderer applied, you will see multiple buttons available for creating features. These buttons allow you to immediately create the type of feature on which the renderer is based.
Because the Buildings feature class in the following screen shot has a unique value renderer defined in the map service, multiple buttons are available for creating features.
- The Editor task does not support duplicate layer names. Before adding the Editor task to your application, make sure all the layers that you will edit have unique names in the source map document.
- For a detailed walk-through of how to set up the Editor task in a Web application, see the ArcGIS Server Help topic Tutorial: Creating a Web editing application.