arcgis-widgets-advanced
Skill1 starsChanged 6 months agoMITView on GitHub
Add advanced UI to a map with the ArcGIS Maps SDK for JavaScript 5.1 using Map Components: arcgis-print, arcgis-bookmarks, arcgis-compass, arcgis-daylight, and arcgis-elevation-profile, placed with slot="top-right" (a position attribute is ignored). Covers the elevation profile's results on the analysis view (the 4.x line statistics are gone) and its need for a ground, and the matching Core widgets, deprecated between 4.32 and 5.0. Use this skill whenever the user adds printing, bookmarks, a compass, daylight controls, or an elevation profile.
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
Files
Advanced Widgets
When to use: Activate this skill whenever the user adds print, bookmarks, compass, daylight, or elevation-profile UI. Prefer Map Components — widgets are deprecated in 5.0.
Overview
Advanced UI rounds out a map app: exporting, saved views, orientation, 3D lighting, and terrain profiles.
- Problem it solves: richer map tooling beyond the basics.
- Who it serves: developers building full-featured map apps and 3D scenes.
- Pattern it teaches: nest the matching
<arcgis-*>component in the map with aslot, and read analysis results where 5.x puts them. - What it does NOT cover: core UI (see
arcgis-widgets-ui) or editing (seearcgis-editing).
⚠️ The Core widgets are deprecated (Compass since 4.32, Print since 4.33, Bookmarks and Daylight since 4.34, ElevationProfile since 5.0). Use the components below.
Quick Start
<arcgis-map basemap="osm" ground="world-elevation" center="-74.1,4.65" zoom="9">
<arcgis-bookmarks slot="top-right" show-add-bookmark-button></arcgis-bookmarks>
<arcgis-compass slot="top-left"></arcgis-compass>
</arcgis-map>import "@arcgis/map-components/components/arcgis-map";
import "@arcgis/map-components/components/arcgis-bookmarks";
import "@arcgis/map-components/components/arcgis-compass";A component nested in the map goes to a corner through slot. Measured on 5.1.27: with position="top-right"
instead, the compass landed in the default slot as a 600×32 strip across the top of the map; with
slot="top-right" it sat in the corner at 32×32.
Decision Tree
- Which capability?
- Export a layout →
arcgis-print(ArcGIS Online's print service by default). - Saved viewpoints →
arcgis-bookmarks(from a web map, or added by the user withshow-add-bookmark-button). - Orientation and reset rotation →
arcgis-compass(works in 2D too). - Sun and shadows →
arcgis-daylightinarcgis-scene. - Terrain profile along a line →
arcgis-elevation-profile, with agroundon the map or scene.
- Export a layout →
- Inside the map or elsewhere on the page?
- Inside →
slot="top-right"(or another corner);reference-elementis not needed. - Outside →
reference-element="#map".
- Inside →
Default: the component matching the capability, nested in the map with a slot.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import "@arcgis/map-components/components/arcgis-print";Dynamic Imports (CDN)
await $arcgis.import("@arcgis/map-components/components/arcgis-print");Map Components (recommended for new projects)
import "@arcgis/map-components/components/arcgis-daylight";Key Concepts
Concept 1: Placement is a slot
Map components nested in arcgis-map or arcgis-scene are placed with slot (top-left, top-right,
bottom-left, bottom-right, and the -start/-end variants). None of the five components has a position
property; the attribute is ignored and the component falls into the default slot.
Concept 2: Print works out of the box
arcgis-print uses ArcGIS Online's print service when printServiceUrl is not set. Measured: with no URL and no API
key, it reached state: "ready" in about 5 s with all layouts allowed and no sign-in dialog. Exporting itself was not
measured.
Concept 3: Elevation profile results live on the analysis view
In 5.x the component's profiles are configuration only. The numbers are on the analysis view:
await mapEl.whenAnalysisView(profile.analysis) gives progress, results (one per profile line, with available
and statistics), and combined statistics. Measured: line.statistics (the 4.x shape) is undefined.
Common Pitfalls (Top 3)
Pitfall 1: Placing components with position
<!-- ❌ Anti-pattern: not a property of these components -->
<arcgis-map basemap="osm"><arcgis-compass position="top-right"></arcgis-compass></arcgis-map><!-- ✅ Correct -->
<arcgis-map basemap="osm"><arcgis-compass slot="top-right"></arcgis-compass></arcgis-map>Impact: measured: the component went to the default slot, a strip across the top of the map, instead of the corner. No error.
Pitfall 2: An elevation profile on a map without ground
<!-- ❌ Anti-pattern -->
<arcgis-map basemap="osm"><arcgis-elevation-profile slot="bottom-right"></arcgis-elevation-profile></arcgis-map><!-- ✅ Correct -->
<arcgis-map basemap="osm" ground="world-elevation">
<arcgis-elevation-profile slot="bottom-right"></arcgis-elevation-profile>
</arcgis-map>Impact: measured on a line across the Eastern Cordillera by Bogotá: without ground, progress stayed 0 and the
ground profile was available: false, with no error. With ground="world-elevation" it finished with a maximum of
3565 m.
Pitfall 3: Reading profile statistics from the line (4.x)
// ❌ Anti-pattern: undefined in 5.x
const max = profileEl.profiles.at(0)?.statistics?.maxElevation;// ✅ Correct
const analysisView = await mapEl.whenAnalysisView(profileEl.analysis!);
// whenAnalysisView returns a union of analysis views: narrow it
const max = analysisView.type === "elevation-profile-view-2d" ? analysisView.statistics?.maxElevation : undefined;Impact: measured: statistics on the profile line is undefined; the code reads nothing and shows NaN.
When to Read references/
| If you need... | Read |
| Advanced component attributes | references/api-detail.md |
| Print / bookmarks / daylight examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-widgets-ui— core UI componentsarcgis-scene-environment— deeper 3D lighting/atmospherearcgis-core-maps— the map/scene to bind to
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Runtime checks in
tests/runtime/casos/arcgis-widgets-advanced.ts. Every example placed components withposition="top-right", which these components do not have: measured, they land in the default slot as a strip across the map; nowslot. The elevation profile reads its results from the analysis view (the 4.xline.statisticsisundefined, measured) and needs aground(without it,progressstays 0 and nothing errors, measured). Removed false or empty pitfalls: print does work without a URL (ArcGIS Online by default,state: "ready"with no key), the compass does work in 2D (it followed a 45° rotation), and the comment-only ones. Corrected the deprecation versions (4.32 to 5.0, not all 5.0), thedist/componentsimport paths, and the CDN import, which pointed at the deprecated widget. - 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.

