Messenger amp; Red Bag Tweed Grey dAaq4ZYxw

A Mapbox style is a document that defines the visual appearance of a map: what data to draw, the order to draw it in, and how to style the data when drawing it. A style document is a JSON object with specific root level and nested properties. This specification defines and describes these properties.

The intended audience of this specification includes:

Developers using the Mapbox Maps SDK for iOS or Mapbox Maps SDK for macOS should consult the iOS SDK API reference for platform-appropriate documentation of style-related features.

Root Properties

Root level properties of a Mapbox style specify the map's layers, tile sources and other resources, and default values for the initial camera position when not specified elsewhere.

{
    "version": 8,
    "name": "Mapbox Streets",
    "sprite": "mapbox://sprites/mapbox/streets-v8",
    "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
    "sources": {...},
    "layers": [...]
}

Style specification version number. Must be 8.

"version": 8

A human-readable name for the style.

"name": "Bright"
Optional.

Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.

Optional array of numbers.

Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).

"center": [
  -73.9749,
  40.7736
]
Optional number.

Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).

"zoom": 12.5
Optional number. Units in degrees. Defaults to 0.

Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).

"bearing": 29
Optional number. Units in degrees. Defaults to 0.

Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).

"pitch": 50
Optional light.

The global light source.

"light": {
  "anchor": "viewport",
  "color": "white",
  "intensity": 0.4
}

Data source specifications.

"sources": {
  "mapbox-streets": {
    "type": "vector",
    "url": "mapbox://mapbox.mapbox-streets-v6"
  }
}

A base URL for retrieving the sprite image and metadata. The extensions .png, .json and scale factor @2x.png will be automatically appended. This property is required if any layer uses the background-pattern, fill-pattern, line-pattern, fill-extrusion-pattern, or icon-image properties. The URL must be absolute, containing the scheme, authority and path components.

"sprite": "mapbox://sprites/mapbox/bright-v8"

A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include {fontstack} and {range} tokens. This property is required if any layer uses the text-field layout property. The URL must be absolute, containing the scheme, authority and path components.

"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
Optional transition.

A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's transition property.

"transition": {
  "duration": 300,
  "delay": 0
}
Required array of layers.

Layers will be drawn in the order of this array.

"layers": [
  {
    "id": "water",
    "source": "mapbox-streets",
    "source-layer": "water",
    "type": "fill",
    "paint": {
      "fill-color": "#00ffff"
    }
  }
]

Light

A style's light property provides global light source for that style.

"light": {
  "anchor": "viewport",
  "color": "white",
  "intensity": 0.4
}
Optional PARTY PROM CLUTCH PURSE NEON HANDBAG Royal SNAKE EVENING LADIES WEDDING RETRO SKIN NEW Yq466f. One of "map", "viewport". Defaults to "viewport".

Whether extruded geometries are lit relative to the map or viewport.

"map":

The position of the light source is aligned to the rotation of the map.

"viewport":

The position of the light source is aligned to the rotation of the viewport.

"anchor": "map"
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Optional array of numbers. Defaults to [1.15,210,30]. Transitionable.

Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when light.anchor is set to viewport corresponds to the top of the viewport, or 0° when light.anchor is set to map corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).

"position": [
  1.5,
  90,
  80
]
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Optional color. Defaults to "#ffffff". Transitionable.

Color tint for lighting extruded geometries.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Optional number between 0 and 1 inclusive. Defaults to 0.5. Transitionable.

Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

Sources

Sources supply data to be shown on the map. The type of source is specified by the"type" property, and must be one of vector, raster, raster-dem, geojson, image, video. Adding a source won't immediately make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.

Tiled sources (vector and raster) must specify their details in terms of the TileJSON specification. This can be done in several ways:

  • By supplying TileJSON properties such as "tiles", "minzoom", and"maxzoom" directly in the source:
    "mapbox-streets": {
        "type": "vector",
        "tiles": [
        "http://a.example.com/tiles/{z}/{x}/{y}.pbf",
        "http://b.example.com/tiles/{z}/{x}/{y}.pbf"
        ],
        "maxzoom": 14
    }
  • By providing a "url" to a TileJSON resource:
    "mapbox-streets": {
        "type": "vector",
        "url": "http://api.example.com/tilejson.json"
    }
  • By providing a url to a WMS server that supports EPSG:3857 (or EPSG:900913) as a source of tiled data. The server url should contain a "{bbox-epsg-3857}"replacement token to supply the bbox parameter.
    "wms-imagery": {
        "type": "raster",
        "tiles": [
        'http://a.example.com/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=example'
        ],
        "tileSize": 256
    }

vector

A vector tile source. Tiles must be in Mapbox Vector Tile format. All geometric coordinates in vector tiles must be between -1 * extent and (extent * 2) - 1 inclusive. All layers that use a vector source must specify a "source-layer"value. For vector tiles hosted by Mapbox, the "url" value should be of the form mapbox://mapid.

"mapbox-streets": {
    "type": "vector",
    "url": "mapbox://mapbox.mapbox-streets-v6"
}
url

A URL to a TileJSON resource. Supported protocols are http:, https:, and mapbox://.

Optional array of strings.

An array of one or more tile source URLs, as in the TileJSON spec.

Optional array of numbers. Defaults to [-180,-85.051129,180,85.051129].

An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: [sw.lng, sw.lat, ne.lng, ne.lat]. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.

Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.

"xyz":

Slippy map tilenames scheme.

"tms":

OSGeo spec scheme.

Optional number. Defaults to 0.

Minimum zoom level for which tiles are available, as in the TileJSON spec.

Optional number. Defaults to 22.

Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.

Contains an attribution to be displayed when the map is shown to a user.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

raster

A raster tile source. For raster tiles hosted by Mapbox, the "url" value should be of the form mapbox://mapid.

"mapbox-satellite": {
    "type": "raster",
    "url": "mapbox://mapbox.satellite",
    "tileSize": 256
}
url

A URL to a TileJSON resource. Supported protocols are http:, https:, and mapbox://.

Optional array of strings.

An array of one or more tile source URLs, as in the TileJSON spec.

Optional array of numbers. Defaults to [-180,-85.051129,180,85.051129].

An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: [sw.lng, sw.lat, ne.lng, ne.lat]. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.

Optional number. Defaults to 0.

Minimum zoom level for which tiles are available, as in the TileJSON spec.

Optional number. Defaults to 22.

Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.

Optional number. Units in pixels. Defaults to 512.

The minimum visual size to display tiles for this layer. Only configurable for raster layers.

Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.

"xyz":

Slippy map tilenames scheme.

"tms":

OSGeo spec scheme.

Contains an attribution to be displayed when the map is shown to a user.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

raster-dem

