The ArcGIS JavaScript API comes with a set of widgets and modules designed specifically for editing. With the editing widgets, the user can add features to the map, change their shape, edit their attributes, and even delete them, if the services allow. Let's look at some of the tools available in the API.
Tip
Why are the editing tools in your application not working? It may be the CSS. Editing widgets are created with Dojo user controls, or dijits. These controls require the Dojo stylesheets, such as claro.css
or nihilo.css
. Without them, buttons stop working, and other unexpected behaviors may arise.
The edit toolbar, loaded with the esri/toolbars/edit
module, lets the user change the shape, orientation, scale, and position of graphics on a map. We discussed it in Chapter 2, Digging into the API, in relation to the other toolbars. Separate controls are required to save the changes made with the edit toolbar. You can see an image of a triangle selected for the edit...