# Fill Layer

A fill layer renders map features as filled polygons. The layer's data source should supply polygon data. The color of a filled polygon is specified by the fill-color property. An optional 1-pixel outline can be added by specifying the fill-outline-color property.

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

# Layout Properties

▸ fill-sort-key (opens new window)

number.

Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.

▸ visibility (opens new window)

Optional boolean (default: true).

Whether this layer is displayed.

# Paint Properties

▸ fill-antialias (opens new window)

Optional boolean (default: true).

Whether or not the fill should be antialiased.

▸ fill-opacity (opens new window)

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

The opacity of the entire fill layer. In contrast to the fill-color, this value will also affect the 1px stroke around the fill, if the stroke is used.

▸ fill-color (opens new window)

Optional color (default: #000000).

The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.

▸ fill-outline-color (opens new window)

color.

The outline color of the fill. Matches the value of fill-color if unspecified.

▸ fill-translate (opens new window)

Optional array (default: 0,0).

The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

▸ fill-translate-anchor (opens new window)

Optional enum (default: map).

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

Controls the frame of reference for fill-translate.

▸ fill-pattern (opens new window)

resolvedImage.

Name of image in sprite to use for drawing image 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.