Analysis objects

This sample demonstrates how you can instantiate an analysis object for the following types:

These objects can be added to SceneView.analyses, a collection of client side analyses. This allows for measuring, slicing and performing visibility analyses programmatically without the use of widgets. Further, these objects can be passed to the constructor of widgets and view models in order to set their initial state.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Example Slice Analysis Object
const shape = new SlicePlane({
  position: {
    spatialReference: { wkid: 102100 },
    x: -8238840,
    y: 4971700,
    z: 21
  },
  tilt: 0,
  width: 70,
  height: 70,
  heading: 280
});
const sliceAnalysis = new SliceAnalysis({
  title: "sliceAnalysis",
  shape: shape
});

// Add slice analysis object to slice widget
const widget = new Slice({ view: view, analysis: sliceAnalysis });
view.ui.add(widget, "bottom-right");

For using AreaMeasurementAnalysis Object see also the sample Area measurement analysis object.

The sample also shows how to create a custom UI element to interactively add and edit the viewshed analysis.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close