# Fill Extrusion Layer

A fill extrusion layer renders map features as extruded (3D) polygons. The layer's data source should supply polygon data. The height (in metres) of an extruded polygon is specified by the fill-extrusion-height property.

<flow-map-layer type="fill-extrusion" ...>
  fill-extrusion-color: red;
  fill-extrusion-height: @prop1 * 10;
</flow-map-layer>

# Layout Properties

▸ visibility (opens new window)

Optional boolean (default: true).

Whether this layer is displayed.

# Paint Properties

▸ fill-extrusion-opacity (opens new window)

Optional number (default: 1): between 0 and 1 inclusive.

The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.

▸ fill-extrusion-color (opens new window)

Optional color (default: #000000).

The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root light settings. If this color is specified as rgba with an alpha component, the alpha component will be ignored; use fill-extrusion-opacity to set layer opacity.

▸ fill-extrusion-translate (opens new window)

Optional array (default: 0,0).

The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.

▸ fill-extrusion-translate-anchor (opens new window)

Optional enum (default: map).

ValueDescription
map
The fill extrusion is translated relative to the map.
viewport
The fill extrusion is translated relative to the viewport.

Controls the frame of reference for fill-extrusion-translate.

▸ fill-extrusion-pattern (opens new window)

resolvedImage.

Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

▸ fill-extrusion-height (opens new window)

Optional number (default: 0): minimum = 0.

The height with which to extrude this layer.

▸ fill-extrusion-base (opens new window)

Optional number (default: 0): minimum = 0.

The height with which to extrude the base of this layer. Must be less than or equal to fill-extrusion-height.

▸ fill-extrusion-vertical-gradient (opens new window)

Optional boolean (default: true).

Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.