polygon-3d is not being draped over the ground in a SceneView

140
0
04-05-2019 01:25 PM
Jay_Gregory
Occasional Contributor III

Using 4.11 version of the JS API, trying to visualize a polygon feature layer in 3D - these features start on the ground and should be extruded to a given height.

I can get the extrusion to work using visual variables.  But if the height is under the elevation of the terrain (lets say the height is only 100 meters), then the layer "disappears" under the terrain (see screenshot).  

I thought I could solve this by using elevationInfo's mode "on-the-ground", but I'm still getting the same issue.  

Am I doing something wrong here?

Here is my elevationInfo:

const elevationInfo = {
mode: "on-the-ground",
offset: 100,
unit: 'feet'
}

Here is my renderer:

//ValueExpression up here

var visualVariables = [
{
type: "size",
valueExpression: ValueExpression
}
];

var symbol = {
type: "polygon-3d", // autocasts as new PolygonSymbol3D()
symbolLayers: [{
type: "extrude", // autocasts as new ExtrudeSymbol3DLayer()
//size: 1000, // Height of the extrusion in meters
material: { color: [155,155,155] },
edges: {
type: "solid", // autocasts as new SolidEdges3D()
color: [50, 50, 50, 0.5]
}
}]
};

‍‍‍‍‍‍‍‍‍‍‍‍
var renderer = {
type: 'simple',
symbol: symbol,
visualVariables: visualVariables
}

I assign renderer to feature layer renderer, and elevationInfo to feature layer elevationInfo.

If I set the offset to something ridiculously high in elevationInfo, I can see my layer, but I want the base draped on the ground and extruded to the value above the terrain.  

Any suggestions?

0 Kudos
0 Replies