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).

See also the bundle's API documentation for more details.

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": {
        "allowFeatureTemplateFiltering": true,
        "groupFeatureTemplatesBy": "layer",
        "initialGeometryEditMode": "reshape",
        "toggleGeometryEditModeOnClick": true,
        "tooltipOptions": {
            "enabled": true
        },
        "snappingEnabled": true,
        "snappingOptions": {
            "distance": 5,
            "selfEnabled": true,
            "featureEnabled": true
        },
        "visibleElements": {
            "createFeaturesSection": true,
            "editFeaturesSection": true,
            "snappingControls": true,
            "snappingControlsElements": {
                "header": false,
                "enabledToggle": true,
                "selfEnabledToggle": true,
                "featureEnabledToggle": true,
                "layerList": true
            }
        }
    }
}
Property Type Description
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).
snappingOptions Object Snapping configuration. Allows to configure distance, selfEnabled and featureEnabled properties. See SnappingOptions for details.
visibleElements Object Configuration options to reduce visible UI elements and initial states. A complete description of available 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"
}]

Map actions

The following map-actions are provided by this bundle:

Action ID Description
start-editing Provides a map-actions.Action to start a feature update workflow using the Editing widget.

Result API actions

The following result-api actions are provided by this bundle:

Action ID Description
edit-single-item Provides a result-api.RowTableAction to edit a single item in the Result UI.

This action will only be displayed, if the store, that serves as a data source for the Result UI, is connected to the map. This can be achieved by using the AutoStoreRegistration or by configuring a store with the property layerId. See agssearch for the configuration.