Fill

A filled polygon with an optional stroked border.

Paint Property

Property NameDescriptionTypeDefaults

fill-antialias

Whether or not the fill should be antialiased.

boolean

true

fill-color

The color of the filled part of this layer.

hex values, RGB, RGBA, HSL, HSLA, Colors Name

#000000

fill-opacity

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. between 0 and 1 inclusive.

number

1

fill-outline-color

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

hex values, RGB, RGBA, HSL, HSLA, Colors Name

X

fill-translate

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

array of numbers

[0,0]

fill-translate-anchor

Controls the frame of reference for fill-translate. "map":

The fill is translated relative to the map.

"viewport":

The fill is translated relative to the viewport.

String (map or viewport)

map

Layout Property

Property NameDescriptionTypeDefaults

visibility

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

String( visible or none)

visible

Last updated