{ "$version": 8, "$root": { "version": { "required": true, "type": "enum", "values": [ 8 ], "doc": "Style specification version number. Must be 8.", "example": 8 }, "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 'maplibre:'.", "example": { "styleeditor:slimmode": true, "styleeditor:comment": "Style generated 1677776383", "styleeditor:version": "3.14.159265", "example:object": { "String": "one", "Number": 2, "Boolean": false } } }, "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 ] }, "centerAltitude": { "type": "number", "doc": "Default map center altitude in meters above sea level. The style center altitude defines the altitude where the camera is looking at and will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", "example": 123.4, "sdk-support": { "basic functionality": { "js": "5.0.0", "android": "https://github.com/maplibre/maplibre-native/issues/2980", "ios": "https://github.com/maplibre/maplibre-native/issues/2980" } } }, "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, "sdk-support": { "0-60 degrees": { "js": "0.8.0", "android": "1.0.0", "ios": "1.0.0" }, "0-85 degrees": { "js": "2.0.0", "android": "https://github.com/maplibre/maplibre-native/issues/1909", "ios": "https://github.com/maplibre/maplibre-native/issues/1909" }, "0-180 degrees": { "js": "5.0.0", "android": "https://github.com/maplibre/maplibre-native/issues/1909", "ios": "https://github.com/maplibre/maplibre-native/issues/1909" } } }, "roll": { "type": "number", "default": 0, "units": "degrees", "doc": "Default roll, in degrees. The roll angle is measured counterclockwise about the camera boresight. The style roll will be used only if the map has not been positioned by other means (e.g. map options or user interaction).", "example": 45, "sdk-support": { "basic functionality": { "js": "5.0.0", "android": "https://github.com/maplibre/maplibre-native/issues/2941", "ios": "https://github.com/maplibre/maplibre-native/issues/2941" } } }, "state": { "type": "state", "default": {}, "doc": "An object used to define default values when using the [`global-state`](https://maplibre.org/maplibre-style-spec/expressions/#global-state) expression.", "example": { "chargerType": { "default": ["CCS", "CHAdeMO", "Type2"] }, "minPreferredChargingSpeed": { "default": 50 } }, "sdk-support": { "basic functionality": { "js": "5.6.0", "android": "https://github.com/maplibre/maplibre-native/issues/3302", "ios": "https://github.com/maplibre/maplibre-native/issues/3302" } } }, "light": { "type": "light", "doc": "The global light source.", "example": { "anchor": "viewport", "color": "white", "intensity": 0.4 } }, "sky": { "type": "sky", "doc": "The map's sky configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.", "example": { "sky-color": "#199EF3", "sky-horizon-blend": 0.5, "horizon-color": "#ffffff", "horizon-fog-blend": 0.5, "fog-color": "#0000ff", "fog-ground-blend": 0.5, "atmosphere-blend": ["interpolate", ["linear"], ["zoom"], 0,1, 10,1, 12,0 ] } }, "projection": { "type": "projection", "doc": "The projection configuration", "example": { "type": [ "interpolate", ["linear"], ["zoom"], 10, "vertical-perspective", 12, "mercator" ] } }, "terrain": { "type": "terrain", "doc": "The terrain configuration.", "example": { "source": "raster-dem-source", "exaggeration": 0.5 } }, "sources": { "required": true, "type": "sources", "doc": "Sources state which data the map should display. Specify the type of source with the `type` property. Adding a source isn't enough to 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.\n\nTiled sources (vector and raster) must specify their details according to the [TileJSON specification](https://github.com/mapbox/tilejson-spec).", "example": { "maplibre-demotiles": { "type": "vector", "url": "https://demotiles.maplibre.org/tiles/tiles.json" }, "maplibre-tilejson": { "type": "vector", "url": "http://api.example.com/tilejson.json" }, "maplibre-streets": { "type": "vector", "tiles": [ "http://a.example.com/tiles/{z}/{x}/{y}.pbf", "http://b.example.com/tiles/{z}/{x}/{y}.pbf" ], "maxzoom": 14 }, "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 } } }, "sprite": { "type": "sprite", "doc": "An array of `{id: 'my-sprite', url: 'https://example.com/sprite'}` objects. Each object should represent a unique URL to load a sprite from and and a unique ID to use as a prefix when referencing images from that sprite (i.e. 'my-sprite:image'). All the URLs are internally extended to load both .json and .png files. If the `id` field is equal to 'default', the prefix is omitted (just 'image' instead of 'default:image'). All the IDs and URLs must be unique. For backwards compatibility, instead of an array, one can also provide a single string that represent a URL to load the sprite from. The images in this case won't be prefixed.", "example": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite" }, "glyphs": { "type": "string", "doc": "A URL template for loading signed-distance-field glyph sets in PBF format.\n\nIf this property is set, any text in the `text-field` layout property is displayed in the font stack named by the `text-font` layout property based on glyphs located at the URL specified by this property. Otherwise, font faces will be determined by the `text-font` property based on the local environment.\n\nThe URL must include:\n\n - `{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. \n\n - `{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.\n\nThe URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).", "example": "https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf", "sdk-support": { "basic functionality": { "js": "0.0.16", "android": "0.1.1", "ios": "0.1.0" }, "omit to use local fonts": { "js": "https://github.com/maplibre/maplibre-gl-js/issues/3302", "android": "https://github.com/maplibre/maplibre-native/issues/165", "ios": "https://github.com/maplibre/maplibre-native/issues/165" } } }, "font-faces": { "type": "array", "value": "fontFaces", "doc": "The `font-faces` property can be used to specify what font files to use for rendering text. Font faces contain information needed to render complex texts such as [Devanagari](https://en.wikipedia.org/wiki/Devanagari), [Khmer](https://en.wikipedia.org/wiki/Khmer_script) among many others.