@mapbox/mapbox-gl-style-spec
Version:
a specification for mapbox gl styles
1,447 lines • 326 kB
JSON
{
"$version": 8,
"$root": {
"version": {
"required": true,
"type": "enum",
"values": [
8
],
"doc": "Style specification version number. Must be 8.",
"example": 8
},
"fragment": {
"type": "boolean",
"doc": "Indicates that a style is a fragment style.",
"example": true
},
"name": {
"type": "string",
"doc": "A human-readable name for the style.",
"example": "Bright"
},
"metadata": {
"type": "*",
"doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."
},
"center": {
"type": "array",
"value": "number",
"doc": "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).",
"example": [
-73.9749,
40.7736
]
},
"zoom": {
"type": "number",
"doc": "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).",
"example": 12.5
},
"bearing": {
"type": "number",
"default": 0,
"period": 360,
"units": "degrees",
"doc": "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).",
"example": 29
},
"pitch": {
"type": "number",
"default": 0,
"units": "degrees",
"doc": "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).",
"example": 50
},
"light": {
"type": "light",
"doc": "The global light source. Note: This API is deprecated. Prefer using `flat` light type instead in the `lights` API.",
"example": {
"anchor": "viewport",
"color": "white",
"intensity": 0.4
}
},
"lights": {
"required": false,
"type": "array",
"value": "light-3d",
"doc": "Array of light sources affecting the whole map and the default for 3D style, mutually exclusive with the light property",
"example": [
{
"id": "environment",
"type": "ambient",
"properties": {
"color": "rgba(255.0, 0.0, 0.0, 1.0)",
"intensity": 0.4
}
},
{
"id": "sun_light",
"type": "directional",
"properties": {
"color": "rgba(255.0, 0.0, 0.0, 1.0)",
"intensity": 0.4,
"direction": [200.0, 40.0],
"cast-shadows": true,
"shadow-intensity": 0.2
}
}
],
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"terrain": {
"type": "terrain",
"optional": true,
"doc": "A global modifier that elevates layers and markers based on a DEM data source."
},
"fog": {
"type": "fog",
"doc": "A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0."
},
"snow": {
"type": "snow",
"doc": "Global precipitation particle-based snow. Having snow present in the style forces constant map repaint mode",
"experimental": true
},
"rain": {
"type": "rain",
"doc": "Global precipitation particle-based rain effect. Having rain present in the style forces constant map repaint mode.",
"experimental": true
},
"camera": {
"type": "camera",
"doc": "Global setting to control additional camera intrinsics parameters, e.g. projection type (perspective / orthographic)."
},
"color-theme": {
"type": "colorTheme",
"doc": "A global modifier for the colors of the style."
},
"indoor": {
"type": "indoor",
"experimental": true,
"doc": "Controls the behaviour of indoor features."
},
"imports": {
"type": "array",
"value": "import",
"doc": "Imports other styles into this style.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"iconsets": {
"experimental": true,
"type": "iconsets",
"doc": "A collection of icon sets",
"sdk-support": {
"basic functionality": {
"js": "3.11.0",
"android": "11.11.0",
"ios": "11.11.0"
}
}
},
"schema": {
"type": "schema",
"doc": "Definition of the schema for configuration options.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"sources": {
"required": true,
"type": "sources",
"doc": "Data source specifications.",
"example": {
"mapbox-streets": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-streets-v6"
}
}
},
"sprite": {
"type": "string",
"doc": "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](https://en.wikipedia.org/wiki/URL#Syntax).",
"example": "mapbox://sprites/mapbox/bright-v8"
},
"glyphs": {
"type": "string",
"doc": "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](https://en.wikipedia.org/wiki/URL#Syntax).",
"default": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
},
"transition": {
"type": "transition",
"doc": "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.",
"example": {
"duration": 300,
"delay": 0
}
},
"projection": {
"type": "projection",
"doc": "The projection the map should be rendered in. Supported projections are Mercator, Globe, Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Natural Earth, and Winkel Tripel. Terrain, sky and fog are supported by only Mercator and globe. CustomLayerInterface is not supported outside of Mercator.",
"example": {
"name": "albers",
"center": [-154, 50],
"parallels": [55, 65]
}
},
"layers": {
"required": true,
"type": "array",
"value": "layer",
"doc": "Layers will be drawn in the order of this array.",
"example": [
{
"id": "water",
"source": "mapbox-streets",
"source-layer": "water",
"type": "fill",
"paint": {
"fill-color": "#00ffff"
}
}
]
},
"models": {
"type": "models",
"doc": "Specification of models used in the style.",
"example": {
"spruce1-lod0": "asset://spruce1-lod0.glb",
"spruce1-lod1": "asset://spruce1-lod1.glb",
"spruce1-lod2": "asset://spruce1-lod2.glb"
}
},
"featuresets": {
"experimental": true,
"type": "featuresets",
"doc": "Defines sets of features for querying, interaction, and state management on the map, referencing individual layers or subsets of layers within the map's style.",
"sdk-support": {
"basic functionality": {
"js": "3.9.0",
"android": "11.9.0",
"ios": "11.9.0"
}
},
"example": {
"poi": {
"selectors": [
{
"layer": "poi",
"properties": {
"type": ["get", "type"],
"name": ["get", "name"],
"brand": "ABC"
}
}
]
}
}
}
},
"featuresets": {
"experimental": true,
"*": {
"type": "featureset",
"doc": "Defines a combined set of features from one or more underlying layers within the current style. Features in a style featureset can be queried, interacted with, and their states can be queried and updated."
}
},
"featureset": {
"experimental": true,
"metadata": {
"experimental": true,
"type": "*",
"doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."
},
"selectors": {
"experimental": true,
"type": "array",
"value": "selector",
"doc": "A collection of categorized selectors."
}
},
"selector": {
"experimental": true,
"layer": {
"experimental": true,
"type": "string",
"doc": "The ID of a layer that exists in the current style.",
"required": true
},
"properties": {
"experimental": true,
"type": "selectorProperty",
"required": false,
"doc": "Properties accessible to the end user through queried feautures. If properties are empty, no feature properties are exposed. If undefined, all original feature properties will be accessible."
},
"featureNamespace": {
"experimental": true,
"type": "string",
"required": false,
"doc": "An optional field that represents the feature namespace defined by the selector within a featureset to which this feature belongs. If the underlying source is the same for multiple selectors within a featureset, the same featureNamespace should be used across those selectors."
},
"_uniqueFeatureID": {
"experimental": true,
"type": "boolean",
"private": true,
"required": false,
"doc": "Internal flag used for standard style, in case multiple features sharing the same featureId, only one feature will be returned for feature query."
}
},
"selectorProperty": {
"experimental": true,
"*": {
"experimental": true,
"type": "*",
"doc": "The value of the property. It can be an expression that generates the returned value from the feature, or a constant value specifying the returned value."
}
},
"model": {
"type": "string",
"doc": "A URL to a model resource. Supported protocols are `http:`, `https:`, and `mapbox://<Model ID>`.",
"required": true
},
"import": {
"id": {
"type": "string",
"doc": "Unique import name.",
"required": true
},
"url": {
"type": "string",
"doc": "The URL of the style.",
"required": true
},
"config": {
"type": "config",
"doc": "Configuration values for the imported style's options."
},
"data": {
"type": "$root",
"doc": "The inlined style that must correspond to the contents of the specified URL."
},
"color-theme": {
"type": "colorTheme",
"optional": true,
"doc": "If specified, it overrides the color-theme of the imported style."
}
},
"config": {
"*": {
"type": "*",
"doc": "Value of the imported style's configuration option."
}
},
"schema": {
"*": {
"type": "option",
"doc": "Specification of a configuration option."
}
},
"option": {
"default": {
"type": "*",
"doc": "Default configuration value for this option.",
"property-type": "data-constant",
"expression": {
"interpolated": false
},
"required": true
},
"type": {
"type": "enum",
"doc": "The type this value is coerced to after evaluating the expression. If unspecified, the result is returned as is and is not validated.",
"values": {
"string": {
"doc": "The result will be coerced to a string."
},
"number": {
"doc": "The result will be coerced to a number."
},
"boolean": {
"doc": "The result will be coerced to a boolean."
},
"color": {
"doc": "The result will be coerced to a color."
}
}
},
"array": {
"type": "boolean",
"doc": "If true, this option is returned as an array"
},
"minValue": {
"type": "number",
"doc": "If this option is a number, this specifies the minimum allowed value. Values lower than this will be clamped to the minimum value."
},
"maxValue": {
"type": "number",
"doc": "If this option is a number, this specifies the maximum allowed value. Values higher than this will be clamped to the maximum value."
},
"stepValue": {
"type": "number",
"doc": "If this option is a number, this specifies the increment between allowed values. Values will be rounded towards the nearest allowed value."
},
"values": {
"type": "array",
"value": "*",
"doc": "If this option is specified, the result must be one of the given values. Otherwise, the default value is used instead."
},
"metadata": {
"type": "*",
"doc": "Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."
}
},
"models" : {
"*": {
"type": "model",
"doc": "A URL to a model resource. Supported protocols are `http:`, `https:`, and `mapbox://<Model ID>`."
}
},
"light-3d": {
"id": {
"type": "string",
"doc": "Unique light name.",
"required": true
},
"properties": {
"type": "properties",
"doc": "Properties of the light."
},
"type": {
"type": "enum",
"doc": "Type of the light to be added",
"values": {
"ambient": {
"doc": "An indirect light affecting all objects in the map adding a constant amount of light on them. It has no explicit direction and cannot cast shadows.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"directional": {
"doc": "A light that has a direction and is located at infinite distance, so its rays are parallel. It simulates the sun light and can cast shadows.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"flat": {
"doc": "A global directional light source which is only applied on 3D and hillshade layers. Using this type disables other light sources.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
}
}
}
},
"properties": [
"properties_light_directional",
"properties_light_ambient",
"properties_light_flat"
],
"properties_light_directional": {
"direction": {
"type": "array",
"default": [210, 30],
"minimum": [0, 0],
"maximum": [360, 90],
"length": 2,
"value": "number",
"property-type": "data-constant",
"transition": true,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"doc": "Direction of the light source specified as [a azimuthal angle, p polar angle] where a indicates the azimuthal angle of the light relative to north (in degrees and proceeding clockwise), and p indicates polar angle of the light (from 0°, directly above, to 180°, directly below).",
"example": [90, 40],
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"color": {
"type": "color",
"property-type": "data-constant",
"default": "#ffffff",
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"use-theme": true,
"transition": true,
"doc": "Color of the directional light.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"intensity": {
"type": "number",
"property-type": "data-constant",
"default": 0.5,
"minimum": 0,
"maximum": 1,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"transition": true,
"doc": "A multiplier for the color of the directional light.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"cast-shadows": {
"type": "boolean",
"default": false,
"doc": "Enable/Disable shadow casting for this light",
"transition": false,
"property-type": "data-constant",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"shadow-quality": {
"type": "number",
"property-type": "data-constant",
"default": 1,
"minimum": 0,
"maximum": 1,
"expression": {
"interpolated": false,
"parameters": [
"zoom"
]
},
"transition": false,
"doc": "Determines the quality of the shadows on the map. A value of 1 ensures the highest quality and is the default value.",
"sdk-support": {
"basic functionality": {
"android": "11.9.0",
"ios": "11.9.0"
}
},
"experimental": true
},
"shadow-intensity": {
"type": "number",
"property-type": "data-constant",
"default": 1.0,
"minimum": 0,
"maximum": 1,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"doc": "Determines the shadow strength, affecting the shadow receiver surfaces final color. Values near 0.0 reduce the shadow contribution to the final color. Values near to 1.0 make occluded surfaces receive almost no directional light. Designed to be used mostly for transitioning between values 0 and 1.",
"transition": true,
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
}
},
"properties_light_ambient": {
"color": {
"type": "color",
"property-type": "data-constant",
"default": "#ffffff",
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"use-theme": true,
"transition": true,
"doc": "Color of the ambient light.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"intensity": {
"type": "number",
"property-type": "data-constant",
"default": 0.5,
"minimum": 0,
"maximum": 1,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"transition": true,
"doc": "A multiplier for the color of the ambient light.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
}
},
"properties_light_flat": {
"anchor": {
"type": "enum",
"default": "viewport",
"values": {
"map": {
"doc": "The position of the light source is aligned to the rotation of the map."
},
"viewport": {
"doc": "The position of the light source is aligned to the rotation of the viewport. If terrain is enabled, performance regressions may occur in certain scenarios, particularly on lower-end hardware. Ensure that you test your target scenarios on the appropriate hardware to verify performance."
}
},
"property-type": "data-constant",
"transition": false,
"expression": {
"interpolated": false,
"parameters": [
"zoom"
]
},
"doc": "Whether extruded geometries are lit relative to the map or viewport.",
"example": "map",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"position": {
"type": "array",
"default": [
1.15,
210,
30
],
"length": 3,
"value": "number",
"property-type": "data-constant",
"transition": true,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"doc": "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).",
"example": [
1.5,
90,
80
],
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"color": {
"type": "color",
"property-type": "data-constant",
"default": "#ffffff",
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"use-theme": true,
"transition": true,
"doc": "Color tint for lighting extruded geometries.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
},
"intensity": {
"type": "number",
"property-type": "data-constant",
"default": 0.5,
"minimum": 0,
"maximum": 1,
"expression": {
"interpolated": true,
"parameters": [
"zoom"
]
},
"transition": true,
"doc": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.",
"sdk-support": {
"basic functionality": {
"js": "3.0.0",
"android": "11.0.0",
"ios": "11.0.0"
}
}
}
},
"iconsets": {
"*": {
"type": "iconset",
"doc": "Specification of an icon set. For sprite icon set, a URL must be provided. For `raster-array` source icon set, a source name must be provided."
}
},
"iconset": [
"iconset_sprite",
"iconset_source"
],
"iconset_sprite": {
"type": {
"required": true,
"type": "enum",
"values": {
"sprite": {
"doc": "A sprite icon set."
}
},
"doc": "The type of the icon set."
},
"url": {
"required": true,
"type": "string",
"doc": "A base URL for retrieving the icon set and metadata. The extension `.pbf` will be automatically appended. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",
"example": "mapbox://sprites/mapbox/bright"
}
},
"iconset_source": {
"type": {
"required": true,
"type": "enum",
"values": {
"source": {
"doc": "A source icon set."
}
},
"doc": "The type of the icon set."
},
"source": {
"required": true,
"type": "string",
"doc": "Name of a source of `raster-array` type to be used for the icon set."
}
},
"sources": {
"*": {
"type": "source",
"doc": "Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."
}
},
"source": [
"source_vector",
"source_raster",
"source_raster_dem",
"source_raster_array",
"source_geojson",
"source_video",
"source_image",
"source_model"
],
"source_vector": {
"type": {
"required": true,
"type": "enum",
"values": {
"vector": {
"doc": "A vector tile source."
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`. Required if `tiles` is not provided."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec. Required if `url` is not provided."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [
-180,
-85.051129,
180,
85.051129
],
"doc": "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."
},
"extra_bounds": {
"type": "array",
"value": {
"type": "array",
"value": "number",
"length": 4,
"doc": "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]`."
},
"experimental": true,
"doc": "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
},
"scheme": {
"type": "enum",
"values": {
"xyz": {
"doc": "Slippy map tilenames scheme."
},
"tms": {
"doc": "OSGeo spec scheme."
}
},
"default": "xyz",
"doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "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."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"promoteId": {
"type": "promoteId",
"doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers. If specified as an object only specified source layers will have id overriden, others will fallback to original feature id"
},
"volatile": {
"type": "boolean",
"default": false,
"doc": "A setting to determine whether a source's tiles are cached locally.",
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
"ios": "5.10.0"
}
}
},
"*": {
"type": "*",
"doc": "Other keys to configure the data source."
}
},
"source_raster": {
"type": {
"required": true,
"type": "enum",
"values": {
"raster": {
"doc": "A raster tile source."
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`. Required if `tiles` is not provided."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec. Required if `url` is not provided."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [
-180,
-85.051129,
180,
85.051129
],
"doc": "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."
},
"extra_bounds": {
"type": "array",
"value": {
"type": "array",
"value": "number",
"length": 4,
"doc": "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]`."
},
"experimental": true,
"doc": "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "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."
},
"tileSize": {
"type": "number",
"default": 512,
"units": "pixels",
"doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
},
"scheme": {
"type": "enum",
"values": {
"xyz": {
"doc": "Slippy map tilenames scheme."
},
"tms": {
"doc": "OSGeo spec scheme."
}
},
"default": "xyz",
"doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"volatile": {
"type": "boolean",
"default": false,
"doc": "A setting to determine whether a source's tiles are cached locally.",
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
"ios": "5.10.0"
}
}
},
"*": {
"type": "*",
"doc": "Other keys to configure the data source."
}
},
"source_raster_dem": {
"type": {
"required": true,
"type": "enum",
"values": {
"raster-dem": {
"doc": "A RGB-encoded raster DEM source"
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`. Required if `tiles` is not provided."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec. Required if `url` is not provided."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [
-180,
-85.051129,
180,
85.051129
],
"doc": "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."
},
"extra_bounds": {
"type": "array",
"value": {
"type": "array",
"value": "number",
"length": 4,
"doc": "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]`."
},
"experimental": true,
"doc": "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "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."
},
"tileSize": {
"type": "number",
"default": 512,
"units": "pixels",
"doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"encoding": {
"type": "enum",
"values": {
"terrarium": {
"doc": "Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."
},
"mapbox": {
"doc": "Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."
}
},
"default": "mapbox",
"doc": "The encoding used by this source. Mapbox Terrain RGB is used by default"
},
"volatile": {
"type": "boolean",
"default": false,
"doc": "A setting to determine whether a source's tiles are cached locally.",
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
"ios": "5.10.0"
}
}
},
"*": {
"type": "*",
"doc": "Other keys to configure the data source."
}
},
"source_raster_array": {
"experimental": true,
"type": {
"required": true,
"type": "enum",
"values": {
"raster-array": {
"doc": "A raster array source"
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`. Required if `tiles` is not provided."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec. Required if `url` is not provided."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [
-180,
-85.051129,
180,
85.051129
],
"doc": "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."
},
"extra_bounds": {
"type": "array",
"value": {
"type": "array",
"value": "number",
"length": 4,
"doc": "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]`."
},
"experimental": true,
"doc": "An array of additional discrete geographic regions where tiles are available. When used alongside the `bounds` property, these regions act as an additional filter - Mapbox GL will only request tiles that are both within the `bounds` and any of the regions defined in `extra_bounds`. When used independently (without `bounds`), Mapbox GL will request tiles that fall within any of the regions in `extra_bounds`. This allows for more fine-grained control over tile requests, particularly when dealing with sparse data coverage."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "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."
},
"tileSize": {
"type": "number",
"default": 512,
"units": "pixels",
"doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"rasterLayers": {
"type": "*",
"doc": "Contains the description of the raster data layers and the bands contained within the tiles."
},
"volatile": {
"type": "boolean",
"default": false,
"doc": "A setting to determine whether a source's tiles are cached locally.",
"sdk-support": {
"basic functionality": {
"android": "9.3.0",
"ios": "5.10.0"
}
}
},
"*": {
"type": "*",
"doc": "Other keys to configure the data source."
}
},
"source_geojson": {
"type": {
"required": true,
"type": "enum",
"values": {
"geojson": {
"doc": "A GeoJSON data source."
}
},
"doc": "The data type of the GeoJSON source."
},
"data": {
"type": "*",
"doc": "A URL to a GeoJSON file, or inline GeoJSON."
},
"maxzoom": {
"type": "number",
"default": 18,
"doc": "Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level at which to create vector tiles"
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"buffer": {
"type": "number",
"default": 128,
"maximum": 512,
"minimum": 0,
"doc": "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."
},
"filter": {
"type": "*",
"doc": "An expression for filtering features prior to processing them for rendering."
},
"tolerance": {
"type": "number",
"default": 0.375,
"doc": "Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."
},
"cluster": {
"type": "boolean",
"default": false,
"doc": "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:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"
},
"clusterRadius": {
"type": "number",
"default": 50,
"minimum": 0,
"doc": "Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."
},
"clusterMaxZoom": {
"type": "number",
"doc": "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). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."
},
"clusterMinPoints": {
"type": "number",
"doc": "Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."
},
"clusterProperties": {
"type": "*",
"doc": "An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\"property_name\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\"+\"` or `\"max\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{\"sum\": [\"+\", [\"get\", \"scalerank\"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\"accumulated\"]` value, e.g.:\n`{\"sum\": [[\"+\", [\"accumulated\"], [\"get\", \"sum\"]], [\"get\", \"scalerank\"]]}`"
},
"lineMetrics": {
"type": "boolean",
"default": false,
"doc": "Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."
},
"generateId": {
"type": "boolean",
"default": false,
"doc": "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."
},
"promoteId": {
"type": "promoteId",
"doc": "A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."
},
"dynamic": {
"type": "boolean",
"default": false,
"doc": "Whether to optimize this source for frequent data updates (e.g. animating features).",
"sdk-support": {
"basic functionality": {
"js": "3.4.0"
}
}
}
},
"source_video": {
"type": {
"required": true,
"type": "enum",
"values": {
"video": {
"doc": "A video data source."
}
},
"doc": "The data type of the video source."
},
"urls": {
"required": true,
"type": "array",
"value": "string",
"doc": "URLs to video content in order of preferred format."
},
"coordinates": {
"required": true,
"doc": "Corners of video specified in longitude, latitude pairs.",
"type": "array",
"length": 4,
"value": {
"type": "array",
"length": 2,
"value": "number",
"doc": "A single longitude, latitude pair."
}
}
},
"source_image": {
"type": {
"required": true,
"type": "enum",
"values": {
"image": {
"doc": "An image data source."
}
},
"doc": "The data type of the image source."
},
"url": {
"required": false,
"type": "string",
"doc": "URL that points to an image. If the URL is not specified, the image is expected to be loaded directly during runtime."
},
"coordinates": {
"required": true,
"doc": "Corners of image specified in longitude, latitude pairs. Note: When using globe projection, the image will be centered at the North or South Pole in the respective hemisphere if the average latitude value exceeds 85 degrees or falls below -85 degrees.",
"type": "array",
"length": 4,
"value": {
"type": "array",
"length": 2,
"value": "number",
"doc": "A single longitude, latitude pair."
}
}
},
"source_model" : {
"type": {
"required": true,
"type": "enum",
"values": {
"model": {
"doc": "A collection of 3D models"
},
"batched-model": {
"doc": "A collection of 3D models with anchor data"
}
},
"doc": "Type of model source to be added. From single models to represent 2D layers to 3D tiled models covering a wide area."
},
"maxzoom": {
"type": "number",
"default": 18,
"doc": "Maximum zoom level at which to create batched model tiles. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which batched-model tiles are available"
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec."
}
},
"layer": {
"id": {
"type": "string",
"doc": "Unique layer name.",
"required": true
},
"type": {
"type": "enum",
"values": {
"fill": {
"doc": "A filled polygon with an optional stroked border.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0"
}
}
},
"line": {
"doc": "A stroked line.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0"
}
}
},
"symbol": {
"doc": "An icon or a text label.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0"
}
}
},
"circle": {
"doc": "A filled circle.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0"
}
}
},
"heatmap": {
"doc": "A heatmap.",
"sdk-support": {
"basic functionality": {
"js": "0.41.0",
"android": "6.0.0",
"ios": "4.0.0"
}
}
},
"fill-extrusion": {
"doc": "An extruded (3D) polygon.",
"sdk-support": {
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
"ios": "3.6.0"
}
}
},
"building": {
"doc": "A procedural 3D building.",
"sdk-support": {
},
"experimental": true,
"private": true
},
"raster": {
"doc": "Raster map textures such as satellite imagery.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0"
}
}
},
"raster-particle": {
"experimental": true,
"doc": "Particle animation driven by textures such as wind maps.",
"sdk-support": {
"basic functionality": {
"js": "3.3.0",
"android": "11.4.0",
"ios": "11.4.0"
}
}
},
"hillshade": {
"doc": "Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.",
"