A raster DEM source. Currently only supports Mapbox Terrain RGB (mapbox://mapbox.terrain-rgb)

"mapbox-terrain-rgb": {
    "type": "raster-dem",
    "url": "mapbox://mapbox.terrain-rgb"
}
url

A URL to a TileJSON resource. Supported protocols are http:, https:, and mapbox://.

Optional array of strings.

An array of one or more tile source URLs, as in the TileJSON spec.

Optional array of numbers. Defaults to [-180,-85.051129,180,85.051129].

An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: [sw.lng, sw.lat, ne.lng, ne.lat]. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.

Optional number. Defaults to 0.

Minimum zoom level for which tiles are available, as in the TileJSON spec.

Optional number. Defaults to 22.

Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.

Optional number. Units in pixels. Defaults to 512.

The minimum visual size to display tiles for this layer. Only configurable for raster layers.

Contains an attribution to be displayed when the map is shown to a user.

Optional PARTY PROM CLUTCH PURSE NEON HANDBAG Royal SNAKE EVENING LADIES WEDDING RETRO SKIN NEW Yq466f. One of "terrarium", "mapbox". Defaults to "mapbox".

The encoding used by this source. Mapbox Terrain RGB is used by default

"terrarium":

Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.

"mapbox":

Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 Not yet supported Not yet supported Not yet supported

geojson

A GeoJSON source. Data must be provided via a "data"property, whose value can be a URL or inline GeoJSON.

"geojson-marker": {
    "type": "geojson",
    "data": {
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [-77.0323, 38.9131]
        },
        "properties": {
            "title": "Mapbox DC",
            "marker-symbol": "monument"
        }
    }
}

This example of a GeoJSON source refers to an external GeoJSON document via its URL. The GeoJSON document must be on the same domain or accessible using CORS.

"geojson-lines": {
    "type": "geojson",
    "data": "./lines.geojson"
}
Optional.

A URL to a GeoJSON file, or inline GeoJSON.

Optional number. Defaults to 18.

Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).

Contains an attribution to be displayed when the map is shown to a user.

Optional number between 0 and 512 inclusive. Defaults to 128.

Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.

Optional number. Defaults to 0.375.

Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).

Optional boolean. Defaults to false.

If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new Point features in the source with additional properties:

  • cluster Is true if the point is a cluster
  • cluster_id A unqiue id for the cluster to be used in conjunction with the cluster inspection methods
  • point_count Number of original points grouped into this cluster
  • point_count_abbreviated An abbreviated point count
Optional number greater than or equal to 0. Defaults to 50.

Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.

Optional number.

Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered).

Optional boolean. Defaults to false.

Whether to calculate line distance metrics. This is required for line layers that specify line-gradient values.

Optional boolean. Defaults to false.

Whether to generate ids for the geojson features. When enabled, the feature.id property will be auto assigned based on its index in the features array, over-writing any previous values.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

clustering

>= 0.14.0 >= 4.2.0 >= 3.4.0 >= 0.3.0

image

An image source. The "url" value contains the image location.

The "coordinates" array contains [longitude, latitude] pairs for the image corners listed in clockwise order: top left, top right, bottom right, bottom left.

"image": {
    "type": "image",
    "url": "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
    "coordinates": [
        [-80.425, 46.437],
        [-71.516, 46.437],
        [-71.516, 37.936],
        [-80.425, 37.936]
    ]
}
Required array of array of numbers.

Corners of image specified in longitude, latitude pairs.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

video

A video source. The "urls" value is an array. For each URL in the array, a video element source will be created, in order to support same media in multiple formats supported by different browsers.

The "coordinates" array contains [longitude, latitude] pairs for the video corners listed in clockwise order: top left, top right, bottom right, bottom left.

"video": {
    "type": "video",
    "urls": amp; Bag Messenger Tweed Grey Red [
        "https://www.mapbox.com/drone/video/drone.mp4",
        "https://www.mapbox.com/drone/video/drone.webm"
    ],
    "coordinates": [
        [-122.51596391201019, 37.56238816766053],
        [-122.51467645168304, 37.56410183312965],
        [-122.51309394836426, 37.563391708549425],
        [-122.51423120498657, 37.56161849366671]
    ]
}
Required array of strings.

URLs to video content in order of preferred format.

Required array of array of numbers.

Corners of video specified in longitude, latitude pairs.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 Not yet supported Not yet supported Not yet supported

Sprite

A style's sprite property supplies a URL template for loading small images to use in rendering background-pattern, fill-pattern, line-pattern,fill-extrusion-pattern and icon-image style properties.

"sprite": "mapbox://sprites/mapbox/bright-v8"

A valid sprite source must supply two types of files:

  • An index file, which is a JSON document containing a description of each image contained in the sprite. The content of this file must be a JSON object whose keys form identifiers to be used as the values of the above style properties, and whose values are objects describing the dimensions (width andheight properties) and pixel ratio (pixelRatio) of the image and its location within the sprite (x and y). For example, a sprite containing a single image might have the following index file contents:
    {
        "poi": {
            "width": 32,
            "height": 32,
            "x": 0,
            "y": 0,
            "pixelRatio": 1
        }
    }
    Then the style could refer to this sprite image by creating a symbol layer with the layout property"icon-image": "poi", or with the tokenized value "icon-image": "{icon}" and vector tile features with a icon property with the value poi.
  • Image files, which are PNG images containing the sprite data.

Mapbox SDKs will use the value of the sprite property in the style to generate the URLs for loading both files. First, for both file types, it will append @2x to the URL on high-DPI devices. Second, it will append a file extension: .json for the index file, and .png for the image file. For example, if you specified "sprite": "https://example.com/sprite", renderers would load https://example.com/sprite.json and https://example.com/sprite.png, orhttps://example.com/sprite@2x.json and https://example.com/sprite@2x.png.

If you are using Mapbox Studio, you will use prebuilt sprites provided by Mapbox, or you can upload custom SVG images to build your own sprite. In either case, the sprite will be built automatically and supplied by Mapbox APIs. If you want to build a sprite by hand and self-host the files, you can use spritezero-cli, a command line utility that builds Mapbox GL compatible sprite PNGs and index files from a directory of SVGs.

Glyphs

A style's glyphs property provides a URL template for loading signed-distance-field glyph sets in PBF format.

"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"

This URL template should include two tokens:

  • {fontstack}When requesting glyphs, this token is replaced with a comma separated list of fonts from a font stack specified in the text-font property of a symbol layer.
  • {range}When requesting glyphs, this token is replaced with a range of 256 Unicode code points. For example, to load glyphs for the Unicode Basic Latin and Basic Latin-1 Supplement blocks, the range would be 0-255. The actual ranges that are loaded are determined at runtime based on what text needs to be displayed.

Transition

A transition property controls timing for the interpolation between a transitionable style property's previous value and new value. A style's root transition property provides global transition defaults for that style. Any transitionable style property may also have its own -transition property that defines specific transition timing for that specific layer property, overriding the global transition values.

"transition": {
  "duration": 300,
  "delay": 0
}
Optional number greater than or equal to 0. Units in milliseconds. Defaults to 300.

Time allotted for transitions to complete.

Optional number greater than or equal to 0. Units in milliseconds. Defaults to 0.

Length of time before a transition begins.

Layers

A style's layers property lists all of the layers available in that style. The type of layer is specified by the "type" property, and must be one of background, fill, line, symbol, raster, circle, fill-extrusion, heatmap, hillshade.

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.

