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:
var visualVariables = [
{
type: "size",
valueExpression: ValueExpression
}
];
var symbol = {
type: "polygon-3d",
symbolLayers: [{
type: "extrude",
material: { color: [155,155,155] },
edges: {
type: "solid",
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?