Load a basic web scene

This device does not support 3D.

View the system requirements for more information.

This sample demonstrates how to load a web scene from an ArcGIS for Portal item into a custom application. This scene illustrates the shadows cast by mountains surrounding Queenstown, Otago, New Zealand on the Winter Solstice (21, June 2014). Each line represents the edge of the shadows cast by surrounding mountains at particular times of the day.

Loading a web scene is easy. All that's required is the item ID of the WebScene item from the portal.

Create a new WebScene instance and set the portal item ID inside the portalItem property of the WebScene. Since WebScene extends esri/Map, you then set the web scene instance on the map property of the SceneView.

/************************************************************
* Creates a new WebScene instance. A WebScene must reference
* a PortalItem ID that represents a WebScene saved to
* arcgis.com or an on-premise portal.
************************************************************/

var scene = new WebScene({
  portalItem: { // autocasts as new PortalItem()
    id: "3a9976baef9240ab8645ee25c7e9c096"
  }
});

/************************************************************
* Set the WebScene instance to the map property in a SceneView.
************************************************************/
var view = new SceneView({
  map: scene,
  container: "viewDiv"
});

To reference an item from an on-premise portal, set the URL of the portal in esriConfig.portalUrl.

Sample search results

TitleSample

There were no match results from your search criteria.