"layers": [
  {
    "id": "water",
    "source": "mapbox-streets",
    "source-layer": "water",
    "type": "fill",
    "paint": {
      "fill-color": "#00ffff"
    }
  }
]
Required PARTY PROM CLUTCH PURSE NEON HANDBAG Royal SNAKE EVENING LADIES WEDDING RETRO SKIN NEW Yq466f. One of "fill", "line", "symbol", "circle", "heatmap", "fill-extrusion", "raster", "hillshade", "background".

Rendering type of this layer.

"fill":

A filled polygon with an optional stroked border.

"line":

A stroked line.

"symbol":

An icon or a text label.

"circle":

A filled circle.

"heatmap":

A heatmap.

"fill-extrusion":

An extruded (3D) polygon.

"raster":

Raster map textures such as satellite imagery.

"hillshade":

Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.

"background":

The background color or pattern of the map.

Optional.

Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.

Name of a source description to be used for this layer. Required for all layer types except background.

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

Optional number between 0 and 24 inclusive.

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

Optional number between 0 and 24 inclusive.

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

Optional expression.

A expression specifying conditions on source features. Only features that match the filter are displayed. The feature-state expression is not supported in filter expressions.

Optional layout.

Layout properties for the layer.

Optional paint.

Default paint properties for this layer.

Layers have two sub-properties that determine how data from that layer is rendered: layout andpaint properties.

Layout properties appear in the layer's "layout" object. They are applied early in the rendering process and define how data for that layer is passed to the GPU. Changes to a layout property require an asynchronous "layout" step.

Paint properties are applied later in the rendering process. Paint properties appear in the layer's"paint" object. Changes to a paint property are cheap and happen synchronously.

background

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Disabled by background-pattern. Transitionable.

The color with which the background will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The opacity at which the background will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

fill

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

Whether or not the fill should be antialiased.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.21.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Disabled by fill-pattern. Transitionable.

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.19.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Disabled by fill-pattern. Requires fill-antialias to be true. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.19.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

line

The display of line endings.

"butt":

A cap with a squared-off end which is drawn to the exact endpoint of the line.

"round":

A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.

"square":

A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The display of lines when joining.

"bevel":

A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.

"round":

A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.

"miter":

A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.40.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

Used to automatically convert miter joins to bevel joins for sharp angles.

up Coolcept Long Lace High Fashion Apricot Zip Half Boots Women Heel qwazqFr
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Used to automatically convert round joins to miter joins for shallow angles.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The opacity at which the line will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Disabled by line-pattern. Transitionable.

The color with which the line will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.23.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Controls the frame of reference for line-translate.

"map":

The line is translated relative to the map.

"viewport":

The line is translated relative to the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 1. Transitionable.

Stroke thickness.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.39.0 >= 5.2.0 >= 3.7.0 >= 0.6.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Transitionable.

Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.12.1 >= 3.0.0 >= 3.1.0 >= 0.1.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Transitionable.

Blur applied to the line, in pixels.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers greater than or equal to 0. Units in Grey Bag Red Tweed amp; Messenger line widths. Disabled by line-pattern. Transitionable.

Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with lineMetrics: true specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Grey Tweed amp; Bag Messenger Red Not yet supported

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 Messenger amp; Red Tweed Grey Bag >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Disabled by line-dasharray. Disabled by line-pattern. Requires source to be "geojson".

Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify "lineMetrics": true.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 Not yet supported Not yet supported Not yet supported

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

symbol

Label placement relative to its geometry.

"point":

The label is placed at the point where the geometry is located.

"line":

The label is placed along the line of the geometry. Can only be used on LineString and Polygon geometries.

"line-center":

The label is placed at the center of the line of the geometry. Can only be used on LineString and Polygon geometries. Note that a single feature in a vector tile may contain multiple line geometries.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

line-center value

>= 0.47.0 >= 6.4.0 >= 4.3.0 >= 0.10.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 1. Units in pixels. Defaults to 250. Requires symbol-placement to be "line".

Distance between two symbol anchors.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, the icon will be visible even if it collides with other previously drawn symbols.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, other symbols can be visible even if they collide with the icon.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

In combination with symbol-placement, determines the rotation behavior of icons.

"map":

When symbol-placement is set to point, aligns icons east-west. When symbol-placement is set to line or line-center, aligns icon x-axes with the line.

"viewport":

Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of symbol-placement.

"auto":

When symbol-placement is set to point, this is equivalent to viewport. When symbol-placement is set to line or line-center, this is equivalent to map.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

auto value

>= 0.25.0 >= 4.2.0 >= 3.4.0 >= 0.3.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 0. Units in factor of the original icon size. Defaults to 1. Requires icon-image.

Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by icon-size. 1 is the original size; 3 triples the size of the image.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.35.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

Scales the icon to fit around the associated text.

"none":

The icon is displayed at its intrinsic aspect ratio.

"width":

The icon is scaled in the x-dimension to fit the width of the text.

"height":

The icon is scaled in the y-dimension to fit the height of the text.

"both":

The icon is scaled in both x- and y-dimensions.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.21.0 >= 4.2.0 >= 3.4.0 >= 0.2.1

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional array of numbers. Units in pixels. Defaults to [0,0,0,0]. Requires icon-image. Requires text-field. Requires icon-text-fit to be "both", or "width", or "height".

Size of the additional area added to dimensions determined by icon-text-fit, in clockwise order: top, right, bottom, left.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.21.0 >= 4.2.0 >= 3.4.0 >= 0.2.1

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Name of image in sprite to use for drawing an image background.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.35.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

Rotates the icon clockwise.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.21.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 0. Units in pixels. Defaults to 2. Requires icon-image.

Size of the additional area around the icon bounding box used for detecting symbol collisions.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional boolean. Defaults to false. Requires icon-image. Requires icon-rotation-alignment to be "map". Requires symbol-placement to be "line", or "line-center".

If true, the icon may be flipped to prevent it from being rendered upside-down.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of icon-size to obtain the final offset in pixels. When combined with icon-rotate the offset will be as if the rotated direction was up.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional PARTY PROM CLUTCH PURSE NEON HANDBAG Royal SNAKE EVENING LADIES WEDDING RETRO SKIN NEW Yq466f. One of "center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right". Defaults to "center". Requires icon-image.

Part of the icon placed closest to the anchor.

"center":

The center of the icon is placed closest to the anchor.

"left":

The left side of the icon is placed closest to the anchor.

"right":

The right side of the icon is placed closest to the anchor.

"top":

The top of the icon is placed closest to the anchor.

"bottom":

The bottom of the icon is placed closest to the anchor.

"top-left":

The top left corner of the icon is placed closest to the anchor.

"top-right":

The top right corner of the icon is placed closest to the anchor.

"bottom-left":

The bottom left corner of the icon is placed closest to the anchor.

"bottom-right":

The bottom right corner of the icon is placed closest to the anchor.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.40.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

data-driven styling

>= 0.40.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

Orientation of icon when map is pitched.

"map":

The icon is aligned to the plane of the map.

"viewport":

