Edit

The Edit widget provides editing capabilities using an editable layer in a feature service. It combines the TemplatePicker, AttachmentEditor, AttributeInspector, and GeometryService to provide feature and attribute editing.

The following table lists the configurable attributes of the Edit widget:

AttributeDescription

editor

An object of ArcGIS API for JavaScript. See the parameters of the Editor constructor in the Constructor details documentation.

  • layerInfos—Object. There is no default. The feature layer information.
    • featureLayer—Object. There is no default. Reference to the feature layer.
    • id—String. There is no default. The ID of an editable layer in a web map. The layer is ignored if the ID does not exist in the web map.
  • TableInfos—Object. There is no default. The feature table information.
    • featureLayer—Object. There is no default. Reference to the feature table.
    • id—String. There is no default. The ID of an editable table in a web map. The table is ignored if the ID does not exist in the web map.
  • useFilterEdit—Boolean. Enables templatePicker to filter templates.
  • autoApplyEditWhenGeometryIsMoved—Boolean. Applies the edit automatically when the geometry is moved.
  • snappingTolerance—Number. Sets the snapping tolerance in pixels.
  • popupTolerance—Number. Sets the tolerance of attribute editing in a pop-up in pixels.
  • stickyMoveTolerance—Number. Sets the sticky move tolerance in pixels.

Example:

{
  "editor": {
    "enableUndoRedo": true,
    "toolbarVisible": true,
    "toolbarOptions": {
      "mergeVisible": true,
      "cutVisible": true,
      "reshapeVisible": true
    },
    "layerInfos": [{
      "featureLayer": {
       "id":"Wildfire_4234"
      },
      "disableGeometryUpdate": true,
      "fieldInfos": [{
        "fieldName": "rotation",
        "isEditable": false
      }, {
        "fieldName": "description",
        "isEditable": true
      }, {
        "fieldName": "eventdate",
        "label": "Event Date",
        "isEditable": false
      }, {
        "fieldName": "eventtype",
        "label": "Event Type",
        "isEditable": false
      }]
    }, {
      "featureLayer": {
        "id":"Wildfire_6333"
      },
      "disableGeometryUpdate": true,
      "fieldInfos": [{
        "fieldName": "symbolid",
        "isEditable": false
      }, {
        "fieldName": "description",
        "isEditable": true
      }]
    }],
    "tableInfos": [],
    "useFilterEdit": false,
    "autoApplyEditWhenGeometryIsMoved": false,
    "snappingTolerance": 15,
    "popupTolerance": 5,
    "stickyMoveTolerance": 0
  }
}