How to use a field value for StreamLayer.elevationInfo offset with SceneView

3001
2
Jump to solution
07-29-2015 12:28 PM
by Anonymous User
Not applicable

StreamLayer has a property called elevationInfo, which itself has a property called offset. This is for setting the elevation of StreamLayer points when used with a 3D SceneView. The type for offset is Number. Rather than use an arbitrary number, like 42, I want to use a field in the stream service, like Altitude, so that each point is vertically offset according to its altitude value. Is that possible? If not, will it be possible in a future release?

I have tried a few different ways of setting the offset, but anything but an actual number value causes the StreamLayer not to display.

My code is in Dropbox: Simple 3D Map . View the source of that page to see my complete code. Here's the relevant portion:

  streamLayer = new StreamLayer(
    "https://geoeventsample3.esri.com:6443/arcgis/rest/services/SeattleBus/StreamServer", {
        purgeOptions: { displayCount: 5000 },
        socketDirection: "subscribe"
    }
  );
  streamLayer.elevationInfo = {
    mode: "absoluteHeight",
    offset: 500 //This works
    //offset: "500" //This causes the StreamLayer not to display
    //offset: "Altitude" //This causes the StreamLayer not to display
    //offset: "${Altitude}" //This causes the StreamLayer not to display
  }
Tags (1)
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

Hi Gary,

No, this is not supported at the moment. This is a concept we'll be discussing though and will let you know about future plans.

View solution in original post

2 Replies
KristianEkenes
Esri Regular Contributor

Hi Gary,

No, this is not supported at the moment. This is a concept we'll be discussing though and will let you know about future plans.

by Anonymous User
Not applicable

Thank you. I also learned that a stream service that has z-values in its geometries will display in 3D with no extra code needed.