arcgis-editing
Skill1 starsChanged 6 months agoMITView on GitHub
Edit feature data with the ArcGIS Maps SDK for JavaScript 5.1: the arcgis-editor component for a full editing UI, FeatureLayer.applyEdits for programmatic add/update/delete, and attachment handling. Use this skill whenever the user creates, updates, or deletes features, builds an editing experience, or manages feature attachments.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GeoDaoyu/arcgis-maps-sdk-js-ai-contexttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GeoDaoyu/arcgis-maps-sdk-js-ai-context★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- skills/arcgis-3d-layers/AGENTS.mdAGENTS.md
- skills/arcgis-advanced-layers/AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-arcade/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-cim-symbols/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-coordinates-projection/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-core-utilities/AGENTS.mdAGENTS.md
- skills/arcgis-custom-rendering/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-feature-effects/AGENTS.mdAGENTS.md
- skills/arcgis-geometry-operations/AGENTS.mdAGENTS.md
- skills/arcgis-imagery/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-knowledge-graphs/AGENTS.mdAGENTS.md
- skills/arcgis-layers/AGENTS.mdAGENTS.md
- skills/arcgis-map-tools/AGENTS.mdAGENTS.md
- skills/arcgis-parquet/AGENTS.mdAGENTS.md
- skills/arcgis-performance/AGENTS.mdAGENTS.md
- skills/arcgis-popup-templates/AGENTS.mdAGENTS.md
- skills/arcgis-portal-content/AGENTS.mdAGENTS.md
- skills/arcgis-rest-services/AGENTS.mdAGENTS.md
- skills/arcgis-scene-environment/AGENTS.mdAGENTS.md
- skills/arcgis-smart-mapping/AGENTS.mdAGENTS.md
- skills/arcgis-spatial-analysis/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-tables-forms/AGENTS.mdAGENTS.md
- skills/arcgis-time-animation/AGENTS.mdAGENTS.md
- skills/arcgis-utility-networks/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-advanced/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/AGENTS.mdAGENTS.md
- skills/hello-world/AGENTS.mdAGENTS.md
- arcgis-3d-layersSkill
- arcgis-advanced-layersSkill
- arcgis-ai-componentsSkill
- arcgis-arcadeSkill
- arcgis-authenticationSkill
- arcgis-chartsSkill
- arcgis-cim-symbolsSkill
- arcgis-coding-componentsSkill
- arcgis-coordinates-projectionSkill
- arcgis-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- arcgis-popup-templatesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Problem it solves: create/update/delete (CRUD) on editable feature services.
- Very specific: line 115
When layer.capabilities.data.supportsAttachment is true, use addAttachment(feature, form) (a FormData or <form>) and queryAttachments({ …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Editing
When to use: Activate this skill whenever the user creates/updates/deletes features, builds an editing UI, or manages attachments.
Overview
Editing persists feature changes to a service. Use the editor component for UI, or applyEdits in code.
- Problem it solves: create/update/delete (CRUD) on editable feature services.
- Who it serves: developers building data-collection and maintenance apps.
- Pattern it teaches:
arcgis-editorfor turnkey UI;applyEditsfor programmatic control. - What it does NOT cover: drawing geometry (see
arcgis-interaction) or forms (seearcgis-tables-forms).
Quick Start
const result = await layer.applyEdits({ addFeatures: [graphic] });
console.log(result.addFeatureResults[0].objectId);Decision Tree
- Want a ready-made editing UI?
- Yes →
arcgis-editorcomponent.
- Yes →
- Need programmatic control / custom UI?
- Yes →
layer.applyEdits({ addFeatures, updateFeatures, deleteFeatures }).
- Yes →
- Editing files/photos on features?
- Yes →
layer.addAttachment/queryAttachments.
- Yes →
Default: arcgis-editor for standard workflows; applyEdits for custom logic.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import FeatureLayer from "@arcgis/core/layers/FeatureLayer.js";Dynamic Imports (CDN)
const FeatureLayer = await $arcgis.import("@arcgis/core/layers/FeatureLayer.js");Map Components (recommended for new projects)
import "@arcgis/map-components/components/arcgis-editor";Key Concepts
Concept 1: applyEdits
layer.applyEdits({ addFeatures, updateFeatures, deleteFeatures }) resolves to result arrays; each
item has objectId and error. Measured with 5.1.27 on a client-side layer:
- A bad edit does not reject the promise: it comes back as
errorin its result ("Identifier fields: OBJECTID missing", "Feature with object id 9999 missing"). - It is not transactional: in a batch with one valid and one invalid update, the valid one is
applied. For a service,
applyEdits(edits, { rollbackOnFailureEnabled: true })asks for all-or-nothing (not measured here). - Silent successes: deleting an
objectIdthat does not exist returnsok; an attribute whose name is not a field (ESTADO) is dropped and the update still returnsok. Field names are matched case-insensitively (statusupdatedSTATUS). - The whole call rejects only for layer-level problems:
editingEnabled: false("Editing is disabled for layer") or z-values on a layer without z. - Geometry in another spatial reference is projected for you (a 3857 point was stored in 4326 at
-74.0806, 4.6000), and the layer view updates withoutrefresh()(2 → 3 features; oneeditsevent).
Concept 2: The editor component
arcgis-editor replaces the Editor widget (deprecated since 5.0). Bind it with
reference-element; with layerInfos unset it edits every editable layer of the map (measured:
state === "ready"). It also has startUpdateFeaturesWorkflow, merge and split workflows, and in 5.1
the snapping grid controls (hide-snapping-controls-elements-grid-*).
Concept 3: Attachments
When layer.capabilities.data.supportsAttachment is true, use addAttachment(feature, form) (a
FormData or <form>) and queryAttachments({ objectIds }), which resolves to
{ [objectId]: AttachmentInfo[] }.
Common Pitfalls (Top 3)
Pitfall 1: Ignoring per-edit errors
// ❌ Anti-pattern
await layer.applyEdits({ updateFeatures }); // assume success// ✅ Correct
const r = await layer.applyEdits({ updateFeatures });
r.updateFeatureResults.forEach((res) => { if (res.error) console.error(res.error); });Impact: measured: an update with a missing id resolves normally; only its result carries the
error. A try/catch around applyEdits does not see it.
Pitfall 2: Editing a non-editable layer
// ❌ Anti-pattern
await layer.applyEdits({ addFeatures }); // service has no create capability// ✅ Correct
await layer.load();
if (layer.editingEnabled && layer.capabilities?.operations?.supportsAdd) await layer.applyEdits({ addFeatures });Impact: measured on a MapServer layer: supportsAdd, supportsUpdate, supportsEditing and
editingEnabled are all false. With editingEnabled: false the call rejects with "Editing is
disabled for layer".
Pitfall 3: Updating without the objectId
// ❌ Anti-pattern
const g = new Graphic({ attributes: { STATUS: "done" } }); // no OBJECTID
await layer.applyEdits({ updateFeatures: [g] });// ✅ Correct
const g = new Graphic({ attributes: { [layer.objectIdField]: 42, STATUS: "done" } });
await layer.applyEdits({ updateFeatures: [g] });Impact: measured: no exception; the result says "Identifier fields: OBJECTID missing" and no
row changes. Use layer.objectIdField: it is not always OBJECTID (FID, objectid).
When to Read references/
| If you need... | Read |
| applyEdits / editor / attachments | references/api-detail.md |
| CRUD + attachment examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-tables-forms— attribute forms for editingarcgis-interaction— draw geometries to editarcgis-layers— the editable FeatureLayer
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. The code ran; two extended pitfalls were false: geometry in another spatial
reference is projected for you (not misplaced or rejected) and the layer view updates without
refresh(). Replaced by what does fail silently: deleting a missing id returnsok, unknown fields are dropped withok. Measured that bad edits never reject the promise, that batches are not transactional, and which errors do reject.objectIdFieldinstead of a hard-codedOBJECTID. Run intests/runtime/casos/arcgis-editing.ts. - 0.1.0 (2026-05-31): Initial release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

