You are using a browser that is no longer supported. Please use the latest version of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. For more information please see the System Requirements.
Skip To ContentArcGIS for DevelopersSign In Dashboard
Loading...

Note: Support for 3D on mobile devices may vary, view the system requirements for more information.

This sample shows how to add a SceneLayer with realistic textures to a map in a SceneView. The SceneLayer is given an offset of 6 meters, to better align with the terrain.

var sceneLayer = new SceneLayer({
  portalItem: {
    id: "2342ab7928834076a1240fb93c60e978"
  },
  elevationInfo: {
    mode: "absolute-height",
    offset: 6
  }
});

The scene is made more realistic by enabling shadows and setting the lighting based on a specific time of day using the environment property of the SceneView.

view.environment = {
  lighting: {
    date: new Date("July 15, 2015 8:00:00 PDT"),
    directShadowsEnabled: true
  },
  atmosphere: {
    quality: "high"
  }
};

Other helpful resources

Sample search results

TitleSample
Loading...