editing

This bundle provides a widget for creating, updating and deleting features on editable layers by integrating the Editor widget from the ArcGIS Maps SDK for JavaScript (see Editor).

Usage

To make the functions of this bundle available to the user, a tool has to be added to a tool set. The ID of the tool provided by this bundle is:

Tool ID Component Description
editingToggleTool EditingToggleTool Toggles editor widget

No further configuration is required, default values are applied.

The widget is registered at the component system with the widget role editing.

Constraints

Configuration Reference

The following sample shows the configurable properties and its default values:

"editing": {
    "Config": {
        "allowedWorkflows": ["create-features","update"],
        "allowFeatureTemplateFiltering" : true,
        "groupFeatureTemplatesBy":  "layer",
        "initialGeometryEditMode": "reshape",
        "toggleGeometryEditModeOnClick": true,
        "tooltipOptions": {
            "enabled": true
        },
        "snappingEnabled": true,
        "visibleElements": {
            "snappingControls": true,
            "snappingControlsElements": {
                "header": false,
                "enabledToggle": true,
                "selfEnabledToggle": true,
                "featureEnabledToggle": true,
                "layerList": true
            }
        }
    }
}
Property Type Description
allowedWorkflows Array Array of Strings to define which workflows are allowed. Possible values are create-features and update.
allowFeatureTemplateFiltering Boolean Defines whether an input field should appear when adding features to filter feature types.
groupFeatureTemplatesBy String Defines how feature types are sorted. Possible values are layer, geometry and none.
initialGeometryEditMode String Defines which editing mode is activated when updating feature geometries. Possible values are transform, reshape and move. transform allows to move, resize and rotate a geometry, unless one of the properties enableRotation or enableScaling are set to false. reshape allows to move or add vertices of a geometry. move allows to move a geometry without changing its vertices, size or rotation..
toggleGeometryEditModeOnClick Boolean Indicates if the geometry editing mode can be toggled between transform and reshape update options.
tooltipOptions.enabled Boolean If set to true, a tooltip with length and area of current sketch geometry is displayed.
snappingEnabled Boolean Enables or disables snapping (default: enabled).
visibleElements Object Configuration options to reduce visible UI elements and initial states. A complete description of avalaible options can be found in visibleElements documentation.

Customization


NOTE: This part of the documentation is a first proof of concept and possible subject for changes.


editing.EditorInterceptor

To get direct access to the initialization properties of the Editor widget (for example to customize additional properties or watch for events), this extension point can be used. Multiple editing.EditorInterceptor instances can be registered.

class MyEditorInterceptor {
    interceptConfig(config) {
        // here the initial constructor options for the editing widget can be changed
    }
    interceptEditor(editorWidget) {
        // here the editorWidget instance can be changed or event listeners can be added
    }
}

In your manifest.json file register the interceptor as editing.EditorInterceptor:

components: [{
    "name": "MyEditorInterceptor",
    "provides": "editing.EditorInterceptor"
}]