Package-level declarations
Types
The accuracy, in meters, of the position source used to retrieve the position of the location indicator.
The color for drawing the accuracy radius border. To adjust transparency, set the alpha component of the color accordingly.
The color for drawing the accuracy radius, as a circle. To adjust transparency, set the alpha component of the color accordingly.
The color with which the background will be drawn.
Controls the intensity of light emitted on the source features.
The opacity at which the background will be drawn.
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.
The bearing of the location indicator.
Name of image in sprite to use as the middle of the location indicator.
The size of the bearing image, as a scale factor applied to the size of the specified image.
Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
The fill color of the circle.
Controls the intensity of light emitted on the source features.
The opacity at which the circle will be drawn.
Orientation of circle when map is pitched.
Controls the scaling behavior of the circle when the map is pitched.
Circle radius.
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
The stroke color of the circle.
The opacity of the circle's stroke.
The width of the circle's stroke. Strokes are placed outside of the circle-radius
.
The geometry's offset. Values are x, y where negatives indicate left and up, respectively.
Controls the frame of reference for circle-translate
.
The color of the circle emphasizing the indicator. To adjust transparency, set the alpha component of the color accordingly.
The radius, in pixel, of the circle emphasizing the indicator, drawn between the accuracy radius and the indicator shadow.
Whether or not the fill should be antialiased.
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.
Controls the intensity of light emitted on the source features.
Provides a control to futher fine-tune the look of the ambient occlusion on the ground beneath the extruded buildings. Lower values give the effect a more solid look while higher values make it smoother.
The extent of the ambient occlusion effect on the ground beneath the extruded buildings in meters.
Controls the intensity of shading near ground and concave angles between walls. Default value 0.0 disables ambient occlusion and values around 0.3 provide the most plausible results for buildings.
Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings. This property works only with legacy light. When 3D lights are enabled fill-extrusion-ambient-occlusion-wall-radius
and fill-extrusion-ambient-occlusion-ground-radius
are used instead.
Shades area near ground and concave angles between walls where the radius defines only vertical impact. Default value 3.0 corresponds to height of one floor and brings the most plausible results for buildings.
The height with which to extrude the base of this layer. Must be less than or equal to fill-extrusion-height
.
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.
This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.
Radius of a fill extrusion edge in meters. If not zero, rounds extrusion edges for a smoother appearance.
Controls the intensity of light emitted on the source features.
The color of the flood light effect on the walls of the extruded buildings.
Provides a control to futher fine-tune the look of the flood light on the ground beneath the extruded buildings. Lower values give the effect a more solid look while higher values make it smoother.
The extent of the flood light effect on the ground beneath the extruded buildings in meters.
The intensity of the flood light color.
The extent of the flood light effect on the walls of the extruded buildings in meters.
The height with which to extrude this layer.
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.
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.
Indicates whether top edges should be rounded when fill-extrusion-edge-radius has a value greater than 0. If false, rounded edges are only applied to the sides. Default is true.
The geometry's offset. Values are x, y where negatives indicate left and up (on the flat plane), respectively.
Controls the frame of reference for fill-extrusion-translate
.
Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.
A global multiplier that can be used to scale base, height, AO, and flood light of the fill extrusions.
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.
The outline color of the fill. Matches the value of fill-color
if unspecified.
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.
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
The geometry's offset. Values are x, y where negatives indicate left and up, respectively.
Controls the frame of reference for fill-translate
.
An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The ["feature-state", ...]
expression is not supported in filter expressions. The ["pitch"]
and ["distance-from-center"]
expressions are supported only for filter expressions on the symbol layer.
Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses ["heatmap-density"]
as input.
Similar to heatmap-weight
but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
The global opacity at which the heatmap layer will be drawn.
Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. queryRenderedFeatures
on heatmap layers will return points within this radius.
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.
The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
Controls the intensity of light emitted on the source features.
Intensity of the hillshade
The shading color of areas that faces towards the light source.
Direction of light source when map is rotated.
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
and no 3d lights enabled. If hillshade-illumination-anchor
is set to map
and 3d lights enabled, the direction from 3d lights is used instead.
The shading color of areas that face away from the light source.
If true, the icon will be visible even if it collides with other previously drawn symbols.
Part of the icon placed closest to the anchor.
The color of the icon. This can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.
Controls saturation level of the symbol icon. With the default value of 1 the icon color is preserved while with a value of 0 it is fully desaturated and looks black and white.
Controls the intensity of light emitted on the source features.
Fade out the halo towards the outside.
The color of the icon's halo. Icon halos can only be used with /help/troubleshooting/using-recolorable-images-in-mapbox-maps/.
Distance of halo to the icon outline.
If true, other symbols can be visible even if they collide with the icon.
Name of image in sprite to use for drawing an image background.
Controls the transition progress between the image variants of icon-image. Zero means the first variant is used, one is the second, and in between they are blended together.
If true, the icon may be flipped to prevent it from being rendered upside-down.
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.
The opacity at which the icon will be drawn.
If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
Size of the additional area around the icon bounding box used for detecting symbol collisions.
Orientation of icon when map is pitched.
Rotates the icon clockwise.
In combination with symbol-placement
, determines the rotation behavior of icons.
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.
Scales the icon to fit around the associated text.
Size of the additional area added to dimensions determined by icon-text-fit
, in clockwise order: top, right, bottom, left.
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.
Controls the frame of reference for icon-translate
.
The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence.
Blur applied to the line, in pixels.
The color of the line border. If line-border-width is greater than zero and the alpha value of this color is 0 (default), the color for the border will be selected automatically based on the line color.
The width of the line border. A value of zero means no border.
The display of line endings.
The color with which the line will be drawn.
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.
Decrease line layer opacity based on occlusion from 3D objects. Value 0 disables occlusion, value 1 means fully occluded.
Controls the intensity of light emitted on the source features.
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
A gradient used to color a line feature at various distances along its length. Defined using a step
or interpolate
expression which outputs a color for each corresponding line-progress
input value. line-progress
is a percentage of the line feature's total length as measured on the webmercator projected coordinate plane (a number
between 0
and 1
). Can only be used with GeoJSON sources that specify "lineMetrics": true
.
The display of lines when joining.
Used to automatically convert miter joins to bevel joins for sharp angles.
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.
The opacity at which the line will be drawn.
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.
Used to automatically convert round joins to miter joins for shallow angles.
Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
The geometry's offset. Values are x, y where negatives indicate left and up, respectively.
Controls the frame of reference for line-translate
.
The line part between trim-start, trim-end will be marked as transparent to make a route vanishing effect. The line trim-off offset is based on the whole line range 0.0, 1.0.
Stroke thickness.
An array of latitude, longitude, altitude position of the location indicator.
The opacity of the entire location indicator layer.
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
Intensity of the ambient occlusion if present in the 3D model.
Enable/Disable shadow casting for this layer
The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0.
Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix.
This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled.
Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source.
Emissive strength multiplier along model height (gradient begin, gradient end, value at begin, value at end, gradient curve power (logarithmic scale, curve power = pow(10, val)).
The opacity of the model layer.
Enable/Disable shadow receiving for this layer
The rotation of the model in euler angles lon, lat, z.
Material roughness. Material is fully smooth for value 0, and fully rough for value 1. Affects only layers using batched-model source.
The scale of the model.
Defines scaling mode. Only applies to location-indicator type layers.
The translation of the model in meters in form of longitudal, latitudal, altitude offsets.
Defines rendering behavior of model in respect to other 3D scene objects.
The amount of the perspective compensation, between 0 and 1. A value of 1 produces a location indicator of constant width across the screen. A value of 0 makes it scale naturally according to the viewing projection.
Displayed band of raster array source layer
Increase or reduce the brightness of the image. The value is the maximum brightness.
Increase or reduce the brightness of the image. The value is the minimum brightness.
Defines a color map by which to colorize a raster layer, parameterized by the ["raster-value"]
expression and evaluated at 256 uniformly spaced steps over the range specified by raster-color-range
.
When raster-color
is active, specifies the combination of source RGB channels used to compute the raster value. Computed using the equation mix.r * src.r + mix.g * src.g + mix.b * src.b + mix.a
. The first three components specify the mix of source red, green, and blue channels, respectively. The fourth component serves as a constant offset and is not multipled by source alpha. Source alpha is instead carried through and applied as opacity to the colorized result. Default value corresponds to RGB luminosity.
When raster-color
is active, specifies the range over which raster-color
is tabulated. Units correspond to the computed raster value via raster-color-mix
.
Increase or reduce the contrast of the image.
Specifies an uniform elevation from the ground, in meters. Only supported with image sources.
Controls the intensity of light emitted on the source features.
Fade duration when a new tile is added.
Rotates hues around the color wheel.
The opacity at which the image will be drawn.
Displayed band of raster array source layer
Defines a color map by which to colorize a raster particle layer, parameterized by the ["raster-particle-speed"]
expression and evaluated at 256 uniformly spaced steps over the range specified by raster-particle-max-speed
.
Defines the amount of particles per tile.
Defines defines the opacity coefficient applied to the faded particles in each frame. In practice, this property controls the length of the particle tail.
Defines the maximum speed for particles. Velocities with magnitudes equal to or exceeding this value are clamped to the max value.
Defines a coefficient for a time period at which particles will restart at a random position, to avoid degeneration (empty areas without particles).
Defines a coefficient for the speed of particles’ motion.
The resampling/interpolation method to use for overscaling, also known as texture magnification filter
Increase or reduce the saturation of the image.
Name of image in sprite to use as the background of the location indicator.
The size of the shadow image, as a scale factor applied to the size of the specified image.
A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.
A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.
Position of the sun center a azimuthal angle, p polar angle. The azimuthal angle indicates the position of the sun relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0 degree is directly above, at zenith, and 90 degree at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.
Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.
Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using sky-radial-progress
. The range 0, 1 for the interpolant covers a radial distance (in degrees) of 0, `sky-gradient-radius` centered at the position specified by sky-gradient-center
.
Position of the gradient center a azimuthal angle, p polar angle. The azimuthal angle indicates the position of the gradient center relative to 0 degree north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0 degree is directly above, at zenith, and 90 degree at the horizon.
The angular distance (measured in degrees) from sky-gradient-center
up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from sky-gradient-center
.
The opacity of the entire sky layer.
The type of the sky
Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.
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. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
Label placement relative to its geometry.
Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When icon-allow-overlap
or text-allow-overlap
is false
, features with a lower sort key will have priority during placement. When icon-allow-overlap
or text-allow-overlap
is set to true
, features with a higher sort key will overlap over features with a lower sort key.
Distance between two symbol anchors.
Position symbol on buildings (both fill extrusions and models) rooftops. In order to have minimal impact on performance, this is supported only when fill-extrusion-height
is not zoom-dependent and remains unchanged. For fading in buildings when zooming in, fill-extrusion-vertical-scale should be used and symbols would raise with building rooftops. Symbols are sorted by elevation, except in cases when viewport-y
sorting or symbol-sort-key
are applied.
Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use symbol-sort-key
.
If true, the text will be visible even if it collides with other previously drawn symbols.
Part of the text placed closest to the anchor.
The color with which the text will be drawn.
Controls the intensity of light emitted on the source features.
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. SDF images are not supported in formatted text and will be ignored.
Font stack to use for displaying text.
The halo's fadeout distance towards the outside.
The color of the text's halo, which helps it stand out from backgrounds.
Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
If true, other symbols can be visible even if they collide with the text.
Text justification options.
If true, the text may be flipped vertically to prevent it from being rendered upside-down.
Text tracking amount.
Text leading value for multi-line text.
Maximum angle change between adjacent characters.
The maximum line width for text wrapping.
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.
The opacity at which the text will be drawn.
If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
Size of the additional area around the text bounding box used for detecting symbol collisions.
Orientation of text when map is pitched.
Radial offset of text, in the direction of the symbol's anchor. Useful in combination with text-variable-anchor
, which defaults to using the two-dimensional text-offset
if present.
Rotates the text clockwise.
In combination with symbol-placement
, determines the rotation behavior of the individual glyphs forming the text.
Font size.
Specifies how to capitalize text, similar to the CSS text-transform
property.
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.
Controls the frame of reference for text-translate
.
To increase the chance of placing high-priority labels on the map, you can provide an array of text-anchor
locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use text-justify: auto
to choose justification based on anchor position. To apply an offset, use the text-radial-offset
or the two-dimensional text-offset
.
The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either 'horizontal', 'vertical' or 'vertical', 'horizontal', the order doesn't affect the placement.
Name of image in sprite to use as the top of the location indicator.
The size of the top image, as a scale factor applied to the size of the specified image.
Defines the timing for the interpolation between a transitionable style layer property's previous value and new value.
Whether this layer is displayed.
Functions
The background color or pattern of the map.
A filled circle.
An extruded (3D) polygon.
A filled polygon with an optional stroked border.
A heatmap.
Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
A stroked line.
Location Indicator layer.
A layer to render 3D Models.
Raster map textures such as satellite imagery.
Particle animation driven by textures such as wind maps.
A spherical dome around the map that is always rendered behind all other layers.
An icon or a text label.