agentleFS
GeoDaoyuGeoDaoyu/arcgis-maps-sdk-js-ai-context/skills/arcgis-layers/AGENTS.md

arcgis-maps-sdk-js-ai-context / arcgis-layers

AGENTS.md0 starsChanged 7 months agoMITView on GitHub

Quick-reference decisions, checklists, and tables for choosing and configuring layers. Start here with your data source: Server vs Client-side queries:

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start here with your data source:

    line 7

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent Guide: arcgis-layers

Quick-reference decisions, checklists, and tables for choosing and configuring layers.

Layer Type Selection Flowchart

Start here with your data source:

  1. Is it an ArcGIS service URL?
    • Feature Service (/FeatureServer/N) --> FeatureLayer
    • Map Service (/MapServer) with cached tiles --> TileLayer
    • Map Service (/MapServer) with dynamic rendering --> MapImageLayer (see arcgis-advanced-layers)
    • Scene Service (/SceneServer) --> SceneLayer
    • Image Service (/ImageServer) --> ImageryTileLayer
    • Stream Service (WebSocket) --> StreamLayer
    • Vector Tile Service (/VectorTileServer) --> VectorTileLayer
  2. Is it a file or URL to raw data?
    • .geojson / GeoJSON URL --> GeoJSONLayer
    • .csv with lat/lon columns --> CSVLayer
    • .parquet --> ParquetLayer
    • .kml / .kmz --> KMLLayer (see arcgis-advanced-layers)
    • GeoRSS feed --> GeoRSSLayer
  3. Is it an OGC service?
    • WMS --> WMSLayer (see arcgis-advanced-layers)
    • WFS --> WFSLayer (see arcgis-advanced-layers)
    • OGC Feature API --> OGCFeatureLayer (see arcgis-advanced-layers)
  4. Is it client-side data (in-memory)?
    • Temporary graphics, no queries needed --> GraphicsLayer
    • Need queries, filters, renderers on client data --> FeatureLayer with source array
  5. Is it a third-party tile service?
    • XYZ/TMS tiles --> WebTileLayer

Query Method Reference

MethodReturnsUse When
queryFeatures(query)FeatureSet (graphics with geometry + attributes)You need the actual feature data
queryObjectIds(query)number[] (OIDs only)You only need IDs for highlighting or further queries
queryFeatureCount(query)numberYou need a count without fetching data
queryExtent(query){ count, extent }You want to zoom to matching features
queryRelatedFeatures(params)Related feature sets keyed by OIDYou need related table records
queryAttachments(params)AttachmentInfo[]You need file attachments

Server vs Client-side queries:

AspectfeatureLayer.queryFeatures()layerView.queryFeatures()
Runs onServerClient (browser)
Data scopeAll features in serviceOnly features currently in view/cache
Network costHTTP request per callNo network (already loaded)
Use whenNeed full dataset, pagination, statsNeed fast filtering of visible features

FeatureLayer Config Checklist

  • Set url or portalItem.id or source (client-side)
  • Set outFields: ["*"] (or list specific fields) to access attributes
  • Add popupTemplate for click interaction
  • Add renderer for custom symbology (or rely on service defaults)
  • Set definitionExpression if you need a server-side SQL filter
  • Set minScale / maxScale if the layer should only appear at certain zoom levels
  • Set visible: false if the layer should start hidden
  • For client-side layers: provide fields, objectIdField, geometryType, spatialReference
  • Await layer.load() before accessing metadata (fields, fullExtent)
  • For TypeScript: use as const on renderer/symbol objects for type safety

Common Query Patterns

Filter then display

definitionExpression --> server filters before sending data

Query then process

queryFeatures() --> iterate result.features

Highlight from query

queryObjectIds() --> layerView.highlight(oids)

Zoom to results

queryExtent() --> view.goTo(result.extent)

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.