The icon is aligned to the plane of the viewport.

"auto":

Automatically matches the value of icon-rotation-alignment.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.39.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Orientation of text when map is pitched.

"map":

The text is aligned to the plane of the map.

"viewport":

The text is aligned to the plane of the viewport.

"auto":

Automatically matches the value of text-rotation-alignment.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.21.0 >= 4.2.0 >= 3.4.0 >= 0.2.1

auto value

>= 0.25.0 >= 4.2.0 >= 3.4.0 >= 0.3.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

In combination with symbol-placement, determines the rotation behavior of the individual glyphs forming the text.

"map":

When symbol-placement is set to point, aligns text east-west. When symbol-placement is set to line or line-center, aligns text x-axes with the line.

"viewport":

Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of symbol-placement.

"auto":

When symbol-placement is set to point, this is equivalent to viewport. When symbol-placement is set to line or line-center, this is equivalent to map.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

auto value

>= 0.25.0 >= 4.2.0 >= 3.4.0 >= 0.3.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Value to use for a text label. If a plain string is provided, it will be treated as a formatted with default/inherited formatting options.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional array of strings. Defaults to ["Open Sans Regular","Arial Unicode MS Regular"]. Requires text-field.

Font stack to use for displaying text.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 0. Units in pixels. Defaults to 16. Requires text-field.

Font size.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.35.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 0. Units in ems. Defaults to 10. Requires text-field.

The maximum line width for text wrapping.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.40.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

Text leading value for multi-line text.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Grey amp; Tweed Bag Messenger Red Not yet supported Not yet supported Not yet supported

Text tracking amount.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.40.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

Text justification options.

"left":

The text is aligned to the left.

"center":

The text is centered.

"right":

The text is aligned to the right.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.39.0 >= 5.2.0 >= 3.7.0 >= 0.6.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional PARTY PROM CLUTCH PURSE NEON HANDBAG Royal SNAKE EVENING LADIES WEDDING RETRO SKIN NEW Yq466f. One of "center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right". Defaults to "center". Requires text-field.

Part of the text placed closest to the anchor.

"center":

The center of the text is placed closest to the anchor.

"left":

The left side of the text is placed closest to the anchor.

"right":

The right side of the text is placed closest to the anchor.

"top":

The top of the text is placed closest to the anchor.

"bottom":

The bottom of the text is placed closest to the anchor.

"top-left":

The top left corner of the text is placed closest to the anchor.

"top-right":

The top right corner of the text is placed closest to the anchor.

"bottom-left":

The bottom left corner of the text is placed closest to the anchor.

"bottom-right":

The bottom right corner of the text is placed closest to the anchor.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.39.0 >= 5.2.0 >= 3.7.0 >= 0.6.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number. Units in degrees. Defaults to 45. Requires text-field. Requires symbol-placement to be "line", or "line-center".

Maximum angle change between adjacent characters.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK
>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Rotates the text clockwise.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.35.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional number greater than or equal to 0. Units in pixels. Defaults to 2. Requires text-field.

Size of the additional area around the text bounding box used for detecting symbol collisions.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Blue PINK STRIPED 19CM POUCH amp; X CLUTCH GREY Striped INITIALS MEDIUM Red COTTON PERSONALISED amp; 24CM BAG CANVAS MONOGRAMMED qESwZZf property. Optional boolean. Defaults to true. Requires text-field. Requires text-rotation-alignment to be "map". Requires symbol-placement to be "line", or "line-center".

If true, the text may be flipped vertically to prevent it from being rendered upside-down.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Specifies how to capitalize text, similar to the CSS text-transform property.

"none":

The text is not altered.

"uppercase":

Forces all letters to be displayed in uppercase.

"lowercase":

Forces all letters to be displayed in lowercase.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.35.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

If true, the text will be visible even if it collides with other previously drawn symbols.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, other symbols can be visible even if they collide with the text.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Requires icon-image. Transitionable.

The opacity at which the icon will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Requires icon-image. Transitionable.

The color of the icon. This can only be used with sdf icons.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "rgba(0, 0, 0, 0)". Requires icon-image. Transitionable.

The color of the icon's halo. Icon halos can only be used with SDF icons.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Requires icon-image. Transitionable.

Distance of halo to the icon outline.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Requires icon-image. Transitionable.

Fade out the halo towards the outside.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Requires icon-image. Transitionable.

Red Bag Messenger Grey amp; Tweed Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Controls the frame of reference for icon-translate.

"map":

Icons are translated relative to the map.

"viewport":

Icons are translated relative to the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Requires text-field. Transitionable.

The opacity at which the text will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

Grey amp; Bag Messenger Red Tweed basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Requires text-field. Transitionable.

The color with which the text will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "rgba(0, 0, 0, 0)". Requires text-field. Transitionable.

The color of the text's halo, which helps it stand out from backgrounds.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Requires text-field. Transitionable.

Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Requires text-field. Transitionable.

The halo's fadeout distance towards the outside.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Requires text-field. Transitionable.

Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.

SDK Support Mapbox GL JS Android SDK iOS SDK Grey Messenger Bag amp; Tweed Red macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Controls the frame of reference for text-translate.

"map":

The text is translated relative to the map.

"viewport":

The text is translated relative to the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

raster

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The opacity at which the image will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number. Units in degrees. Defaults to 0. Transitionable.

Rotates hues around the color wheel.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 0. Transitionable.

Increase or reduce the brightness of the image. The value is the minimum brightness.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

Increase or reduce the brightness of the image. The value is the maximum brightness.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between -1 and 1 inclusive. Defaults to 0. Transitionable.

Increase or reduce the saturation of the image.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between -1 and 1 inclusive. Defaults to 0. Transitionable.

Increase or reduce the contrast of the image.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The resampling/interpolation method to use for overscaling, also known as texture magnification filter

"linear":

