Managing feature templates

When you expose a dataset for web editing, you open it to users who may be new to GIS, or who may be using a wide variety of devices unsuitable for lengthy attribute editing sessions. You can make the job easier for them and preserve your data integrity by carefully preparing feature templates.

A feature template defines types of items that editors are allowed to add to a dataset, based on specific combinations of attributes. For example, a feature template for a schools layer might allow editors to choose whether a new feature should be classified as an elementary school, middle school, or high school. The service administrator can preset the school type attribute for these three options when he or she creates the feature template. In this way, the feature template ensures that editors do not enter invalid values for this important attribute.

Feature template example showing school types

Feature templates do not have to be based on only one attribute. For example, feature templates could define available pipeline types based on both the diameter of the pipe and the material that constitutes it. Well-defined feature templates help your editors to add only the types of features that are allowed. Using feature templates, you can provide a focused palette of valid feature types for editors to create and modify.

If all the features in your layer exhibit similar characteristics or cannot easily be placed into nominal or ordinal categories, you may not need to worry about templates. For example, if you're digitizing polygon boundaries of uniquely named study areas, templates may not be necessary. However, if each study area will be placed in a priority category, then templates may be useful.

Where do feature templates come from?

You can define feature templates in ArcMap or in the ArcGIS.com map viewer.

If your service originates from a map document, you can use ArcMap to define the feature templates. This process is described in the ArcGIS for Desktop Help book Using feature templates. The feature templates persist when you publish the service to ArcGIS Online and allow editing. In the ArcGIS.com map viewer and other clients, editors will be able to work with the feature templates that you originally defined with ArcMap.

You can also define feature templates using the ArcGIS.com map viewer. This is especially useful if you published your feature service from a CSV file or a shapefile, which have no associated template information. The remainder of this topic explains how to create templates using the ArcGIS.com map viewer.

Creating feature templates using the ArcGIS.com map viewer

The following steps explain how you can create or modify feature templates for an ArcGIS Online-hosted feature service. It's assumed that you've published the feature service using a shapefile or CSV file (if you published using ArcMap, you should have already defined the templates there).

Steps:
  1. Enable editing on the feature service and adjust the editing settings to ensure that editors are allowed to add features.
  2. Open the item details for the service.
  3. Click the Open link under the item thumbnail and click Open in ArcGIS.com map viewer.
  4. Set up the symbology for your layers as you would like it to appear in the template. In most cases, this involves configuring unique symbols based on a field in your data. The values in this field will define the feature types allowed to editors.
    Set the symbol types
  5. Click the Edit button. The default templates for the feature service appear on the left side of the map.
  6. Click the Manage button. You can only see this button if you're the owner of the service or if you are an administrator in your organization.
  7. In the drop-down list, click the name of the layer whose feature types you want to manage.

    You'll see a list of the feature types and their templates. You can click the small arrow to the right of the template name to reorder the template's position in the list or set the template's properties. The most important property you will edit is the set of field values associated with the template. See Setting the default attribute values of a feature template.

    The image below shows an example of how the feature templates will appear in the editing environment of the ArcGIS.com map viewer.

    How the templates appear in the editing environment

    Each feature type can have multiple templates that further predefine the attributes of the feature. The image below shows how each school type could have two templates: one for a public school and one for a private school. These translate into more feature choices in the editing environment.

    Multiple templates per feature

    To add new templates, you can click the arrow to the right of the template name and click New Template, or start from an existing template by clicking Copy.

  8. To add a new type of feature, click the Add New Type of Feature button.

    The most important thing you will do in this dialog box is set the attribute value that will define this feature type. For example, if you want to add a feature type for alternative schools and your data has a Type field, you could define a template for the case where the Type field equals Alternative.

    Adding a new feature type
  9. Click Save Changes when you are done updating the feature types and templates. Your changes are saved to your hosted feature service.

    You'll see the changes next time you edit features in the ArcGIS.com map viewer or any other client that supports editing feature services.

Considerations for managing feature templates

9/23/2013