arcgis-smart-mapping
Skill1 starsChanged 6 months agoMITView on GitHub
Auto-generate data-driven renderers with the ArcGIS Maps SDK for JavaScript 5.1 Smart Mapping modules: color, size, and type renderer creators. Covers createContinuousRenderer, createClassBreaksRenderer (equal-interval by default, which crowds skewed data into one class), createRenderer (top 10 categories plus "Other" by default), where the statistics come from, and the silent results on the wrong field type. Use this skill whenever the user wants the SDK to choose symbology automatically from the data.
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-editingSkill
- 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
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Pattern it teaches: call a creator with { layer, field, view }, then assign its renderer.
≈ “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
Smart Mapping
When to use: Activate this skill whenever the user wants the SDK to pick symbology automatically — color/size ramps and class breaks computed from the data.
Overview
Smart Mapping creators compute a field's statistics and return a ready-to-use renderer.
- Problem it solves: choosing breaks, ramps, and sizes without manual tuning.
- Who it serves: developers who want quick, statistically sound thematic maps.
- Pattern it teaches: call a creator with
{ layer, field, view }, then assign itsrenderer. - What it does NOT cover: hand-built renderers (see
arcgis-visualization).
Quick Start
import * as colorRendererCreator from "@arcgis/core/smartMapping/renderers/color.js";
const { renderer } = await colorRendererCreator.createClassBreaksRenderer({
layer, view, field: "POP",
classificationMethod: "quantile", // the default, equal-interval, crowds skewed data into one class
numClasses: 5,
});
layer.renderer = renderer; // the creator never assigns itDecision Tree
- What should encode the value?
- Color →
smartMapping/renderers/color.js. - Size →
smartMapping/renderers/size.js. - Category/type →
smartMapping/renderers/type.js(string fields).
- Color →
- Continuous or classed?
- Continuous →
createContinuousRenderer. - Classed →
createClassBreaksRendererwith an explicitclassificationMethod.
- Continuous →
- Many categories?
- Yes → decide
numTypes(default 10;-1for all).
- Yes → decide
Default: color createContinuousRenderer for numeric fields; type.createRenderer for categories.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import * as colorRendererCreator from "@arcgis/core/smartMapping/renderers/color.js";Dynamic Imports (CDN)
const colorRendererCreator = await $arcgis.import("@arcgis/core/smartMapping/renderers/color.js");Map Components (recommended for new projects)
// Pass the component's view (await el.viewOnReady(); el.view) into the creator.
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: Where the statistics come from
Measured with 5.1.27: the statistics covered the whole layer, not the view's extent. A service layer gave
n=3557 with the view over New York, over the whole country and with no view at all; a client-side layer built
from source also gave all 51 features with the view over New York. The layer's definitionExpression is respected
(st = 'NY' gave n=187); a filter with where is ignored (only geometry intersects filters count).
Concept 2: What the view is for
view lets the creator read the background to pick colors (basemapTheme came back "light" over OSM). It is
optional: without it the creators still resolved. Measured: a creator called before view.when() resolved with the
same statistics.
Concept 3: The result object
Creators return { renderer, statistics, basemapTheme, … } (color continuous also visualVariable). They never
touch the layer: measured, layer.renderer stayed simple until assigned.
Common Pitfalls (Top 3)
Pitfall 1: Default class breaks on skewed data
// ❌ Anti-pattern
const { renderer } = await colorRendererCreator.createClassBreaksRenderer({ layer, view, field: "POP" });// ✅ Correct
const { renderer } = await colorRendererCreator.createClassBreaksRenderer({
layer, view, field: "POP", classificationMethod: "quantile", // or "natural-breaks"
});Impact: measured on US city populations: the default produced 5 equal intervals of ~1.6 million, and 3553 of
3557 cities fell in the first class: one color for almost the whole map. With "quantile" the first class ended
at 12938 and held 712.
Pitfall 2: A category map that only shows ten categories
// ❌ Anti-pattern
const { renderer } = await typeRendererCreator.createRenderer({ layer, view, field: "STATE" });// ✅ Correct
const { renderer } = await typeRendererCreator.createRenderer({ layer, view, field: "STATE", numTypes: -1 });Impact: measured on a field with 51 values: 10 uniqueValueInfos, and everything else drawn with the default
symbol labeled Otro ("Other"). With numTypes: -1, all 51.
Pitfall 3: A continuous renderer on a text field
// ❌ Anti-pattern
colorRendererCreator.createContinuousRenderer({ layer, view, field: "NAME" });// ✅ Correct
typeRendererCreator.createRenderer({ layer, view, field: "NAME" }); // categoriesImpact: measured: no error. It returned a class-breaks renderer with min/max undefined and made-up
stops 0, 25, 50, 75, 100. Check the field type before choosing the module.
When to Read references/
| If you need... | Read |
| Creator signatures | references/api-detail.md |
| Color / size / type examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-visualization— the renderers Smart Mapping producesarcgis-layers— the layer to analyzearcgis-core-maps— the view used for statistics
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Measured in
tests/runtime/casos/arcgis-smart-mapping.ts. Two of the three old top pitfalls were false: calling beforeview.when()works, and a text field does not fail (it silently returns made-up stops, which is now the third pitfall). The old Concept 1 ("samples features in the view") was false: statistics cover the whole layer. New top pitfalls, measured: equal-interval breaks put 3553 of 3557 cities in one class, and the type creator keeps only 10 categories. Added thatfilter.whereis ignored; replaced the deprecatedview.watch. - 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.