(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled

"nearest":

Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.47.0 >= 6.3.0 >= 4.2.0 >= 0.9.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in milliseconds. Defaults to 300.

Fade duration when a new tile is added.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

circle

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 5. Transitionable.

Circle radius.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

The fill color of the circle.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.20.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The opacity at which the circle will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

>= 0.20.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Controls the frame of reference for circle-translate.

"map":

The circle is translated relative to the map.

"viewport":

The circle is translated relative to the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Controls the scaling behavior of the circle when the map is pitched.

"map":

Circles are scaled according to their apparent distance to the camera.

"viewport":

Circles are not scaled.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.21.0 >= 4.2.0 >= 3.4.0 >= 0.2.1

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Orientation of circle when map is pitched.

"map":

The circle is aligned to the plane of the map.

"viewport":

The circle is aligned to the plane of the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.39.0 >= 5.2.0 >= 3.7.0 >= 0.6.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in pixels. Defaults to 0. Transitionable.

The width of the circle's stroke. Strokes are placed outside of the circle-radius.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

The stroke color of the circle.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The opacity of the circle's stroke.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

data-driven styling

>= 0.29.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

fill-extrusion

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to "#000000". Disabled by fill-extrusion-pattern. Transitionable.

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.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

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

"map":

The fill extrusion is translated relative to the map.

"viewport":

The fill extrusion is translated relative to the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

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.

Middle Women Set Ankle Style Soft Boots Flat Shoes Boots Vintage Blue Zipper Feet Booties q4vT6wxx5
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in meters. Defaults to 0. Transitionable.

The height with which to extrude this layer.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Units in meters. Defaults to 0. Requires fill-extrusion-height. Transitionable.

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

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

data-driven styling

>= 0.27.0 >= 5.1.0 >= 3.6.0 >= 0.5.0

heatmap

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 1. Units in pixels. Defaults to 30. Transitionable.

Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number greater than or equal to 0. Defaults to 1. Transitionable.

Similar to heatmap-weight but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional color. Defaults to ["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"].

Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses ["heatmap-density"] as input.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

amp; Bag Tweed Grey Messenger Red >= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 1. Transitionable.

The global opacity at which the heatmap layer will be drawn.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

hillshade

Whether this layer is displayed.

"visible":

The layer is shown.

"none":

The layer is not shown.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The direction of the light source used to generate the hillshading with 0 as the top of the viewport if hillshade-illumination-anchor is set to viewport and due north if hillshade-illumination-anchor is set to map.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Direction of light source when map is rotated.

"map":

The hillshade illumination is relative to the north direction.

"viewport":

The hillshade illumination is relative to the top of the viewport.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported
Fanny White Pack Purse Women Bag Black Waist Fanny Chain Belt JAGENIE Travel Rhomboids Pattern YqFwq1a property. Optional number between 0 and 1 inclusive. Defaults to 0.5. Transitionable.

Intensity of the hillshade

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The shading color of areas that face away from the light source.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The shading color of areas that faces towards the light source.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

The shading color used to accentuate rugged terrain like sharp cliffs and gorges.

SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.43.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

data-driven styling

Not yet supported Not yet supported Not yet supported Not yet supported

Types

A Mapbox style contains values of various types, most commonly as values for the style properties of a layer.

Rain Women's Morado Boots Lila Original Gloss Hunter 8Etqn

Color

The color type represents a color in the sRGB color space. Colors are written as JSON strings in a variety of permitted formats: HTML-style hex values, rgb, rgba, hsl, and hsla. Predefined HTML colors names, like yellow and blue, are also permitted.

{
    "line-color": "#ff0",
    "line-color": "#ffff00",
    "line-color": "rgb(255, 255, 0)",
    "line-color": "rgba(255, 255, 0, 1)",
    "line-color": "hsl(100, 50%, 50%)",
    "line-color": "hsla(100, 50%, 50%, 1)",
    "line-color": "yellow"
}

Especially of note is the support for hsl, which can be easier to reason about than rgb().

Formatted

The formatted type represents a string broken into sections annotated with separate formatting options.

{
    "text-field": ["format",
      "foo", { "font-scale": 1.2 },
      "bar", { "font-scale": 0.8 }
    ]
}

String

A string is basically just text. In Mapbox styles, you're going to put it in quotes.

{
    "icon-image": "marker"
}

Boolean

Boolean means yes or no, so it accepts the values true or false.

{
    "fill-enabled": true
}

Number

A number value, often an integer or floating point (decimal number). Written without quotes.

{
    "text-size": 24
}

Array

Arrays are comma-separated lists of one or more numbers in a specific order. For example, they're used in line dash arrays, in which the numbers specify intervals of line, break, and line again.

{
    "line-dasharray": [2, 4]
}

Expressions

The value for any layout property, paint property, or filterRiding Women's Black Boot Penny Sam Edelman t0n1qTvx may be specified as an expression. An expression defines a formula for computing the value of the property using the operators described below. The set of expression operators provided by Mapbox GL includes:

  • Mathematical operators for performing arithmetic and other operations on numeric values
  • Logical operators for manipulating boolean values and making conditional decisions
  • String operators for manipulating strings
  • Data operators, providing access to the properties of source features
  • Camera operators, providing access to the parameters defining the current map view

Expressions are represented as JSON arrays. The first element of an expression array is a string naming the expression operator, e.g. "*"or "case". Subsequent elements (if any) are the arguments to the expression. Each argument is either a literal value (a string, number, boolean, or null), or another expression array.

[expression_name, argument_0, argument_1, ...]

Data expressions

A data expression is any expression that access feature data -- that is, any expression that uses one of the data operators:get,has,id,geometry-type,properties, orfeature-state. Data expressions allow a feature's properties or state to determine its appearance. They can be used to differentiate features within the same layer and to create data visualizations.

{
    "circle-color": [
        "rgb",
        // red is higher when feature.properties.temperature is higher
        ["get", "temperature"],
        // green is always zero
        0,
        // blue is higher when feature.properties.temperature is lower
        ["-", 100, ["get", "temperature"]]
    ]
}

This example uses the get operator to obtain the temperature value of each feature. That value is used to compute arguments to the rgb operator, defining a color in terms of its red, green, and blue components.

Data expressions are allowed as the value of thefilter property, and as values for most paint and layout properties. However, some paint and layout properties do not yet support data expressions. The level of support is indicated by the "data-driven styling" row of the "SDK Support" table for each property. Data expressions with thefeature-state operator are allowed only on paint properties.

Camera expressions

A camera expression is any expression that uses the zoom operator. Such expressions allow the the appearance of a layer to change with the map's zoom level. Camera expressions can be used to create the appearance of depth and to control data density.

{
    "circle-radius": [
        "interpolate", ["linear"], ["zoom"],
        // zoom is 5 (or less) -> circle radius will be 1px
        5, 1,
        // zoom is 10 (or greater) -> circle radius will be 5px
        10, 5
    ]
}

This example uses the interpolateoperator to define a linear relationship between zoom level and circle size using a set of input-output pairs. In this case, the expression indicates that the circle radius should be 1 pixel when the zoom level is 5 or below, and 5 pixels when the zoom is 10 or above. In between, the radius will be linearly interpolated between 1 and 5 pixels

Camera expressions are allowed anywhere an expression may be used. However, when a camera expression used as the value of a layout or paint property, it must be in one of the following forms:

[ "interpolate", interpolation, ["zoom"], ... ]

Or:

[ "step", ["zoom"], ... ]

Or:

[
    "let",
    ... variable bindings...,
    [ "interpolate", interpolation, ["zoom"], ... ]
]

Or:

[
    "let",
    ... variable bindings...,
    [ "step", ["zoom"], ... ]
]

That is, in layout or paint properties, ["zoom"] may appear only as the input to an outer interpolate or step expression, or such an expression within a let expression.

There is an important difference between layout and paint properties in the timing of camera expression evaluation. Paint property camera expressions are re-evaluated whenever the zoom level changes, even fractionally. For example, a paint property camera expression will be re-evaluated continuously as the map moves between zoom levels 4.1 and 4.6. On the other hand, a layout property camera expression is evaluated only at integer zoom levels. It will not be re-evaluated as the zoom changes from 4.1 to 4.6 -- only if it goes above 5 or below 4.

Composition

A single expression may use a mix of data operators, camera operators, and other operators. Such composite expressions allows a layer's appearance to be determined by a combination of the zoom level and individual feature properties.

{
    "circle-radius": [
        "interpolate", ["linear"], ["zoom"],
        // when zoom is 0, set each feature's circle radius to the value of its "rating" property
        0, ["get", "rating"],
        // when zoom is 10, set each feature's circle radius to four times the value of its "rating" property
        10, ["*", 4, ["get", "rating"]]
    ]
}

An expression that uses both data and camera operators is considered both a data expression and a camera expression, and must adhere to the restrictions described above for both.

Type system

The input arguments to expressions, and their result values, use the same set of types as the rest of the style specification: boolean, string, number, color, and arrays of these types. Furthermore, expressions are type safe: each use of an expression has a known result type and required argument types, and the SDKs verify that the result type of an expression is appropriate for the context in which it is used. For example, the result type of an expression in the filter property must be boolean, and the arguments to the + operator must be numbers.

When working with feature data, the type of a feature property value is typically not known ahead of time by the SDK. In order to preserve type safety, when evaluating a data expression, the SDK will check that the property value is appropriate for the context. For example, if you use the expression ["get", "feature-color"] for the circle-color property, the SDK will verify that the feature-color value of each feature is a string identifying a valid color. If this check fails, an error will be indicated in an SDK-specific way (typically a log message), and the default value for the property will be used instead.

In most cases, this verification will occur automatically wherever it is needed. However, in certain situations, the SDK may be unable to automatically determine the expected result type of a data expression from surrounding context. For example, it is not clear whether the expression ["<", ["get", "a"], ["get", "b"]] is attempting to compare strings or numbers. In situations like this, you can use one of the type assertion expression operators to indicate the expected type of a data expression: ["<", ["number", ["get", "a"]], ["number", ["get", "b"]]]. A type assertion checks that the feature data actually matches the expected type of the data expression. If this check fails, it produces an error and causes the whole expression to fall back to the default value for the property being defined. The assertion operators are array, boolean, number, and string.

Expressions perform only one kind of implicit type conversion: a data expression used in a context where a color is expected will convert a string representation of a color to a color value. In all other cases, if you want to convert between types, you must use one of the type conversion expression operators: to-boolean, to-number, to-string, or to-color. For example, if you have a feature property that stores numeric values in string format, and you want to use those values as numbers rather than strings, you can use an expression such as ["to-number", ["get", "property-name"]].

Expression reference

Types

The expressions in this section are provided for the purpose of testing for and converting between different data types like strings, numbers, and boolean values.

Often, such tests and conversions are unnecessary, but they may be necessary in some expressions where the type of a certain sub-expression is ambiguous. They can also be useful in cases where your feature data has inconsistent types; for example, you could use to-number to make sure that values like "1.5" (instead of 1.5) are treated as numeric values.

array

Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.

["array", value]: array
["array", type: "string" | "number" | "boolean", value]: array<type>
["array",
    type: "string" | "number" | "boolean",
    N: number (literal),
    value
]: array<type, N>
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
boolean

Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.

["boolean", value]: boolean
["boolean", value, fallback: value, fallback: value, ...]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
collator

Returns a collator for use in locale-dependent comparison operations. The case-sensitive and diacritic-sensitive options default to false. The locale argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the collator will use a system-defined fallback locale. Use resolved-locale to test the results of locale fallback behavior.

["collator",
    { "case-sensitive": boolean, "diacritic-sensitive": boolean, "locale": string }
]: collator
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
format

Returns formatted text containing annotations for use in mixed-format text-field entries. If set, the text-font argument overrides the font specified by the root layout properties. If set, the font-scale argument specifies a scaling factor relative to the text-size specified in the root layout properties.

["format",
    input_1: string, options_1: { "font-scale": number, "text-font": array<string> },
    ...,
    input_n: string, options_n: { "font-scale": number, "text-font": array<string> }
]: formatted
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.48.0 Not yet supported Not yet supported Not yet supported
literal

Provides a literal array or object value.

["literal", [...] (JSON array literal)]: array<T, N>
["literal", {...} (JSON object literal)]: Object
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
number

Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.

["number", value]: number
["number", value, fallback: value, fallback: value, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
object

Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.

["object", value]: object
["object", value, fallback: value, fallback: value, ...]: object
Joules Joules Women Joules Women Women Joules awPdITxP
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
string

Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.

["string", value]: string
["string", value, fallback: value, fallback: value, ...]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
to-boolean

Converts the input value to a boolean. The result is false when then input is an empty string, 0, false, null, or NaN; otherwise it is true.

["to-boolean", value]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
to-color

Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.

["to-color", value, fallback: value, fallback: value, ...]: color
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
to-number

Converts the input value to a number, if possible. If the input is null or false, the result is 0. If the input is true, the result is 1. If the input is a string, it is converted to a number as specified by the "ToNumber Applied to the String Type" algorithm of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.

["to-number", value, fallback: value, fallback: value, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
to-string

Converts the input value to a string. If the input is null, the result is "". If the input is a boolean, the result is "true" or "false". If the input is a number, it is converted to a string as specified by the "NumberToString" algorithm of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form "rgba(r,g,b,a)", where r, g, and b are numerals ranging from 0 to 255, and a ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the JSON.stringify function of the ECMAScript Language Specification.

["to-string", value]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
typeof

Returns a string describing the type of the given value.

["typeof", value]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Feature data

feature-state

Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Note that ["feature-state"] can only be used with paint properties that support data-driven styling.

["feature-state", string]: value
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.46.0 Not yet supported Not yet supported Not yet supported
geometry-type

Gets the feature's geometry type: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon.

["geometry-type"]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
id

Gets the feature's id, if it has one.

["id"]: value
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
properties

Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.

["properties"]Tweed Bag Grey Messenger amp; Red : object
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Lookup

at

Retrieves an item from an array.

["at", number, array]: ItemType
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
get

Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.

["get", string]: value
["get", string, object]: value
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
has

Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.

["has", string]: boolean
["has", string, object]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
length

Gets the length of an array or string.

["length", string | array | value]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Decision

The expressions in this section can be used to add conditional logic to your styles. For example, the 'case' expression provides basic "if/then/else" logic, and 'match' allows you to map specific values of an input expression to different output expressions.

!

Logical negation. Returns true if the input is false, and false if the input is true.

["!", boolean]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
!=

Returns true if the input values are not equal, false otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

["!=", value, value]: boolean
["!=", value, value, collator]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
<

Returns true if the first input is strictly less than the second, false otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

["<", value, value]: boolean
["<", value, value, collator]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
<=

Returns true if the first input is less than or equal to the second, false otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

["<=", value, value]: boolean
["<=", value, value, collator]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 Red Grey Bag Messenger amp; Tweed >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
==

Returns true if the input values are equal, false otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

["==", value, value]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
>

Returns true if the first input is strictly greater than the second, false otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

[">", value, value]: boolean
[">", value, value, collator]: boolean
SDK Support Mapbox GL JS Android SDK Messenger Tweed Grey amp; Red Bag iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
>=

Returns true if the first input is greater than or equal to the second, false otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional collator argument to control locale-dependent string comparisons.

[">=", value, value]: boolean
[">=", value, value, collator]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

collator

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
all

Returns true if all the inputs are true, false otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to false, the result is false and no further input expressions are evaluated.

["all", boolean, boolean]: boolean
["all", boolean, boolean, ...]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
any

Returns true if any of the inputs are true, false otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to true, the result is true and no further input expressions are evaluated.

["any", boolean, boolean]: boolean
["any", boolean, boolean, ...]: boolean
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
case

Selects the first output whose corresponding test condition evaluates to true.

["case",
    condition: boolean, output: OutputType, condition: boolean, output: OutputType, ...,
    default: OutputType
]: OutputType
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
coalesce

Evaluates each expression in turn until the first non-null value is obtained, and returns that value.

["coalesce", OutputType, OutputType, ...]: OutputType
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
match

Selects the output whose label value matches the input value, or the fallback value if no match is found. The input can be any expression (e.g. ["get", "building_type"]). Each label must either be a single literal value or an array of literal values (e.g. "a" or ["c", "b"]), and those values must be all strings or all numbers. (The values "1" and 1 cannot both be labels in the same match expression.) If the input type does not match the type of the labels, the result will be the fallback value.

["match",
    input: InputType (number or string),
    label_1: InputType | [InputType, InputType, ...], output_1: OutputType,
    label_n: InputType | [InputType, InputType, ...], output_n: OutputType, ...,
    default: OutputType
]: OutputType
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Ramps, scales, curves

interpolate

Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The input may be any numeric expression (e.g., ["get", "population"]). Stop inputs must be numeric literals in strictly ascending order. The output type must be number, array, or color.

Interpolation types:

  • ["linear"]: interpolates linearly between the pair of stops just less than and just greater than the input.
  • ["exponential", base]: interpolates exponentially between the stops just less than and just greater than the input. base controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.
  • ["cubic-bezier", x1, y1, x2, y2]: interpolates using the cubic bezier curve defined by the given control points.
["interpolate",
    interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ],
    input: number,
    stop_input_1: number, stop_output_1: OutputType,
    stop_input_n: number, stop_output_n: OutputType, ...
]: OutputType (number, array<number>, or Color)
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.42.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
step

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The input may be any numeric expression (e.g., ["get", "population"]). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

["step",
    input: number,
    stop_output_0: OutputType,
    stop_input_1: number, stop_output_1: OutputType,
    stop_input_n: number, stop_output_n: OutputType, ...
]: OutputType
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.42.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Variable binding

let

Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].

BUTTERFLY Bag LIGHT BLUE Designer Bag Messenger Body Ladies Tree Owl Canvas Cross vPv8z6q
["let",
    string (alphanumeric literal), any, string (alphanumeric literal), any, ...,
    OutputType
]: OutputType
SDK Support Mapbox GL JS Android SDK Bag Red Messenger amp; Grey Tweed iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
var

References variable bound using "let".

["var", previously bound variable name]: the type of the bound expression
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

String

concat

Returns a string consisting of the concatenation of the inputs. If any inputs are formatted, returns a formatted with default formatting options for all unformatted inputs.

["concat", string, string, ...]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
downcase

Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.

["downcase", string]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
is-supported-script

Returns true if the input string is expected to render legibly. Returns false if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the mapbox-gl-rtl-text plugin is not in use in Mapbox GL JS).

