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:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/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-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-performanceSkill
- arcgis-popup-templatesSkill
- arcgis-portal-contentSkill
- arcgis-rest-servicesSkill
- arcgis-scene-environmentSkill
- arcgis-smart-mappingSkill
- arcgis-spatial-analysisSkill
- arcgis-starter-appSkill
- arcgis-tables-formsSkill
- arcgis-time-animationSkill
- arcgis-utility-networksSkill
- arcgis-visualizationSkill
- arcgis-widgets-advancedSkill
- arcgis-widgets-uiSkill
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
- Distinctive: line 7
Start here with your data source:
≈ “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.
Files
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:
- 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(seearcgis-advanced-layers) - Scene Service (
/SceneServer) -->SceneLayer - Image Service (
/ImageServer) -->ImageryTileLayer - Stream Service (WebSocket) -->
StreamLayer - Vector Tile Service (
/VectorTileServer) -->VectorTileLayer
- Feature Service (
- Is it a file or URL to raw data?
.geojson/ GeoJSON URL -->GeoJSONLayer.csvwith lat/lon columns -->CSVLayer.parquet-->ParquetLayer.kml/.kmz-->KMLLayer(seearcgis-advanced-layers)- GeoRSS feed -->
GeoRSSLayer
- Is it an OGC service?
- WMS -->
WMSLayer(seearcgis-advanced-layers) - WFS -->
WFSLayer(seearcgis-advanced-layers) - OGC Feature API -->
OGCFeatureLayer(seearcgis-advanced-layers)
- WMS -->
- Is it client-side data (in-memory)?
- Temporary graphics, no queries needed -->
GraphicsLayer - Need queries, filters, renderers on client data -->
FeatureLayerwithsourcearray
- Temporary graphics, no queries needed -->
- Is it a third-party tile service?
- XYZ/TMS tiles -->
WebTileLayer
- XYZ/TMS tiles -->
Query Method Reference
| Method | Returns | Use 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) | number | You need a count without fetching data |
queryExtent(query) | { count, extent } | You want to zoom to matching features |
queryRelatedFeatures(params) | Related feature sets keyed by OID | You need related table records |
queryAttachments(params) | AttachmentInfo[] | You need file attachments |
Server vs Client-side queries:
| Aspect | featureLayer.queryFeatures() | layerView.queryFeatures() |
| Runs on | Server | Client (browser) |
| Data scope | All features in service | Only features currently in view/cache |
| Network cost | HTTP request per call | No network (already loaded) |
| Use when | Need full dataset, pagination, stats | Need fast filtering of visible features |
FeatureLayer Config Checklist
- Set
urlorportalItem.idorsource(client-side) - Set
outFields: ["*"](or list specific fields) to access attributes - Add
popupTemplatefor click interaction - Add
rendererfor custom symbology (or rely on service defaults) - Set
definitionExpressionif you need a server-side SQL filter - Set
minScale/maxScaleif the layer should only appear at certain zoom levels - Set
visible: falseif 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 conston renderer/symbol objects for type safety
Common Query Patterns
Filter then display
definitionExpression --> server filters before sending dataQuery then process
queryFeatures() --> iterate result.featuresHighlight from query
queryObjectIds() --> layerView.highlight(oids)Zoom to results
queryExtent() --> view.goTo(result.extent)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.

