Select to view content in your preferred language

How to work with real 3D data in a SceneView?

3070
1
Jump to solution
12-03-2015 03:13 AM
janjermei
Occasional Contributor

I have an ESRI map service that exposes polylines. This map service has HasZ: true.

The z-value is relative to the sea level, not to the terrain.

When I add this map service to a map and display it in a SceneView, I have the impression that the geometries are draped on the basemap and that their true z-values are ignored.

The map service has Spatial Reference: 31370.

Is it possible to display true 3D geometries in the SceneView?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

Hi Jan,

Yes you can display 3D geometries in a SceneView. How are you setting up the layer? Are you using FeatureLayer? If so, you would need to set the returnZ and elevationInfo properties like this:

var lyr = new FeatureLayer({
  url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/VerticalLines/MapServer/0",
  returnZ: true,
  elevationInfo: {
    mode: "absoluteHeight"
  }
});

View solution in original post

0 Kudos
1 Reply
KristianEkenes
Esri Regular Contributor

Hi Jan,

Yes you can display 3D geometries in a SceneView. How are you setting up the layer? Are you using FeatureLayer? If so, you would need to set the returnZ and elevationInfo properties like this:

var lyr = new FeatureLayer({
  url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/VerticalLines/MapServer/0",
  returnZ: true,
  elevationInfo: {
    mode: "absoluteHeight"
  }
});
0 Kudos