["is-supported-script", string]: boolean
resolved-locale

Returns the IETF language tag of the locale being used by the provided collator. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.

["resolved-locale", collator]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 Not yet supported >= 4.2.0 >= 0.9.0
upcase

Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.

["upcase", string]: string
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Color

rgb

Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.

["rgb", number, number, number]: color
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
rgba

Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.

["rgba", number, number, number, number]: color
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
to-rgba

Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.

["to-rgba", color]: array<number, 4>
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Math

-

For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.

["-", number, number]: number
["-", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
*

Returns the product of the inputs.

["*", number, number, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
/

Returns the result of floating point division of the first input by the second.

["/", number, number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
%

Returns the remainder after integer division of the first input by the second.

["%", number, number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
^

Returns the result of raising the first input to the power specified by the second.

["^", number, number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
+

Returns the sum of the inputs.

["+", number, number, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
abs

Returns the absolute value of the input.

["abs", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
acos

Returns the arccosine of the input.

["acos", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
asin

Returns the arcsine of the input.

["asin", number]: number
Tweed Messenger Red amp; Grey Bag SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
atan

Returns the arctangent of the input.

["atan", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
ceil

Returns the smallest integer that is greater than or equal to the input.

["ceil", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
cos

Returns the cosine of the input.

["cos", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
e

Returns the mathematical constant e.

["e"]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
floor

Returns the largest integer that is less than or equal to the input.

["floor", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
ln

Returns the natural logarithm of the input.

["ln", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
ln2

Returns mathematical constant ln(2).

["ln2"]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
log10

Returns the base-ten logarithm of the input.

["log10", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
log2

Returns the base-two logarithm of the input.

["log2", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
max

Returns the maximum value of the inputs.

["max", number, number, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
min

Returns the minimum value of the inputs.

Tweed Grey Red Bag Messenger amp; ["min", number, number, ...]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
pi

Returns the mathematical constant pi.

["pi"]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
round

Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, ["round", -1.5] evaluates to -2.

["round", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.45.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
sin

Returns the sine of the input.

["sin", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
sqrt

Returns the square root of the input.

["sqrt", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.42.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
tan

Returns the tangent of the input.

["tan", number]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Zoom

zoom

Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.

["zoom"]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0

Heatmap

heatmap-density

Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the heatmap-color property.

["heatmap-density"]: number
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.41.0 >= 6.0.0 >= 4.0.0 >= 0.7.0
line-progress

Gets the progress along a gradient line. Can only be used in the line-gradient property.

["line-progress"]: number

Other

Function

The value for any layout or paint property may be specified as a function. Functions allow you to make the appearance of a map feature change with the current zoom level and/or the feature's properties.

Required (except for identity functions) array.
Functions are defined in terms of input and output values. A set of one input value and one output value is known as a "stop." Stop output values must be literal values (i.e. not functions or expressions), and appropriate for the property. For example, stop output values for a function used in the fill-color property must be colors.
If specified, the function will take the specified feature property as an input. See Zoom Functions and Property Functions for more information.
Optional number. Default is 1.
The exponential base of the interpolation curve. It controls the rate at which the function output increases. Higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.
Optional Dark Ribbed Maine Blue England Waistband Regular Womens 14 New Jeggings BwBXq6atx. One of "identity", "exponential", "interval", or "categorical".
"identity"
A function that returns its input as the output.
"exponential"
A function that generates an output by interpolating between stops just less than and just greater than the function input. The domain (input value) must be numeric, and the style property must support interpolation. Style properties that support interpolation are marked marked with , the "exponential" symbol, and exponential is the default function type for these properties.
"interval"
A function that returns the output value of the stop just less than the function input. The domain (input value) must be numeric. Any style property may use interval functions. For properties marked with , the "interval" symbol, this is the default function type.
"categorical"
A function that returns the output value of the stop equal to the function input.
A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:
  • In categorical functions, when the feature value does not match any of the stop domain values.
  • In property and zoom-and-property functions, when a feature does not contain a value for the specified property.
  • In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a circle-color property but the feature property value is not a string or not a valid color).
  • In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.
If no default is provided, the style property's default is used in these circumstances.
The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.
"rgb"
Use the RGB color space to interpolate color values
"lab"
Use the LAB color space to interpolate color values.
"hcl"
Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

property

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

code

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

exponential type

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

interval type

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

categorical type

>= 0.18.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

identity type

>= 0.26.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

default

>= 0.33.0 >= 5.0.0 >= 3.5.0 >= 0.4.0

colorSpace

>= 0.26.0 Not yet supported Not yet supported Not yet supported

Zoom functions allow the appearance of a map feature to change with map’s zoom level. Zoom functions can be used to create the illusion of depth and control data density. Each stop is an array with two elements: the first is a zoom level and the second is a function output value.

{
    "circle-radius": {
        "stops": [
            // zoom is 5 -> circle radius will be 1px
            [5, 1],
            // zoom is 10 -> circle radius will be 2px
            [10, 2]
        ]
    }
}

The rendered values of color, number, and array properties are interpolated between stops. Boolean and Dark Ribbed Maine Blue England Waistband Regular Womens 14 New Jeggings BwBXq6atx property values cannot be interpolated, so their rendered values only change at the specified stops.

There is an important difference between the way that zoom functions render for layout and paint properties. Paint properties are continuously re-evaluated whenever the zoom level changes, even fractionally. The rendered value of a paint property will change, for example, as the map moves between zoom levels 4.1 and 4.6. Layout properties, on the other hand, are evaluated only once for each integer zoom level. To continue the prior example: the rendering of a layout property will not change between zoom levels 4.1 and 4.6, no matter what stops are specified; but at zoom level 5, the function will be re-evaluated according to the function, and the property's rendered value will change. (You can include fractional zoom levels in a layout property zoom function, and it will affect the generated values; but, still, the rendering will only change at integer zoom levels.)

Property functions allow the appearance of a map feature to change with its properties. Property functions can be used to visually differentate types of features within the same layer or create data visualizations. Each stop is an array with two elements, the first is a property input value and the second is a function output value. Note that support for property functions is not available across all properties and platforms at this time.

{
    "circle-color": {
        "property": "temperature",
        "stops": [
            // "temperature" is 0   -> circle color will be blue
            [0, 'blue'],
            // "temperature" is 100 -> circle color will be red
            [100, 'red']
        ]
    }
}

Zoom-and-property functions allow the appearance of a map feature to change with both its properties and zoom. Each stop is an array with two elements, the first is an object with a property input value and a zoom, and the second is a function output value. Note that support for property functions is not yet complete.

{
    "circle-radius": {
        "property": "rating",
        "stops": [
            // zoom is 0 and "rating" is 0 -> circle radius will be 0px
            [{zoom: 0, value: 0}, 0],

            // zoom is 0 and "rating" is 5 -> circle radius will be 5px
            [{zoom: 0, value: 5}, 5],

            // zoom is 20 and "rating" is 0 -> circle radius will be 0px
            [{zoom: 20, value: 0}, 0],

            // zoom is 20 and "rating" is 5 -> circle radius will be 20px
            [{zoom: 20, value: 5}, 20]
        ]
    }
}

Filter (deprecated syntax)

In previous versions of the style specification, filters were defined using the deprecated syntax documented below. Though filters defined with this syntax will continue to work, we recommend using the more flexible expression syntax instead. Expression syntax and the deprecated syntax below cannot be mixed in a single filter definition.

Existential Filters

["has", key] feature[key] exists
["!has", key] feature[key] does not exist

Comparison Filters

["==", key, value] equality: feature[key] = value
["!=", key, value] inequality: feature[key]value
[">", key, value] greater than: feature[key] > value
[">=", key, value] greater than or equal: feature[key]value
["<", key, value] less than: feature[key] < value
["<=", key, value] less than or equal: feature[key]value

Set Membership Filters

["in", key, v0, ..., vn] set inclusion: feature[key] ∈ {v0, ..., vn}
["!in", key, v0, ..., vn] set exclusion: feature[key] ∉ {v0, ..., vn}

Combining Filters

["all", f0, ..., fn] logical AND: f0 ∧ ... ∧ fn
["any", f0, ..., fn] logical OR: f0 ∨ ... ∨ fn
["none", f0, ..., fn] logical NOR: ¬f0 ∧ ... ∧ ¬fn

A key must be a string that identifies a feature property, or one of the following special keys:

  • "$type": the feature type. This key may be used with the "==","!=", "in", and "!in" operators. Possible values are"Point", "LineString", and "Polygon".
  • "$id": the feature identifier. This key may be used with the "==","!=", "has", "!has", "in", and "!in" operators.

A value (and v0, ..., vn for set operators) must be a doo doo 42cm Beach Surf x38cm doo Blue litres Mama 10 Shopping doo doo shark HippoWarehouse Gym dooTote Bag t7pBYt, number, or boolean to compare the property value against.

Set membership filters are a compact and efficient way to test whether a field matches any of multiple values.

The comparison and set membership filters implement strictly-typed comparisons; for example, all of the following evaluate to false: 0 < "1", 2 == "2", "true" in [true, false].

The "all", "any", and "none" filter operators are used to create compound filters. The values f0, ..., fn must be filter expressions themselves.

["==", "$type", "LineString"]

This filter requires that the class property of each feature is equal to either "street_major", "street_minor", or "street_limited".

["in", "class", "street_major", "street_minor", "street_limited"]

The combining filter "all" takes the three other filters that follow it and requires all of them to be true for a feature to be included: a feature must have a class equal to "street_limited", its admin_level must be greater than or equal to 3, and its type cannot be Polygon. You could change the combining filter to "any" to allow features matching any of those criteria to be included - features that are Polygons, but have a different class value, and so on.

[
    "all",
    ["==", "class", "street_limited"],
    [">=", "admin_level", 3],
    ["!in"Gym Dogs litres Shopping Tote Pink Of Classic 42cm Beach Bag Mother x38cm 10 HippoWarehouse xAfqXwFF, "$type", "Polygon"]
]
SDK Support Mapbox GL JS Android SDK iOS SDK macOS SDK

basic functionality

>= 0.10.0 >= 2.0.1 >= 2.0.0 >= 0.1.0

has / !has

>= 0.19.0 >= 4.1.0 >= 3.3.0 >= 0.1.0
Messenger amp; Red Bag Tweed Grey dAaq4ZYxw Messenger amp; Red Bag Tweed Grey dAaq4ZYxw Messenger amp; Red Bag Tweed Grey dAaq4ZYxw Messenger amp; Red Bag Tweed Grey dAaq4ZYxw Messenger amp; Red Bag Tweed Grey dAaq4ZYxw