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.

Unsupported browser

You are using a browser that is not supported. JavaScript API works on the latest versions of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. Use one of these browsers and provide your feedback through GeoNet, the Esri Community.

  • {i18n.unsupportedBrowser.chrome}
  • Firefox
  • Safari
  • undefined
Loading...

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

This sample shows how to set a RasterShadedReliefRenderer on an instance of ImageryTileLayer. RasterShadedReliefRenderer produces a grayscale or colored 3D representation of the surface on an ImageryLayer or ImageryTileLayer, with the sun's relative position taken into account for shading the image. This renderer uses the altitude and azimuth properties to specify the sun's position.

The layer in this sample contains cached global elevation data, and the controls in the top-right corner allow the user to change the renderer parameters at run-time directly on the client-side. The code below shows how to create the RasterShadedReliefRenderer and set it on the ImageryTileLayer.

var renderer = new RasterShadedReliefRenderer({
  altitude: 45, // angle of elevation above the horizon
  azimuth: 315, // position along the horizon
  hillshadeType: hillshadeType, // either "traditional" or "multi-directional"
  zFactor: 1,
  scalingType: "adjusted",
  colorRamp: colorRamp
});

var layer = new ImageryTileLayer({
  url: url,
  renderer: renderer // set the renderer on the layer
});

Sample search results

TitleSample
Loading...