Skip To Content
ArcGIS Developer
Dashboard

Common Data Types

template

Templates describe features that can be created in a layer. Templates are used with map notes, other feature collections, and editable web-based CSV layers. They are not used with ArcGIS feature services, which already have feature templates defined in the service.

Templates are defined as properties of the layer definition when there are no types defined; otherwise, templates are defined as properties of the types.

Properties

PropertyDetails

description

A string containing a detailed description of the template.

drawingTool

An optional string that can define a client-side drawing tool to be used with this feature. For example, the map notes used by Map Viewer Classic use the following strings to represent the viewer's different drawing tools: esriFeatureEditToolPolygon | esriFeatureEditToolTriangle | esriFeatureEditToolRectangle | esriFeatureEditToolLeftArrow | esriFeatureEditToolRightArrow | esriFeatureEditToolEllipse | esriFeatureEditToolUpArrow | esriFeatureEditToolDownArrow | esriFeatureEditToolCircle | esriFeatureEditToolFreehand | esriFeatureEditToolLine | esriFeatureEditToolText | esriFeatureEditToolPoint

name

A string containing a user-friendly name for the template. This name can appear on a menu of feature choices displayed in the client editing environment.

prototype

A feature object representing a prototypical feature for the template. The feature is defined using the syntax of the ArcGIS REST API.

Example

                "templates": [{
                  "drawingTool": "esriFeatureEditToolFreehand",
                  "description": "Groomed cross-country skiing trails",
                  "name": "X-country skiing",
                  "prototype": {"attributes": {
                    "VISIBLE": 1,
                    "TITLE": "Cross-country skiing",
                    "TYPEID": 5
                  }}
                }]
In this topic
  1. Properties
  2. Example