Feature templates define categories of items that editors are allowed to add to a feature layer based on specific combinations of attributes. For example, feature templates for a schools feature layer might allow editors to choose whether a new feature should be classified as an elementary school, middle school, or high school. The feature layer administrator can preset the school type attribute for these three options. This ensures that editors do not enter invalid values for this important attribute.
If you use unique symbology, you can define subtypes on the feature types, which are additional templates based on other feature attributes. For example, you 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 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.
Note:
You can create and manage feature templates in Map Viewer, ArcGIS Pro, and Field Maps Designer. To edit a layer's feature templates, you must be the owner of the layer or an administrator. The layer must also be a hosted feature layer.
All hosted feature layers have a default feature template. In Map Viewer, you can duplicate the default feature template to create additional templates, which you can alter to meet specific editing needs. Map Viewer allows you to manage feature templates in the following ways:
- Reorder feature templates.
- Duplicate and delete feature templates.
- Update the display name, description, and default attribute values.
Configure feature templates
Follow these steps to configure feature templates for a hosted feature layer:
- Confirm that you are signed in and that you have privileges to create, update, and delete content.
- In Map Viewer, open the map containing the layer or add the layer directly.
- On the Contents (dark) toolbar, click Layers to open the Layers pane.
- Add a feature layer to the map.
- With the feature layer selected, click Configure editing
on the Settings (light) toolbar and click Templates
.
The Configure templates window appears.
- Do any of the following to configure templates:
- Click Reposition
and drag the template to a new location in the Templates list. Alternatively, click Reposition and select an option under Reorder to move the template up or down in the Templates list.
- Click Duplicate
to make a copy of a template.
- Click Delete
to delete a template.
- Click a template to select it, and update the display name, description, or default values in the Properties section.
- Click Undo
to undo the most recent change. Click Redo
to redo the most recent change. Click History
to see a list of all template changes made during the current editing session. Click Save
to save your changes.
- Click Reposition
- When you finish configuring templates, click OK.
Your changes are saved to the hosted feature layer.
Considerations for feature templates
Keep the following in mind when working with feature templates:
- If you change the style on a layer to use unique symbols instead of color or size, the templates associated with the layer will not automatically update. When you open the Configure templates window, you will be prompted with a warning message that one or more templates are out of sync with the layer's style. Click Update to sync the template with changes made in the Style options pane.
- If only default feature templates exist, the feature template name is the same as the feature type, such as point layer or polygon layer. You can change the template name by updating its properties.
- If the hosted feature layer has a single symbol or class breaks renderer, the service only uses feature templates, not feature types. You can change the default template and add more.
- You can remove all feature templates from a feature type but, if you do, editors cannot add features to the map. There are more effective ways to restrict editing, as described in Manage hosted feature layer editing.