Edit features with the Editor widget

Explore in the sandboxView live

This sample demonstrates how to add an Editor widget to a web application. This widget is useful asit provides an out-of-the-box experience to help streamline the editing experience within an application.

How it works

The widget automatically recognizes if there are any editable feature layer(s) within the map. If there are, the layer or layers will display within the widget. Based on the editing functionality set on the feature layer, you can Edit existing features and/or Add new features.

The Editor widget uses the same coding pattern as other widgets, i.e. you must specify the view to be used by the widget. Additional properties can be set as needed.

    
let editor = new Editor({
  view: view
  // Pass in any other additional property as needed
});

Lastly, we add the widget to application using the View's UI.

  
// Add widget to top-right of the view
view.ui.add(editor, "top-right");

For a more advanced sample, see Editor widget with configurations and for editing in 3D see the sample Edit features in 3D with the Editor widget