Layers
A layer, also known as a style layer, provides style instructions that describe the visual properties that apply when rendering the layer on a map. The required properties and available options are defined by the GL Style Specification.
Except for layers of the background type, each layer needs to refer to a source. Layers take the data that they get from a source, optionally filter features, and then define how those features are styled.
fill
The fill style layer renders one or more filled (and optionally stroked) polygons on a map. You can use a fill layer to configure the visual appearance of polygon or multipolygon features. Check out all the fill layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
line
The line style layer renders one or more stroked polylines on the map. You can use a line layer to configure the visual appearance of polyline or multipolyline features. Check out all the line layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
symbol
The symbol style layer renders icon and text labels at points or along lines on a map. You can use a symbol layer to configure the visual appearance of labels for features in vector tiles. Check out all the symbol layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
raster
The raster style layer renders icon and text labels at points or along lines on a map. You can use a symbol layer to configure the visual appearance of labels for features in vector tiles. Check out all the raster layer options and properties.
Source types: ImageSource | Raster | VideoSource
Example
Related examples
circle
The circle style layer renders one or more filled circles on a map. You can use a circle layer to configure the visual appearance of point or point collection features in vector tiles. A circle layer renders circles whose radii are measured in screen units. Check out all the circle layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
fill-extrusion
The fill-extrusion style layer renders one or more filled (and optionally stroked) extruded (3D) polygons on a map. You can use a fill-extrusion layer to configure the extrusion and visual appearance of polygon or multipolygon features. Check out all the fill-extrusion layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
heatmap
The heatmap style layer renders a range of colors to represent the density of points in an area. Check out all the heatmap layer options and properties.
Source types: GeoJSONSource | Vector
Example
Related examples
hillshade
The hillshade style ayer renders digital elevation model (DEM) data on the client-side. The implementation only supports Terrain RGB and Mapzen Terrarium tiles. Check out all the hillshade layer options and properties.
Source types: Raster DEM
Example
Related examples
background
The background style layer covers the entire map. Use a background style layer to configure a color or pattern to show below all other map content. Check out all the background layer options and properties.
Example