arcgis-advanced-layers
Skill1 starsChanged 6 months agoMITView on GitHub
Add OGC and dynamic map service layers with the ArcGIS Maps SDK for JavaScript 5.1: WMSLayer, WMTSLayer, WFSLayer (WFS 2.0.0 + GeoJSON only), OGCFeatureLayer (OGC API Features), KMLLayer, MapImageLayer (with sublayers), and CatalogLayer (a catalog layer in a FeatureServer). Use this skill when the user integrates OGC/third-party services, a national spatial-data portal, dynamic MapServer sublayers, KML, or a catalog service.
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-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
- arcgis-popup-templatesSkill
- The first 60 shown.
The file
Files
Advanced Layers
When to use: Activate this skill whenever the user integrates OGC services (WMS/WFS/KML), dynamic MapImageLayer sublayers, or the new CatalogLayer.
Overview
Beyond feature data, the SDK consumes OGC standards, dynamic map services, and catalog services.
- Problem it solves: bringing third-party and server-rendered data into a map.
- Who it serves: developers integrating external/enterprise GIS services.
- Pattern it teaches: match the layer class to the protocol; control sublayer visibility.
- What it does NOT cover: hosted feature data (see
arcgis-layers) or 3D (seearcgis-3d-layers).
Quick Start
import WMSLayer from "@arcgis/core/layers/WMSLayer.js";
const layer = new WMSLayer({ url: "https://example/geoserver/wms", sublayers: [{ name: "topp:states" }] });
map.add(layer);Decision Tree
- What protocol/service?
- WMS (server-rendered images) →
WMSLayer. - WMTS (pre-cached OGC tiles) →
WMTSLayer. - WFS (vector features) →
WFSLayer, only if the server speaks WFS 2.0.0 and offers GeoJSON output. A WFS 1.x-only server will not load. - OGC API – Features (
/collections/{id}) →OGCFeatureLayerwithurl+collectionId. - KML/KMZ →
KMLLayer. - Dynamic ArcGIS MapServer →
MapImageLayer(togglesublayers). - Many datasets in one service →
CatalogLayer(since 4.30), pointed at a FeatureServer that contains a catalog layer. A MapServer is rejected ("There is no Catalog Layer in the service"). - WCS / imagery → see
arcgis-imagery.
- WMS (server-rendered images) →
Default: MapImageLayer for ArcGIS MapServers; the OGC class that matches the standard otherwise.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import MapImageLayer from "@arcgis/core/layers/MapImageLayer.js";Dynamic Imports (CDN)
const MapImageLayer = await $arcgis.import("@arcgis/core/layers/MapImageLayer.js");Map Components (recommended for new projects)
// Create the layer with the Core API, then add it to the component's map.
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: OGC layer classes
WMSLayer renders server images; WFSLayer pulls vector features (queryable client-side);
OGCFeatureLayer reads OGC API – Features; KMLLayer renders KML/KMZ.
Two things fail without an error, both measured with SDK 5.1.27:
- A
WMSLayersublayernamethat is not in the GetCapabilities still resolvesload()withloadError = nulland draws nothing. Load the layer withoutsublayersonce and readlayer.allSublayers.map((s) => s.name)to get the real names. OGCFeatureLayerhas noqueryFeatures()on the layer: query through its layer view ((await view.whenLayerView(layer)).queryFeatures()).
Concept 2: MapImageLayer sublayers
A MapImageLayer exposes sublayers, each with id and visible. The service renders the
requested sublayers into a dynamic image — toggle visibility without re-creating the layer.
Declaring sublayers in the constructor replaces the service's list: on the USA sample
service, two declared sublayers leave the layer with 2 sublayers instead of 4. List every sublayer
you want to keep, or omit sublayers and toggle after load(). A per-sublayer renderer or
definitionExpression needs capabilities.exportMap.supportsDynamicLayers.
Concept 3: CatalogLayer (since 4.30)
A catalog layer lives inside a FeatureServer and references many datasets. After
await layer.load() it has two sublayers: footprintLayer (one polygon per dataset) and
dynamicGroupLayer (the datasets visible in the view, read-only, up to 10 at a time by default:
dynamicGroupLayer.maximumVisibleSublayers). To edit or restyle one dataset, add it to the map with
await layer.createLayerFromFootprint(footprintGraphic).
import CatalogLayer from "@arcgis/core/layers/CatalogLayer.js";
const catalog = new CatalogLayer({ url: "https://services3.arcgis.com/TVDq0jswpjtt1Xia/arcgis/rest/services/PNW_Forest_Fuels_Inventory_Status/FeatureServer" });
await catalog.load();
map.add(catalog);Common Pitfalls (Top 3)
Pitfall 1: Expecting client queries on a WMS layer
// ❌ Anti-pattern
const wms = new WMSLayer({ url });
await wms.queryFeatures(); // WMS is rendered images, not queryable features// ✅ Correct
import WFSLayer from "@arcgis/core/layers/WFSLayer.js";
const wfs = new WFSLayer({ url, name: "ms:cities" }); // WFS 2.0.0 + GeoJSON; `name` is the typename
const count = await wfs.queryFeatureCount();Impact: WMSLayer has no queryFeatures(): it serves images. For click-to-identify on a WMS,
use its popup (GetFeatureInfo, featureInfoFormat).
Pitfall 2: Re-creating MapImageLayer to toggle a sublayer
// ❌ Anti-pattern
map.remove(layer);
map.add(new MapImageLayer({ url, sublayers: [{ id: 1, visible: true }] }));// ✅ Correct
const sub = layer.findSublayerById(1);
if (sub) sub.visible = true;Impact: unnecessary re-fetch and flicker on every toggle.
Pitfall 3: CORS/SSL on third-party OGC endpoints
// ❌ Anti-pattern
new WMSLayer({ url: "http://insecure-host/wms" }); // mixed content / CORS blocked// ✅ Correct
new WMSLayer({ url: "https://host/wms" }); // HTTPS + server CORS, or a proxyImpact: the layer fails to load due to mixed-content or CORS errors.
When to Read references/
| If you need... | Read |
| Layer signatures (WMS/WFS/MapImage/Catalog) | references/api-detail.md |
| Sublayer + OGC examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-layers— hosted feature data basicsarcgis-imagery— imagery services and raster functionsarcgis-core-maps— the map the layers go on
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1.
CatalogLayeris from 4.30 and needs a FeatureServer (a MapServer is rejected, measured); footprint/dynamic-group usage; WFS 2.0.0 + GeoJSON requirement; silent wrong WMS name; declaredsublayersreplace the service list;WMTSLayerandOGCFeatureLayer. Every claim run intests/runtime/casos/arcgis-advanced-layers.tsagainst public services. - 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.

