Skip to main content

3D Scene

An interactive 3D surface that loads an ArcGIS WebScene by item id from ArcGIS Online or an Enterprise portal. It is built on the ArcGIS SceneView (via the <arcgis-scene> web component) and intentionally mirrors the ArcGIS Map widget, so the two stay consistent while leaving room for 3D-specific options to diverge.

At a glance

Type keyarcgis-scene
Default size8 × 14 (min 4 × 6)
Data sourceA WebScene Portal item
Emitsmap:extent-change, map:layer-click
Receivesmap-command (from AI Chat), zoom / pan (from a List item click)
Sourcesrc/widgets/widgets/arcgis-scene/

Configuration

The widget's config schema (schema.ts):

FieldTypeDefaultPurpose
webSceneIdstring""Portal item id of the WebScene. Empty shows the placeholder.
portalUrlstring?Enterprise portal URL; defaults to ArcGIS Online.
authobject?OAuth for secured portals (appId, popup).
hideAttributionbooleantrueHide the attribution banner.
mouseWheelZoombooleantrueEnable mouse-wheel zoom.
popupEnabledbooleantrueShow the feature popup on click.
controlsobjectzoom top-leftPlacement of zoom, home, layerList, bookmarks, lineOfSight, viewshed (corner + inExpand) or null to hide.
expandscorner[] (max 4)[]Corners that host expand containers.
basemapSwitcherobjecthiddenplacement, defaultLabel, and up to 4 options (itemId, label).
layerToggleobjecthiddenplacement and up to 8 options (layerId, label).
quickFilterobjecthiddenplacement and up to 8 filters (layerId, label, clauses). Each filter is a multi-clause SQL expression (field, operator, value/field operand) joined by AND/OR, applied to its layer.
savedViewshedsobject[][]Viewsheds the user saved to the workspace (id, name, observer, farDistance, heading, tilt, horizontalFieldOfView, verticalFieldOfView). Recreated on load.
theme"light" | "dark""dark"Theme for the ArcGIS controls.

A freshly added scene starts with an empty webSceneId, so it prompts you to pick a WebScene before rendering.

The schema reuses the Map widget's shared primitives (ArcGisAuth, ControlPlacement, BasemapSwitcher, LayerToggle, QuickFilter) and extends the controls set with the 3D-only lineOfSight and viewshed placements via its own SceneUiControls.

Config panel

  • Data — WebScene item picker. Once a WebScene is selected, a preview card shows its thumbnail, title, and summary with a link to open the item in a new tab (see Picking an ArcGIS data source).
  • Appearance — drag nine controls (Zoom, Home, Layers, Bookmarks, Line of sight, Viewshed, Basemaps, Toggle, Filter) into scene corners or expand containers, edit basemap/layer/filter options, choose the theme, and toggle attribution, mouse-wheel zoom, and popups.

Line of sight (3D only)

The Line of sight control places the arcgis-line-of-sight web component on the scene. It runs a 3D line-of-sight visibility analysis: the first click sets the observer and subsequent clicks place target points, with visible segments shown green and occluded segments red. It has no equivalent in the 2D Map widget.

Viewshed (3D only)

The Viewshed control places interactive ViewshedAnalysis viewsheds on the scene. It surfaces an on-scene panel for authoring multiple viewsheds:

  • Add viewshed starts an interactive placement — click once in the scene to set the observer, then click again to set the viewing direction. Press Esc to finish. You can add as many viewsheds as you like.
  • Each viewshed has an editable name field so you can label what it covers.
  • Each viewshed has its own collapsible settings: observer elevation (the point's z), far distance, heading, tilt, and horizontal / vertical field of view. Editing a value updates the live analysis immediately, and dragging a viewshed's in-scene manipulators reflects back into the panel.
  • Expanding a viewshed selects it in the scene so it can be edited directly; the trash icon removes a single viewshed and Clear all removes them all.
  • The bookmark toggle saves a viewshed to the workspace. Saved viewsheds are written to the widget's savedViewsheds config, so they are recreated the next time the workspace loads and stay editable and deletable. Renaming, re-shaping, or deleting a saved viewshed updates the workspace; toggling the bookmark off again drops it from the saved set. Viewsheds that are not saved are session-only and clear on refresh or when the control is removed.

The analysis is added to the SceneView on mount and removed on unmount (or when the WebScene is swapped), so unsaved viewsheds never leak across scenes. Like Line of sight, it has no equivalent in the 2D Map widget.

Bookmarks

A SceneView has no bookmarks widget like the 2D Map; instead a WebScene stores its saved viewpoints as presentation slides. The Bookmarks control surfaces those slides as a bookmark list (named "Bookmarks" for consistency with the Map widget): clicking an entry animates the view to that slide's viewpoint, and entries can be reordered by dragging. Creating and removing bookmarks is intentionally not offered — the list reflects the slides authored on the WebScene. The control renders nothing when the WebScene has no slides.

Cross-widget actions

The 3D Scene exposes the same interactions as the Map widget and reuses its actions panel:

  • map:extent-change — fired when the view settles after pan/zoom, carrying a MapExtentPayload (extent + center as JSON). Wire it to a Table, List, Indicator, or Details as a filter.
  • map:layer-click — fired when a feature is clicked, carrying a LayerClickPayload (layer id, title, attributes). Wire it to a Details widget as show-feature.

Like the Map, it also receives the map-command effect from an AI Chat widget, applying the assistant's zoom commands to the scene with view.goTo. It likewise receives zoom / pan from a List's list:item-click, navigating to the clicked item's feature.

It also registers its live SceneView so its own config panel can enumerate the scene's layers for the layer toggle.

Notable behavior

  • Extent debouncing. Emits are coalesced with a 300 ms trailing debounce (shared with the Map widget) to avoid a burst of downstream filter queries.
  • Connection-safe. The portal and auth are injected at render time from the active ArcGIS connection — any portal info carried in saved config is ignored, so a scene never requests items from a portal you're no longer signed in to.
  • Initial viewpoint. The WebScene's own initial viewpoint (falling back to the item extent) is used the first time the view loads.
  • Layer toggle visibility. The layer toggle requires at least one layer to be added before it works. When enabled it shows the first layer in the list (its pill active) and hides the rest, letting a viewer reveal one layer at a time; removing the toggle reinstates each layer's default visibility by reading it back from the source WebScene item via the SDK (no layer state is stored locally), so dynamic layer changes are respected.
  • Quick filter. Each quick filter is a SQL expression built from one or more clauses. A clause picks a field, an operator (equal, not equal, the four comparisons, between / not between, is null / is not null), and either a typed value or another field to compare against. Value inputs adapt to the field type (date picker, number input, or text); for equal / not equal on a non-date field the value is chosen from the field's distinct values (queried live from the layer). Clauses are chained with AND / OR, and a live preview shows the expression as it is built. The control turns the expression into a layer definition expression (string/date values are quoted, numeric values are not, based on the field's type). Filters apply one at a time — clicking a pill applies its filter, clicking it again or switching pills restores the previously-filtered layer to its authored definition expression read back from the WebScene item (no filter state is stored locally). No filter is applied on load, so data is never unexpectedly hidden.