Extrude features based on their attributes.
Extrusion is the process of stretching a flat, 2D shape vertically to create a 3D object in a scene. For example, you can extrude building polygons by a height value to create three-dimensional building shapes.
Tap the toggle to switch between using population density and total population for extrusion. Higher extrusion directly corresponds to higher attribute values.
- Create a
ServiceFeatureTable
from a URL. - Create a feature layer from the service feature table.
- Make sure to set the rendering mode to dynamic,
statesFeatureLayer.setRenderingMode(RenderingMode.DYNAMIC)
.
- Make sure to set the rendering mode to dynamic,
- Apply a
SimpleRenderer
to the feature layer. - Set the
ExtrusionMode
of the renderer withrenderer.getSceneProperties().setExtrusionMode(SceneProperties.ExtrusionMode.ABSOLUTE_HEIGHT)
. - Set the extrusion expression of the renderer with
renderer.getSceneProperties().setExtrusionExpression("[POP2007]/ 10")
.
- FeatureLayer
- Renderer.SceneProperties
- ServiceFeatureTable
- SimpleRenderer
3D, extrude, extrusion, extrusion expression, height, renderer, scene