agentleFS
geoai-latamgeoai-latam/SKILL_JS5_ARCGIS/skills/arcgis-interaction/AGENTS.md

SKILL_JS5_ARCGIS / arcgis-interaction

AGENTS.md1 starsChanged 6 months agoMITView on GitHub

Quick-reference for map interaction (SDK 5.1). Read before wiring clicks or drawing.

The file

Files
AGENTS.md

Agent Guide: arcgis-interaction

Quick-reference for map interaction (SDK 5.1). Read before wiring clicks or drawing.

Quick Decision Tree

  1. Identify clicked feature? → view.hitTest(event, { include: [layer] }), then r.type === "graphic".
  2. Need fields of a service layer? → outFields on the layer (default hit: only objectid).
  3. Draw shapes (UI)? → arcgis-sketch component (creationMode defaults to "continuous").
  4. Draw shapes (programmatic)? → SketchViewModel({ view, layer }); create() returns a Promise.
  5. Hover? → pointer-move + promiseUtils.debounce, swallow AbortError.

Setup Checklist

  • Filter hitTest with include and narrow the result type.
  • Set outFields for every field you read from a hit.
  • Act on sketch events only when state === "complete".
  • Store event handles and remove() them on cleanup.
  • Debounce hitTests driven by pointer-move.

Anti-patterns (one-liner reminders)

  • ❌ results[0].graphic (4.x style; does not compile in 5.x).
  • ❌ Reading attributes not in outFields (comes back undefined).
  • ❌ Saving sketch graphics on every state.
  • ❌ One hitTest per pointer move.
  • ❌ Looking for terrain in SceneView results (it is response.ground).

Files in This Skill

  • SKILL.md / SKILL.es.md — full guides
  • references/api-detail.md — hitTest result types, events, debounce, SketchViewModel, arcgis-sketch
  • references/examples.md — identify, draw, hover, 3D ground
  • references/pitfalls.md — extended troubleshooting
  • scripts/snippet-hittest.ts, snippet-sketch.ts

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.