MGLStyleLayer is an abstract base class for style layers. A style layer
manages the layout and appearance of content at a specific z-index in a style.
An MGLStyle object consists of one or more MGLStyleLayer objects.

Each style layer defined by the style JSON file is represented at runtime by an
MGLStyleLayer object, which you can use to refine the map’s appearance. You
can also add and remove style layers dynamically.

Create instances of MGLBackgroundStyleLayer and the concrete subclasses of
MGLForegroundStyleLayer in order to use MGLStyleLayer‘s properties and methods.
You do not create instances of MGLStyleLayer directly, and do not
create your own subclasses of this class.

Do not add MGLStyleLayer objects to the style property of a MGLMapView before
-mapView:didFinishLoadingStyle: is called.

Declaration

MGLForegroundStyleLayer is an abstract superclass for style layers whose
content is defined by an MGLSource object.

Create instances of MGLRasterStyleLayer and the concrete subclasses of
MGLVectorStyleLayer in order to use MGLForegroundStyleLayer‘s methods.
Do not create instances of MGLForegroundStyleLayer directly, and do not
create your own subclasses of this class.

Declaration

An MGLBackgroundStyleLayer is a style layer that covers the entire map. Use a
background style layer to configure a color or pattern to show below all other
map content. If the style’s other layers use the Mapbox Streets source, the
background style layer is responsible for drawing land, whereas the oceans and
other bodies of water are drawn by MGLFillStyleLayer objects.

A background style layer is typically the bottommost layer in a style, because
it covers the entire map and can occlude any layers below it. You can therefore
access it by getting the last item in the MGLStyle.layers array.

If the background style layer is transparent or omitted from the style, any
portion of the map view that does not show another style layer is transparent.

Declaration

An MGLRasterStyleLayer is a style layer that renders raster tiles on the map.

Use a raster style layer to configure the color parameters of raster tiles
loaded by an MGLRasterSource object. For example, you could use a raster
style layer to render Mapbox
Satellite imagery, a raster tile
set uploaded to Mapbox Studio, or a raster map authored in TileMill, the classic
Mapbox Editor, or Mapbox Studio Classic.

A circle style layer renders circles whose radii are measured in screen units.
To display circles on the map whose radii correspond to real-world distances,
use many-sided regular polygons and configure their appearance using an
MGLFillStyleLayer object.