From da1b453fbbc38adda064bb9b7db17867ee5cbfad Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 07:29:19 -0800 Subject: [PATCH 01/10] Deprecate 'paint.*' --- reference/v8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/v8.json b/reference/v8.json index c126c35..e195b09 100644 --- a/reference/v8.json +++ b/reference/v8.json @@ -337,7 +337,7 @@ }, "paint.*": { "type": "paint", - "doc": "Class-specific paint properties for this layer. The class name is the part after the first dot." + "doc": "[Deprecated] Class-specific paint properties for this layer. The class name is the part after the first dot. Deprecation notice: class-specific paint properties are deprecated and will be removed in the next version of this spec." } }, "layout": [ From 87193dc153caedb4f1969a193e0027c701220017 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 07:29:34 -0800 Subject: [PATCH 02/10] Copy v8.json => v9.json --- reference/v9.json | 2716 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2716 insertions(+) create mode 100644 reference/v9.json diff --git a/reference/v9.json b/reference/v9.json new file mode 100644 index 0000000..0cbfd9b --- /dev/null +++ b/reference/v9.json @@ -0,0 +1,2716 @@ +{ + "$version": 9, + "$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 '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 clockwise from true north. The style bearing 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.", + "example": { + "anchor": "viewport", + "color": "white", + "intensity": 0.4 + } + }, + "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.", + "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.", + "example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf" + }, + "transition": { + "type": "transition", + "doc": "A global transition definition to use as a default across properties.", + "example": { + "duration": 300, + "delay": 0 + } + }, + "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" + } + } + ] + } + }, + "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_tile", + "source_geojson", + "source_video", + "source_image" + ], + "source_tile": { + "type": { + "required": true, + "type": "enum", + "values": { + "vector": { + "doc": "A vector tile source." + }, + "raster": { + "doc": "A raster tile source." + } + }, + "doc": "The data type of the tile source." + }, + "url": { + "type": "string", + "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." + }, + "tiles": { + "type": "array", + "value": "string", + "doc": "An array of one or more tile source URLs, as in the TileJSON spec." + }, + "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." + }, + "*": { + "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)." + }, + "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." + }, + "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." + }, + "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)." + } + }, + "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": true, + "type": "string", + "doc": "URL that points to an image." + }, + "coordinates": { + "required": true, + "doc": "Corners of image specified in longitude, latitude pairs.", + "type": "array", + "length": 4, + "value": { + "type": "array", + "length": 2, + "value": "number", + "doc": "A single longitude, latitude pair." + } + } + }, + "layer": { + "id": { + "type": "string", + "doc": "Unique layer name.", + "required": true + }, + "type": { + "type": "enum", + "values": { + "fill": { + "doc": "A filled polygon with an optional stroked border." + }, + "line": { + "doc": "A stroked line." + }, + "symbol": { + "doc": "An icon or a text label." + }, + "circle": { + "doc": "A filled circle." + }, + "fill-extrusion": { + "doc": "An extruded (3D) polygon." + }, + "raster": { + "doc": "Raster map textures such as satellite imagery." + }, + "background": { + "doc": "The background color or pattern of the map." + } + }, + "doc": "Rendering type of this layer." + }, + "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:'." + }, + "ref": { + "type": "string", + "doc": "References another layer to copy `type`, `source`, `source-layer`, `minzoom`, `maxzoom`, `filter`, and `layout` properties from. This allows the layers to share processing and be more efficient." + }, + "source": { + "type": "string", + "doc": "Name of a source description to be used for this layer." + }, + "source-layer": { + "type": "string", + "doc": "Layer to use from a vector tile source. Required if the source supports multiple layers." + }, + "minzoom": { + "type": "number", + "minimum": 0, + "maximum": 24, + "doc": "The minimum zoom level on which the layer gets parsed and appears on." + }, + "maxzoom": { + "type": "number", + "minimum": 0, + "maximum": 24, + "doc": "The maximum zoom level on which the layer gets parsed and appears on." + }, + "filter": { + "type": "filter", + "doc": "A expression specifying conditions on source features. Only features that match the filter are displayed." + }, + "layout": { + "type": "layout", + "doc": "Layout properties for the layer." + }, + "paint": { + "type": "paint", + "doc": "Default paint properties for this layer." + }, + "paint.*": { + "type": "paint", + "doc": "[Deprecated] Class-specific paint properties for this layer. The class name is the part after the first dot. Deprecation notice: class-specific paint properties are deprecated and will be removed in the next version of this spec." + } + }, + "layout": [ + "layout_fill", + "layout_line", + "layout_circle", + "layout_fill-extrusion", + "layout_symbol", + "layout_raster", + "layout_background" + ], + "layout_background": { + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "layout_fill": { + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "layout_circle": { + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "layout_fill-extrusion": { + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + } + } + } + }, + "layout_line": { + "line-cap": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "butt": { + "doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line." + }, + "round": { + "doc": "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": { + "doc": "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." + } + }, + "default": "butt", + "doc": "The display of line endings.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-join": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "bevel": { + "doc": "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": { + "doc": "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": { + "doc": "A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet." + } + }, + "default": "miter", + "doc": "The display of lines when joining.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-miter-limit": { + "type": "number", + "default": 2, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Used to automatically convert miter joins to bevel joins for sharp angles.", + "requires": [ + { + "line-join": "miter" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-round-limit": { + "type": "number", + "default": 1.05, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Used to automatically convert round joins to miter joins for shallow angles.", + "requires": [ + { + "line-join": "round" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "layout_symbol": { + "symbol-placement": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "point": { + "doc": "The label is placed at the point where the geometry is located." + }, + "line": { + "doc": "The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries." + } + }, + "default": "point", + "doc": "Label placement relative to its geometry.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "symbol-spacing": { + "type": "number", + "default": 250, + "minimum": 1, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "units": "pixels", + "doc": "Distance between two symbol anchors.", + "requires": [ + { + "symbol-placement": "line" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "symbol-avoid-edges": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "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": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-allow-overlap": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, the icon will be visible even if it collides with other previously drawn symbols.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-ignore-placement": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, other symbols can be visible even if they collide with the icon.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-optional": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.", + "requires": [ + "icon-image", + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-rotation-alignment": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line." + }, + "viewport": { + "doc": "Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." + }, + "auto": { + "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`." + } + }, + "default": "auto", + "doc": "In combination with `symbol-placement`, determines the rotation behavior of icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "`auto` value": { + "js": "0.25.0" + } + } + }, + "icon-size": { + "type": "number", + "default": 1, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Scale factor for icon. 1 is original size, 3 triples the size.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-text-fit": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": false, + "values": { + "none": { + "doc": "The icon is displayed at its intrinsic aspect ratio." + }, + "width": { + "doc": "The icon is scaled in the x-dimension to fit the width of the text." + }, + "height": { + "doc": "The icon is scaled in the y-dimension to fit the height of the text." + }, + "both": { + "doc": "The icon is scaled in both x- and y-dimensions." + } + }, + "default": "none", + "doc": "Scales the icon to fit around the associated text.", + "requires": [ + "icon-image", + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0" + } + } + }, + "icon-text-fit-padding": { + "type": "array", + "value": "number", + "length": 4, + "default": [ + 0, + 0, + 0, + 0 + ], + "units": "pixels", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.", + "requires": [ + "icon-image", + "text-field", + { + "icon-text-fit": [ + "both", + "width", + "height" + ] + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0" + } + } + }, + "icon-image": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "doc": "A string with {tokens} replaced, referencing the data property to pull from.", + "tokens": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-rotate": { + "type": "number", + "default": 0, + "period": 360, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "units": "degrees", + "doc": "Rotates the icon clockwise.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.21.0" + } + } + }, + "icon-padding": { + "type": "number", + "default": 2, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "units": "pixels", + "doc": "Size of the additional area around the icon bounding box used for detecting symbol collisions.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-keep-upright": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, the icon may be flipped to prevent it from being rendered upside-down.", + "requires": [ + "icon-image", + { + "icon-rotation-alignment": "map" + }, + { + "symbol-placement": "line" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-offset": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-pitch-alignment": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "The text is aligned to the plane of the map." + }, + "viewport": { + "doc": "The text is aligned to the plane of the viewport." + }, + "auto": { + "doc": "Automatically matches the value of `text-rotation-alignment`." + } + }, + "default": "auto", + "doc": "Orientation of text when map is pitched.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.21.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "`auto` value": { + "js": "0.25.0" + } + } + }, + "text-rotation-alignment": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line." + }, + "viewport": { + "doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." + }, + "auto": { + "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`." + } + }, + "default": "auto", + "doc": "In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "`auto` value": { + "js": "0.25.0" + } + } + }, + "text-field": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": "", + "tokens": true, + "doc": "Value to use for a text label. Feature properties are specified using tokens like {field_name}.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-font": { + "type": "array", + "value": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": ["Open Sans Regular", "Arial Unicode MS Regular"], + "doc": "Font stack to use for displaying text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-size": { + "type": "number", + "default": 16, + "minimum": 0, + "units": "pixels", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Font size.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-max-width": { + "type": "number", + "default": 10, + "minimum": 0, + "units": "ems", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "The maximum line width for text wrapping.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-line-height": { + "type": "number", + "default": 1.2, + "units": "ems", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Text leading value for multi-line text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-letter-spacing": { + "type": "number", + "default": 0, + "units": "ems", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Text tracking amount.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-justify": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "left": { + "doc": "The text is aligned to the left." + }, + "center": { + "doc": "The text is centered." + }, + "right": { + "doc": "The text is aligned to the right." + } + }, + "default": "center", + "doc": "Text justification options.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "center": { + "doc": "The center of the text is placed closest to the anchor." + }, + "left": { + "doc": "The left side of the text is placed closest to the anchor." + }, + "right": { + "doc": "The right side of the text is placed closest to the anchor." + }, + "top": { + "doc": "The top of the text is placed closest to the anchor." + }, + "bottom": { + "doc": "The bottom of the text is placed closest to the anchor." + }, + "top-left": { + "doc": "The top left corner of the text is placed closest to the anchor." + }, + "top-right": { + "doc": "The top right corner of the text is placed closest to the anchor." + }, + "bottom-left": { + "doc": "The bottom left corner of the text is placed closest to the anchor." + }, + "bottom-right": { + "doc": "The bottom right corner of the text is placed closest to the anchor." + } + }, + "default": "center", + "doc": "Part of the text placed closest to the anchor.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-max-angle": { + "type": "number", + "default": 45, + "units": "degrees", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Maximum angle change between adjacent characters.", + "requires": [ + "text-field", + { + "symbol-placement": "line" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-rotate": { + "type": "number", + "default": 0, + "period": 360, + "units": "degrees", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Rotates the text clockwise.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-padding": { + "type": "number", + "default": 2, + "minimum": 0, + "units": "pixels", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "doc": "Size of the additional area around the text bounding box used for detecting symbol collisions.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-keep-upright": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": true, + "doc": "If true, the text may be flipped vertically to prevent it from being rendered upside-down.", + "requires": [ + "text-field", + { + "text-rotation-alignment": "map" + }, + { + "symbol-placement": "line" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-transform": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "none": { + "doc": "The text is not altered." + }, + "uppercase": { + "doc": "Forces all letters to be displayed in uppercase." + }, + "lowercase": { + "doc": "Forces all letters to be displayed in lowercase." + } + }, + "default": "none", + "doc": "Specifies how to capitalize text, similar to the CSS `text-transform` property.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-offset": { + "type": "array", + "doc": "Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.", + "value": "number", + "units": "ems", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "length": 2, + "default": [ + 0, + 0 + ], + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-allow-overlap": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, the text will be visible even if it collides with other previously drawn symbols.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-ignore-placement": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, other symbols can be visible even if they collide with the text.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-optional": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": false, + "doc": "If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.", + "requires": [ + "text-field", + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "layout_raster": { + "visibility": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "values": { + "visible": { + "doc": "The layer is shown." + }, + "none": { + "doc": "The layer is not shown." + } + }, + "default": "visible", + "doc": "Whether this layer is displayed.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "filter": { + "type": "array", + "value": "*", + "doc": "A filter selects specific features from a layer." + }, + "filter_operator": { + "type": "enum", + "values": { + "==": { + "doc": "`[\"==\", key, value]` equality: `feature[key] = value`" + }, + "!=": { + "doc": "`[\"!=\", key, value]` inequality: `feature[key] ≠ value`" + }, + ">": { + "doc": "`[\">\", key, value]` greater than: `feature[key] > value`" + }, + ">=": { + "doc": "`[\">=\", key, value]` greater than or equal: `feature[key] ≥ value`" + }, + "<": { + "doc": "`[\"<\", key, value]` less than: `feature[key] < value`" + }, + "<=": { + "doc": "`[\"<=\", key, value]` less than or equal: `feature[key] ≤ value`" + }, + "in": { + "doc": "`[\"in\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`" + }, + "!in": { + "doc": "`[\"!in\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`" + }, + "all": { + "doc": "`[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`" + }, + "any": { + "doc": "`[\"any\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`" + }, + "none": { + "doc": "`[\"none\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`" + }, + "has": { + "doc": "`[\"has\", key]` `feature[key]` exists" + }, + "!has": { + "doc": "`[\"!has\", key]` `feature[key]` does not exist" + } + }, + "doc": "The filter operator." + }, + "geometry_type": { + "type": "enum", + "values": { + "Point": { + "doc": "Filter to point geometries." + }, + "LineString": { + "doc": "Filter to line geometries." + }, + "Polygon": { + "doc": "Filter to polygon geometries." + } + }, + "doc": "The geometry type for the filter to select." + }, + "function": { + "stops": { + "type": "array", + "doc": "An array of stops.", + "value": "function_stop" + }, + "base": { + "type": "number", + "default": 1, + "minimum": 0, + "doc": "The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly." + }, + "property": { + "type": "string", + "doc": "The name of a global property or feature property to use as the function input.", + "default": "$zoom" + }, + "type": { + "type": "enum", + "values": { + "identity": { + "doc": "Return the input value as the output value." + }, + "exponential": { + "doc": "Generate an output by interpolating between stops just less than and just greater than the function input." + }, + "interval": { + "doc": "Return the output value of the stop just less than the function input." + }, + "categorical": { + "doc": "Return the output value of the stop equal to the function input." + } + }, + "doc": "The interpolation strategy to use in function evaluation.", + "default": "exponential" + }, + "colorSpace": { + "type": "enum", + "values": { + "rgb": { + "doc": "Use the RGB color space to interpolate color values" + }, + "lab": { + "doc": "Use the LAB color space to interpolate color values." + }, + "hcl": { + "doc": "Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually." + } + }, + "doc": "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.", + "default": "rgb" + } + }, + "function_stop": { + "type": "array", + "minimum": 0, + "maximum": 22, + "value": [ + "number", + "color" + ], + "length": 2, + "doc": "Zoom level and value pair." + }, + "light": { + "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." + } + }, + "transition": false, + "doc": "Whether extruded geometries are lit relative to the map or viewport.", + "example": "map" + }, + "position": { + "type": "array", + "default": [1.15, 210, 30], + "length": 3, + "value": "number", + "transition": true, + "function": "interpolated", + "zoom-function": true, + "property-function": false, + "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] + }, + "color": { + "type": "color", + "default": "#ffffff", + "function": "interpolated", + "zoom-function": true, + "property-function": false, + "transition": true, + "doc": "Color tint for lighting extruded geometries." + }, + "intensity": { + "type": "number", + "default": 0.5, + "minimum": 0, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "property-function": false, + "transition": true, + "doc": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast." + } + }, + "paint": [ + "paint_fill", + "paint_line", + "paint_circle", + "paint_fill-extrusion", + "paint_symbol", + "paint_raster", + "paint_background" + ], + "paint_fill": { + "fill-antialias": { + "type": "boolean", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "default": true, + "doc": "Whether or not the fill should be antialiased.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "fill-opacity": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "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.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.21.0" + } + } + }, + "fill-color": { + "type": "color", + "default": "#000000", + "doc": "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.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + { + "!": "fill-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.19.0" + } + } + }, + "fill-outline-color": { + "type": "color", + "doc": "The outline color of the fill. Matches the value of `fill-color` if unspecified.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + { + "!": "fill-pattern" + }, + { + "fill-antialias": true + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.19.0" + } + } + }, + "fill-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "fill-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "The fill is translated relative to the map." + }, + "viewport": { + "doc": "The fill is translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "fill-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "fill-pattern": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "transition": true, + "doc": "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).", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "paint_fill-extrusion": { + "fill-extrusion-opacity": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "property-function": false, + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-color": { + "type": "color", + "default": "#000000", + "doc": "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.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + { + "!": "fill-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + }, + "data-driven styling": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": false, + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": false, + "values": { + "map": { + "doc": "The fill extrusion is translated relative to the map." + }, + "viewport": { + "doc": "The fill extrusion is translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "fill-extrusion-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-pattern": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": false, + "transition": true, + "doc": "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).", + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-height": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "default": 0, + "minimum": 0, + "units": "meters", + "doc": "The height with which to extrude this layer.", + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + }, + "data-driven styling": { + "js": "0.27.0" + } + } + }, + "fill-extrusion-base": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "default": 0, + "minimum": 0, + "units": "meters", + "doc": "The height with which to extrude the base of this layer.", + "transition": true, + "requires": [ + { + "<=": "fill-extrusion-height" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.27.0" + }, + "data-driven styling": { + "js": "0.27.0" + } + } + } + }, + "paint_line": { + "line-opacity": { + "type": "number", + "doc": "The opacity at which the line will be drawn.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-color": { + "type": "color", + "doc": "The color with which the line will be drawn.", + "default": "#000000", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + { + "!": "line-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.23.0" + } + } + }, + "line-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "The line is translated relative to the map." + }, + "viewport": { + "doc": "The line is translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "line-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-width": { + "type": "number", + "default": 1, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Stroke thickness.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-gap-width": { + "type": "number", + "default": 0, + "minimum": 0, + "doc": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-offset": { + "type": "number", + "default": 0, + "doc": "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.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "sdk-support": { + "basic functionality": { + "js": "0.12.1", + "ios": "3.1.0", + "android": "3.0.0" + } + } + }, + "line-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Blur applied to the line, in pixels.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-dasharray": { + "type": "array", + "value": "number", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "doc": "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.", + "minimum": 0, + "transition": true, + "units": "line widths", + "requires": [ + { + "!": "line-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "line-pattern": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "transition": true, + "doc": "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).", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "paint_circle": { + "circle-radius": { + "type": "number", + "default": 5, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Circle radius.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.18.0" + } + } + }, + "circle-color": { + "type": "color", + "default": "#000000", + "doc": "The fill color of the circle.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.18.0" + } + } + }, + "circle-blur": { + "type": "number", + "default": 0, + "doc": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.20.0" + } + } + }, + "circle-opacity": { + "type": "number", + "doc": "The opacity at which the circle will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + }, + "data-driven styling": { + "js": "0.20.0" + } + } + }, + "circle-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [0, 0], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "circle-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "The circle is translated relative to the map." + }, + "viewport": { + "doc": "The circle is translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "circle-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "circle-pitch-scale": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "Circles are scaled according to their apparent distance to the camera." + }, + "viewport": { + "doc": "Circles are not scaled." + } + }, + "default": "map", + "doc": "Controls the scaling behavior of the circle when the map is pitched.", + "sdk-support": { + "basic functionality": { + "js": "0.21.0" + } + } + } + }, + "paint_symbol": { + "icon-opacity": { + "doc": "The opacity at which the icon will be drawn.", + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-color": { + "type": "color", + "default": "#000000", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "doc": "The color of the icon. This can only be used with sdf icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-halo-color": { + "type": "color", + "default": "rgba(0, 0, 0, 0)", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "doc": "The color of the icon's halo. Icon halos can only be used with SDF icons.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-halo-width": { + "type": "number", + "default": 0, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Distance of halo to the icon outline.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-halo-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Fade out the halo towards the outside.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "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.", + "requires": [ + "icon-image" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "icon-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "Icons are translated relative to the map." + }, + "viewport": { + "doc": "Icons are translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "icon-image", + "icon-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-opacity": { + "type": "number", + "doc": "The opacity at which the text will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-color": { + "type": "color", + "doc": "The color with which the text will be drawn.", + "default": "#000000", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-halo-color": { + "type": "color", + "default": "rgba(0, 0, 0, 0)", + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "doc": "The color of the text's halo, which helps it stand out from backgrounds.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-halo-width": { + "type": "number", + "default": 0, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-halo-blur": { + "type": "number", + "default": 0, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "The halo's fadeout distance towards the outside.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-translate": { + "type": "array", + "value": "number", + "length": 2, + "default": [ + 0, + 0 + ], + "function": "interpolated", + "zoom-function": true, + "property-function": true, + "transition": true, + "units": "pixels", + "doc": "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.", + "requires": [ + "text-field" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "text-translate-anchor": { + "type": "enum", + "function": "piecewise-constant", + "zoom-function": true, + "property-function": true, + "values": { + "map": { + "doc": "The text is translated relative to the map." + }, + "viewport": { + "doc": "The text is translated relative to the viewport." + } + }, + "doc": "Controls the translation reference point.", + "default": "map", + "requires": [ + "text-field", + "text-translate" + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "paint_raster": { + "raster-opacity": { + "type": "number", + "doc": "The opacity at which the image will be drawn.", + "default": 1, + "minimum": 0, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-hue-rotate": { + "type": "number", + "default": 0, + "period": 360, + "function": "interpolated", + "zoom-function": true, + "transition": true, + "units": "degrees", + "doc": "Rotates hues around the color wheel.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-brightness-min": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "doc": "Increase or reduce the brightness of the image. The value is the minimum brightness.", + "default": 0, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-brightness-max": { + "type": "number", + "function": "interpolated", + "zoom-function": true, + "doc": "Increase or reduce the brightness of the image. The value is the maximum brightness.", + "default": 1, + "minimum": 0, + "maximum": 1, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-saturation": { + "type": "number", + "doc": "Increase or reduce the saturation of the image.", + "default": 0, + "minimum": -1, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-contrast": { + "type": "number", + "doc": "Increase or reduce the contrast of the image.", + "default": 0, + "minimum": -1, + "maximum": 1, + "function": "interpolated", + "zoom-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "raster-fade-duration": { + "type": "number", + "default": 300, + "minimum": 0, + "function": "interpolated", + "zoom-function": true, + "transition": true, + "units": "milliseconds", + "doc": "Fade duration when a new tile is added.", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "paint_background": { + "background-color": { + "type": "color", + "default": "#000000", + "doc": "The color with which the background will be drawn.", + "function": "interpolated", + "zoom-function": true, + "transition": true, + "requires": [ + { + "!": "background-pattern" + } + ], + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "background-pattern": { + "type": "string", + "function": "piecewise-constant", + "zoom-function": true, + "transition": true, + "doc": "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).", + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + }, + "background-opacity": { + "type": "number", + "default": 1, + "minimum": 0, + "maximum": 1, + "doc": "The opacity at which the background will be drawn.", + "function": "interpolated", + "zoom-function": true, + "transition": true, + "sdk-support": { + "basic functionality": { + "js": "0.10.0", + "ios": "2.0.0", + "android": "2.0.1" + } + } + } + }, + "transition": { + "duration": { + "type": "number", + "default": 300, + "minimum": 0, + "units": "milliseconds", + "doc": "Time allotted for transitions to complete." + }, + "delay": { + "type": "number", + "default": 0, + "minimum": 0, + "units": "milliseconds", + "doc": "Length of time before a transition begins." + } + } +} From 64d7d6dea9c4232d08302df91a1a59baaf959459 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 07:45:31 -0800 Subject: [PATCH 03/10] Update API docs --- API.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/declass.js | 15 ++++++++--- lib/deref.js | 6 +++-- 3 files changed, 86 insertions(+), 5 deletions(-) diff --git a/API.md b/API.md index ff7baa3..12361e9 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,51 @@ +### `declassStyle(style, classes)` + +Returns a new style with the given 'paint classes' merged into each layer's +main `paint` definiton, and with all `paint.*` properties removed. + + +### Parameters + +| parameter | type | description | +| --------- | ----------------- | ---------------------------------------------- | +| `style` | Object | A style JSON object. | +| `classes` | Array\.\ | An array of paint classes to apply, in order. | + + +### Example + +```js +var declass = require('mapbox-gl-style-spec/lib/declass') +var baseStyle = { ... style with a 'paint.night' property in some layers ... } +var nightStyle = declass(baseStyle, ['night']) +// nightStyle now has each layer's `paint.night` properties merged in to the +// main `paint` property. +``` + + +### `deref(layers)` + +Given an array of layers, some of which may contain `ref` properties +whose value is the `id` of another property, return a new array where +such layers have been augmented with the 'type', 'source', etc. properties +from the parent layer, and the `ref` property has been removed. + +The input is not modified. The output may contain references to portions +of the input. + + +### Parameters + +| parameter | type | description | +| --------- | ---------------- | ----------- | +| `layers` | Array\.\ | | + + + +**Returns** `Array.`, + + ### `diffStyles([before], after)` Diff two stylesheet @@ -60,6 +107,29 @@ fs.writeFileSync('./dest.min.json', format(style, 0)); **Returns** `string`, stringified formatted JSON +### `exports(layers)` + +Given an array of layers, return an array of arrays of layers where all +layers in each group have identical layout-affecting properties. These +are the properties that were formerly used by explicit `ref` mechanism +for layers: 'type', 'source', 'source-layer', 'minzoom', 'maxzoom', +'filter', and 'layout'. + +The input is not modified. The output layers are references to the +input layers. + + +### Parameters + +| parameter | type | description | +| --------- | ---------------- | ----------- | +| `layers` | Array\.\ | | + + + +**Returns** `Array.>`, + + ### `migrate(style)` Migrate a Mapbox GL Style to the latest version. diff --git a/lib/declass.js b/lib/declass.js index 38220d3..ef34899 100644 --- a/lib/declass.js +++ b/lib/declass.js @@ -2,14 +2,23 @@ var extend = require('./util/extend'); +module.exports = declassStyle; + /** * Returns a new style with the given 'paint classes' merged into each layer's - * main `paint` definiton. + * main `paint` definiton, and with all `paint.*` properties removed. * * @param {Object} style A style JSON object. * @param {Array} classes An array of paint classes to apply, in order. + * + * @example + * var declass = require('mapbox-gl-style-spec/lib/declass') + * var baseStyle = { ... style with a 'paint.night' property in some layers ... } + * var nightStyle = declass(baseStyle, ['night']) + * // nightStyle now has each layer's `paint.night` properties merged in to the + * // main `paint` property. */ -module.exports = function declassStyle(style, classes) { +function declassStyle(style, classes) { return extend({}, style, { layers: style.layers.map(function (layer) { var result = classes.reduce(declassLayer, layer); @@ -24,7 +33,7 @@ module.exports = function declassStyle(style, classes) { return result; }) }); -}; +} function declassLayer(layer, klass) { return extend({}, layer, { diff --git a/lib/deref.js b/lib/deref.js index 34fdc17..141865c 100644 --- a/lib/deref.js +++ b/lib/deref.js @@ -20,6 +20,8 @@ function deref(layer, parent) { return result; } +module.exports = deref; + /** * Given an array of layers, some of which may contain `ref` properties * whose value is the `id` of another property, return a new array where @@ -32,7 +34,7 @@ function deref(layer, parent) { * @param {Array} layers * @returns {Array} */ -module.exports = function (layers) { +function deref(layers) { layers = layers.slice(); var map = Object.create(null), i; @@ -47,4 +49,4 @@ module.exports = function (layers) { } return layers; -}; +} From 89cc6aa7916726e514e24ffa6ee78b94b27cb1d7 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 07:48:35 -0800 Subject: [PATCH 04/10] Update narrative docs with deprecation of paint classes --- docs/_generate/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/_generate/index.html b/docs/_generate/index.html index 3e2cf05..2997e3b 100755 --- a/docs/_generate/index.html +++ b/docs/_generate/index.html @@ -628,9 +628,8 @@

Layers

Paint properties are applied later in the rendering process. A layer that shares layout properties with another layer can have independent paint properties. Paint properties appear in the layer's "paint" object. - Layers can also have class-specific paint properties, which are applied only when the map has a certain class - name set. For example, a layer with a "paint.night" property would have those properties applied - when the map has the "night" class set. + Layers can also have class-specific paint properties, defined with a property like "paint.night" and applied only when the map has a certain class + name set. However, note that this feature is deprecated, and will be removed from the next version of the specification. The declassStyle utility provides a way to apply class-specific properties by preprocessing a style in which they're defined.

Key: supports interpolated functions From 67fd31ca75cdd64f3da7186fab1c98659ad06f00 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 07:52:01 -0800 Subject: [PATCH 05/10] Remove paint.* from v9 --- reference/v9.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/reference/v9.json b/reference/v9.json index 0cbfd9b..0d7b529 100644 --- a/reference/v9.json +++ b/reference/v9.json @@ -334,10 +334,6 @@ "paint": { "type": "paint", "doc": "Default paint properties for this layer." - }, - "paint.*": { - "type": "paint", - "doc": "[Deprecated] Class-specific paint properties for this layer. The class name is the part after the first dot. Deprecation notice: class-specific paint properties are deprecated and will be removed in the next version of this spec." } }, "layout": [ From a78f483638e2ae83ef3c90196144b35c0ac14895 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 08:08:15 -0800 Subject: [PATCH 06/10] Fix duplicate name --- API.md | 2 +- lib/deref.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index 12361e9..0eda3a7 100644 --- a/API.md +++ b/API.md @@ -24,7 +24,7 @@ var nightStyle = declass(baseStyle, ['night']) ``` -### `deref(layers)` +### `derefLayers(layers)` Given an array of layers, some of which may contain `ref` properties whose value is the `id` of another property, return a new array where diff --git a/lib/deref.js b/lib/deref.js index 141865c..e061783 100644 --- a/lib/deref.js +++ b/lib/deref.js @@ -20,7 +20,7 @@ function deref(layer, parent) { return result; } -module.exports = deref; +module.exports = derefLayers; /** * Given an array of layers, some of which may contain `ref` properties @@ -34,7 +34,7 @@ module.exports = deref; * @param {Array} layers * @returns {Array} */ -function deref(layers) { +function derefLayers(layers) { layers = layers.slice(); var map = Object.create(null), i; From fb2ce54f40a2d50bc8361c59d353521280b3430d Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 08:11:52 -0800 Subject: [PATCH 07/10] Add migrations/v9 --- migrations/v9.js | 28 ++++++++++++++++ test/migrations/v9.js | 78 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 migrations/v9.js create mode 100644 test/migrations/v9.js diff --git a/migrations/v9.js b/migrations/v9.js new file mode 100644 index 0000000..e4e7d27 --- /dev/null +++ b/migrations/v9.js @@ -0,0 +1,28 @@ +'use strict'; + +var deref = require('../lib/deref'); + +function eachLayer(style, callback) { + for (var k in style.layers) { + callback(style.layers[k]); + eachLayer(style.layers[k], callback); + } +} + +module.exports = function(style) { + style.version = 9; + + // remove user-specified refs + style.layers = deref(style.layers); + + // remove class-specific paint properties + eachLayer(style, function (layer) { + for (var k in layer) { + if (/paint\..*/.test(k)) { + delete layer[k]; + } + } + }); + + return style; +}; diff --git a/test/migrations/v9.js b/test/migrations/v9.js new file mode 100644 index 0000000..025c147 --- /dev/null +++ b/test/migrations/v9.js @@ -0,0 +1,78 @@ +'use strict'; + +var t = require('tape'), + migrate = require('../../migrations/v9'); + +t('deref layers', function (t) { + var input = { + version: 8, + sources: { + a: { type: 'vector', tiles: [ 'http://dev/null' ] } + }, + layers: [{ + id: 'parent', + source: 'a', + 'source-layer': 'x', + type: 'fill' + }, { + id: 'child', + ref: 'parent' + }] + }; + + t.deepEqual(migrate(input), { + version: 9, + sources: { + a: { type: 'vector', tiles: [ 'http://dev/null' ] } + }, + layers: [{ + id: 'parent', + source: 'a', + 'source-layer': 'x', + type: 'fill' + }, { + id: 'child', + source: 'a', + 'source-layer': 'x', + type: 'fill' + }] + }); + + t.end(); +}); + +t('declass style', function (t) { + var input = { + version: 8, + sources: { + a: { type: 'vector', tiles: [ 'http://dev/null' ] } + }, + layers: [{ + id: 'a', + source: 'a', + type: 'fill', + paint: {}, + 'paint.right': { + 'fill-color': 'red' + }, + 'paint.left': { + 'fill-color': 'blue' + } + }] + }; + + t.deepEqual(migrate(input), { + version: 9, + sources: { + a: { type: 'vector', tiles: [ 'http://dev/null' ] } + }, + layers: [{ + id: 'a', + source: 'a', + type: 'fill', + paint: {} + }] + }); + + t.end(); +}); From 64af113d599674d3cec185b95edb5cf12f502d3a Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 08:17:36 -0800 Subject: [PATCH 08/10] Tweak wording in deprecation note --- reference/v8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/v8.json b/reference/v8.json index e195b09..654fccd 100644 --- a/reference/v8.json +++ b/reference/v8.json @@ -337,7 +337,7 @@ }, "paint.*": { "type": "paint", - "doc": "[Deprecated] Class-specific paint properties for this layer. The class name is the part after the first dot. Deprecation notice: class-specific paint properties are deprecated and will be removed in the next version of this spec." + "doc": "[Deprecated] Class-specific paint properties for this layer. The class name is the part after the first dot. Note: class-specific paint properties are deprecated and will be removed in the next version of this spec." } }, "layout": [ From ecfd272902cbc8f8de8b56cdd196e9b30c9ec382 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 10:11:57 -0800 Subject: [PATCH 09/10] Remove v9.json --- reference/v9.json | 2712 --------------------------------------------- 1 file changed, 2712 deletions(-) delete mode 100644 reference/v9.json diff --git a/reference/v9.json b/reference/v9.json deleted file mode 100644 index 0d7b529..0000000 --- a/reference/v9.json +++ /dev/null @@ -1,2712 +0,0 @@ -{ - "$version": 9, - "$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 '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 clockwise from true north. The style bearing 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.", - "example": { - "anchor": "viewport", - "color": "white", - "intensity": 0.4 - } - }, - "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.", - "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.", - "example": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf" - }, - "transition": { - "type": "transition", - "doc": "A global transition definition to use as a default across properties.", - "example": { - "duration": 300, - "delay": 0 - } - }, - "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" - } - } - ] - } - }, - "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_tile", - "source_geojson", - "source_video", - "source_image" - ], - "source_tile": { - "type": { - "required": true, - "type": "enum", - "values": { - "vector": { - "doc": "A vector tile source." - }, - "raster": { - "doc": "A raster tile source." - } - }, - "doc": "The data type of the tile source." - }, - "url": { - "type": "string", - "doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`." - }, - "tiles": { - "type": "array", - "value": "string", - "doc": "An array of one or more tile source URLs, as in the TileJSON spec." - }, - "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." - }, - "*": { - "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)." - }, - "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." - }, - "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." - }, - "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)." - } - }, - "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": true, - "type": "string", - "doc": "URL that points to an image." - }, - "coordinates": { - "required": true, - "doc": "Corners of image specified in longitude, latitude pairs.", - "type": "array", - "length": 4, - "value": { - "type": "array", - "length": 2, - "value": "number", - "doc": "A single longitude, latitude pair." - } - } - }, - "layer": { - "id": { - "type": "string", - "doc": "Unique layer name.", - "required": true - }, - "type": { - "type": "enum", - "values": { - "fill": { - "doc": "A filled polygon with an optional stroked border." - }, - "line": { - "doc": "A stroked line." - }, - "symbol": { - "doc": "An icon or a text label." - }, - "circle": { - "doc": "A filled circle." - }, - "fill-extrusion": { - "doc": "An extruded (3D) polygon." - }, - "raster": { - "doc": "Raster map textures such as satellite imagery." - }, - "background": { - "doc": "The background color or pattern of the map." - } - }, - "doc": "Rendering type of this layer." - }, - "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:'." - }, - "ref": { - "type": "string", - "doc": "References another layer to copy `type`, `source`, `source-layer`, `minzoom`, `maxzoom`, `filter`, and `layout` properties from. This allows the layers to share processing and be more efficient." - }, - "source": { - "type": "string", - "doc": "Name of a source description to be used for this layer." - }, - "source-layer": { - "type": "string", - "doc": "Layer to use from a vector tile source. Required if the source supports multiple layers." - }, - "minzoom": { - "type": "number", - "minimum": 0, - "maximum": 24, - "doc": "The minimum zoom level on which the layer gets parsed and appears on." - }, - "maxzoom": { - "type": "number", - "minimum": 0, - "maximum": 24, - "doc": "The maximum zoom level on which the layer gets parsed and appears on." - }, - "filter": { - "type": "filter", - "doc": "A expression specifying conditions on source features. Only features that match the filter are displayed." - }, - "layout": { - "type": "layout", - "doc": "Layout properties for the layer." - }, - "paint": { - "type": "paint", - "doc": "Default paint properties for this layer." - } - }, - "layout": [ - "layout_fill", - "layout_line", - "layout_circle", - "layout_fill-extrusion", - "layout_symbol", - "layout_raster", - "layout_background" - ], - "layout_background": { - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "layout_fill": { - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "layout_circle": { - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "layout_fill-extrusion": { - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - } - } - } - }, - "layout_line": { - "line-cap": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "butt": { - "doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line." - }, - "round": { - "doc": "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": { - "doc": "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." - } - }, - "default": "butt", - "doc": "The display of line endings.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-join": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "bevel": { - "doc": "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": { - "doc": "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": { - "doc": "A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet." - } - }, - "default": "miter", - "doc": "The display of lines when joining.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-miter-limit": { - "type": "number", - "default": 2, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Used to automatically convert miter joins to bevel joins for sharp angles.", - "requires": [ - { - "line-join": "miter" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-round-limit": { - "type": "number", - "default": 1.05, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Used to automatically convert round joins to miter joins for shallow angles.", - "requires": [ - { - "line-join": "round" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "layout_symbol": { - "symbol-placement": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "point": { - "doc": "The label is placed at the point where the geometry is located." - }, - "line": { - "doc": "The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries." - } - }, - "default": "point", - "doc": "Label placement relative to its geometry.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "symbol-spacing": { - "type": "number", - "default": 250, - "minimum": 1, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "units": "pixels", - "doc": "Distance between two symbol anchors.", - "requires": [ - { - "symbol-placement": "line" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "symbol-avoid-edges": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "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": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-allow-overlap": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, the icon will be visible even if it collides with other previously drawn symbols.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-ignore-placement": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, other symbols can be visible even if they collide with the icon.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-optional": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.", - "requires": [ - "icon-image", - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-rotation-alignment": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line`, aligns icon x-axes with the line." - }, - "viewport": { - "doc": "Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." - }, - "auto": { - "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`." - } - }, - "default": "auto", - "doc": "In combination with `symbol-placement`, determines the rotation behavior of icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "`auto` value": { - "js": "0.25.0" - } - } - }, - "icon-size": { - "type": "number", - "default": 1, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Scale factor for icon. 1 is original size, 3 triples the size.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-text-fit": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": false, - "values": { - "none": { - "doc": "The icon is displayed at its intrinsic aspect ratio." - }, - "width": { - "doc": "The icon is scaled in the x-dimension to fit the width of the text." - }, - "height": { - "doc": "The icon is scaled in the y-dimension to fit the height of the text." - }, - "both": { - "doc": "The icon is scaled in both x- and y-dimensions." - } - }, - "default": "none", - "doc": "Scales the icon to fit around the associated text.", - "requires": [ - "icon-image", - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0" - } - } - }, - "icon-text-fit-padding": { - "type": "array", - "value": "number", - "length": 4, - "default": [ - 0, - 0, - 0, - 0 - ], - "units": "pixels", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.", - "requires": [ - "icon-image", - "text-field", - { - "icon-text-fit": [ - "both", - "width", - "height" - ] - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0" - } - } - }, - "icon-image": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "doc": "A string with {tokens} replaced, referencing the data property to pull from.", - "tokens": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-rotate": { - "type": "number", - "default": 0, - "period": 360, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "units": "degrees", - "doc": "Rotates the icon clockwise.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.21.0" - } - } - }, - "icon-padding": { - "type": "number", - "default": 2, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "units": "pixels", - "doc": "Size of the additional area around the icon bounding box used for detecting symbol collisions.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-keep-upright": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, the icon may be flipped to prevent it from being rendered upside-down.", - "requires": [ - "icon-image", - { - "icon-rotation-alignment": "map" - }, - { - "symbol-placement": "line" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-offset": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-pitch-alignment": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "The text is aligned to the plane of the map." - }, - "viewport": { - "doc": "The text is aligned to the plane of the viewport." - }, - "auto": { - "doc": "Automatically matches the value of `text-rotation-alignment`." - } - }, - "default": "auto", - "doc": "Orientation of text when map is pitched.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.21.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "`auto` value": { - "js": "0.25.0" - } - } - }, - "text-rotation-alignment": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line`, aligns text x-axes with the line." - }, - "viewport": { - "doc": "Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`." - }, - "auto": { - "doc": "When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line`, this is equivalent to `map`." - } - }, - "default": "auto", - "doc": "In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "`auto` value": { - "js": "0.25.0" - } - } - }, - "text-field": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": "", - "tokens": true, - "doc": "Value to use for a text label. Feature properties are specified using tokens like {field_name}.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-font": { - "type": "array", - "value": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": ["Open Sans Regular", "Arial Unicode MS Regular"], - "doc": "Font stack to use for displaying text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-size": { - "type": "number", - "default": 16, - "minimum": 0, - "units": "pixels", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Font size.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-max-width": { - "type": "number", - "default": 10, - "minimum": 0, - "units": "ems", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "The maximum line width for text wrapping.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-line-height": { - "type": "number", - "default": 1.2, - "units": "ems", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Text leading value for multi-line text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-letter-spacing": { - "type": "number", - "default": 0, - "units": "ems", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Text tracking amount.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-justify": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "left": { - "doc": "The text is aligned to the left." - }, - "center": { - "doc": "The text is centered." - }, - "right": { - "doc": "The text is aligned to the right." - } - }, - "default": "center", - "doc": "Text justification options.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "center": { - "doc": "The center of the text is placed closest to the anchor." - }, - "left": { - "doc": "The left side of the text is placed closest to the anchor." - }, - "right": { - "doc": "The right side of the text is placed closest to the anchor." - }, - "top": { - "doc": "The top of the text is placed closest to the anchor." - }, - "bottom": { - "doc": "The bottom of the text is placed closest to the anchor." - }, - "top-left": { - "doc": "The top left corner of the text is placed closest to the anchor." - }, - "top-right": { - "doc": "The top right corner of the text is placed closest to the anchor." - }, - "bottom-left": { - "doc": "The bottom left corner of the text is placed closest to the anchor." - }, - "bottom-right": { - "doc": "The bottom right corner of the text is placed closest to the anchor." - } - }, - "default": "center", - "doc": "Part of the text placed closest to the anchor.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-max-angle": { - "type": "number", - "default": 45, - "units": "degrees", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Maximum angle change between adjacent characters.", - "requires": [ - "text-field", - { - "symbol-placement": "line" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-rotate": { - "type": "number", - "default": 0, - "period": 360, - "units": "degrees", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Rotates the text clockwise.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-padding": { - "type": "number", - "default": 2, - "minimum": 0, - "units": "pixels", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "doc": "Size of the additional area around the text bounding box used for detecting symbol collisions.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-keep-upright": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": true, - "doc": "If true, the text may be flipped vertically to prevent it from being rendered upside-down.", - "requires": [ - "text-field", - { - "text-rotation-alignment": "map" - }, - { - "symbol-placement": "line" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-transform": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "none": { - "doc": "The text is not altered." - }, - "uppercase": { - "doc": "Forces all letters to be displayed in uppercase." - }, - "lowercase": { - "doc": "Forces all letters to be displayed in lowercase." - } - }, - "default": "none", - "doc": "Specifies how to capitalize text, similar to the CSS `text-transform` property.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-offset": { - "type": "array", - "doc": "Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.", - "value": "number", - "units": "ems", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "length": 2, - "default": [ - 0, - 0 - ], - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-allow-overlap": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, the text will be visible even if it collides with other previously drawn symbols.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-ignore-placement": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, other symbols can be visible even if they collide with the text.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-optional": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": false, - "doc": "If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.", - "requires": [ - "text-field", - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "layout_raster": { - "visibility": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "values": { - "visible": { - "doc": "The layer is shown." - }, - "none": { - "doc": "The layer is not shown." - } - }, - "default": "visible", - "doc": "Whether this layer is displayed.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "filter": { - "type": "array", - "value": "*", - "doc": "A filter selects specific features from a layer." - }, - "filter_operator": { - "type": "enum", - "values": { - "==": { - "doc": "`[\"==\", key, value]` equality: `feature[key] = value`" - }, - "!=": { - "doc": "`[\"!=\", key, value]` inequality: `feature[key] ≠ value`" - }, - ">": { - "doc": "`[\">\", key, value]` greater than: `feature[key] > value`" - }, - ">=": { - "doc": "`[\">=\", key, value]` greater than or equal: `feature[key] ≥ value`" - }, - "<": { - "doc": "`[\"<\", key, value]` less than: `feature[key] < value`" - }, - "<=": { - "doc": "`[\"<=\", key, value]` less than or equal: `feature[key] ≤ value`" - }, - "in": { - "doc": "`[\"in\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`" - }, - "!in": { - "doc": "`[\"!in\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`" - }, - "all": { - "doc": "`[\"all\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`" - }, - "any": { - "doc": "`[\"any\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`" - }, - "none": { - "doc": "`[\"none\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`" - }, - "has": { - "doc": "`[\"has\", key]` `feature[key]` exists" - }, - "!has": { - "doc": "`[\"!has\", key]` `feature[key]` does not exist" - } - }, - "doc": "The filter operator." - }, - "geometry_type": { - "type": "enum", - "values": { - "Point": { - "doc": "Filter to point geometries." - }, - "LineString": { - "doc": "Filter to line geometries." - }, - "Polygon": { - "doc": "Filter to polygon geometries." - } - }, - "doc": "The geometry type for the filter to select." - }, - "function": { - "stops": { - "type": "array", - "doc": "An array of stops.", - "value": "function_stop" - }, - "base": { - "type": "number", - "default": 1, - "minimum": 0, - "doc": "The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly." - }, - "property": { - "type": "string", - "doc": "The name of a global property or feature property to use as the function input.", - "default": "$zoom" - }, - "type": { - "type": "enum", - "values": { - "identity": { - "doc": "Return the input value as the output value." - }, - "exponential": { - "doc": "Generate an output by interpolating between stops just less than and just greater than the function input." - }, - "interval": { - "doc": "Return the output value of the stop just less than the function input." - }, - "categorical": { - "doc": "Return the output value of the stop equal to the function input." - } - }, - "doc": "The interpolation strategy to use in function evaluation.", - "default": "exponential" - }, - "colorSpace": { - "type": "enum", - "values": { - "rgb": { - "doc": "Use the RGB color space to interpolate color values" - }, - "lab": { - "doc": "Use the LAB color space to interpolate color values." - }, - "hcl": { - "doc": "Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually." - } - }, - "doc": "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.", - "default": "rgb" - } - }, - "function_stop": { - "type": "array", - "minimum": 0, - "maximum": 22, - "value": [ - "number", - "color" - ], - "length": 2, - "doc": "Zoom level and value pair." - }, - "light": { - "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." - } - }, - "transition": false, - "doc": "Whether extruded geometries are lit relative to the map or viewport.", - "example": "map" - }, - "position": { - "type": "array", - "default": [1.15, 210, 30], - "length": 3, - "value": "number", - "transition": true, - "function": "interpolated", - "zoom-function": true, - "property-function": false, - "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] - }, - "color": { - "type": "color", - "default": "#ffffff", - "function": "interpolated", - "zoom-function": true, - "property-function": false, - "transition": true, - "doc": "Color tint for lighting extruded geometries." - }, - "intensity": { - "type": "number", - "default": 0.5, - "minimum": 0, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "property-function": false, - "transition": true, - "doc": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast." - } - }, - "paint": [ - "paint_fill", - "paint_line", - "paint_circle", - "paint_fill-extrusion", - "paint_symbol", - "paint_raster", - "paint_background" - ], - "paint_fill": { - "fill-antialias": { - "type": "boolean", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "default": true, - "doc": "Whether or not the fill should be antialiased.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "fill-opacity": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "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.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.21.0" - } - } - }, - "fill-color": { - "type": "color", - "default": "#000000", - "doc": "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.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - { - "!": "fill-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.19.0" - } - } - }, - "fill-outline-color": { - "type": "color", - "doc": "The outline color of the fill. Matches the value of `fill-color` if unspecified.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - { - "!": "fill-pattern" - }, - { - "fill-antialias": true - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.19.0" - } - } - }, - "fill-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "fill-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "The fill is translated relative to the map." - }, - "viewport": { - "doc": "The fill is translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "fill-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "fill-pattern": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "transition": true, - "doc": "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).", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "paint_fill-extrusion": { - "fill-extrusion-opacity": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "property-function": false, - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-color": { - "type": "color", - "default": "#000000", - "doc": "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.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - { - "!": "fill-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - }, - "data-driven styling": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": false, - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": false, - "values": { - "map": { - "doc": "The fill extrusion is translated relative to the map." - }, - "viewport": { - "doc": "The fill extrusion is translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "fill-extrusion-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-pattern": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": false, - "transition": true, - "doc": "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).", - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-height": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "default": 0, - "minimum": 0, - "units": "meters", - "doc": "The height with which to extrude this layer.", - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - }, - "data-driven styling": { - "js": "0.27.0" - } - } - }, - "fill-extrusion-base": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "default": 0, - "minimum": 0, - "units": "meters", - "doc": "The height with which to extrude the base of this layer.", - "transition": true, - "requires": [ - { - "<=": "fill-extrusion-height" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.27.0" - }, - "data-driven styling": { - "js": "0.27.0" - } - } - } - }, - "paint_line": { - "line-opacity": { - "type": "number", - "doc": "The opacity at which the line will be drawn.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-color": { - "type": "color", - "doc": "The color with which the line will be drawn.", - "default": "#000000", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - { - "!": "line-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.23.0" - } - } - }, - "line-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "The line is translated relative to the map." - }, - "viewport": { - "doc": "The line is translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "line-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-width": { - "type": "number", - "default": 1, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Stroke thickness.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-gap-width": { - "type": "number", - "default": 0, - "minimum": 0, - "doc": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-offset": { - "type": "number", - "default": 0, - "doc": "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.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "sdk-support": { - "basic functionality": { - "js": "0.12.1", - "ios": "3.1.0", - "android": "3.0.0" - } - } - }, - "line-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Blur applied to the line, in pixels.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-dasharray": { - "type": "array", - "value": "number", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "doc": "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.", - "minimum": 0, - "transition": true, - "units": "line widths", - "requires": [ - { - "!": "line-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "line-pattern": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "transition": true, - "doc": "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).", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "paint_circle": { - "circle-radius": { - "type": "number", - "default": 5, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Circle radius.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.18.0" - } - } - }, - "circle-color": { - "type": "color", - "default": "#000000", - "doc": "The fill color of the circle.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.18.0" - } - } - }, - "circle-blur": { - "type": "number", - "default": 0, - "doc": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.20.0" - } - } - }, - "circle-opacity": { - "type": "number", - "doc": "The opacity at which the circle will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - }, - "data-driven styling": { - "js": "0.20.0" - } - } - }, - "circle-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [0, 0], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "circle-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "The circle is translated relative to the map." - }, - "viewport": { - "doc": "The circle is translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "circle-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "circle-pitch-scale": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "Circles are scaled according to their apparent distance to the camera." - }, - "viewport": { - "doc": "Circles are not scaled." - } - }, - "default": "map", - "doc": "Controls the scaling behavior of the circle when the map is pitched.", - "sdk-support": { - "basic functionality": { - "js": "0.21.0" - } - } - } - }, - "paint_symbol": { - "icon-opacity": { - "doc": "The opacity at which the icon will be drawn.", - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-color": { - "type": "color", - "default": "#000000", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "doc": "The color of the icon. This can only be used with sdf icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-halo-color": { - "type": "color", - "default": "rgba(0, 0, 0, 0)", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "doc": "The color of the icon's halo. Icon halos can only be used with SDF icons.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-halo-width": { - "type": "number", - "default": 0, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Distance of halo to the icon outline.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-halo-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Fade out the halo towards the outside.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "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.", - "requires": [ - "icon-image" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "icon-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "Icons are translated relative to the map." - }, - "viewport": { - "doc": "Icons are translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "icon-image", - "icon-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-opacity": { - "type": "number", - "doc": "The opacity at which the text will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-color": { - "type": "color", - "doc": "The color with which the text will be drawn.", - "default": "#000000", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-halo-color": { - "type": "color", - "default": "rgba(0, 0, 0, 0)", - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "doc": "The color of the text's halo, which helps it stand out from backgrounds.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-halo-width": { - "type": "number", - "default": 0, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-halo-blur": { - "type": "number", - "default": 0, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "The halo's fadeout distance towards the outside.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-translate": { - "type": "array", - "value": "number", - "length": 2, - "default": [ - 0, - 0 - ], - "function": "interpolated", - "zoom-function": true, - "property-function": true, - "transition": true, - "units": "pixels", - "doc": "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.", - "requires": [ - "text-field" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "text-translate-anchor": { - "type": "enum", - "function": "piecewise-constant", - "zoom-function": true, - "property-function": true, - "values": { - "map": { - "doc": "The text is translated relative to the map." - }, - "viewport": { - "doc": "The text is translated relative to the viewport." - } - }, - "doc": "Controls the translation reference point.", - "default": "map", - "requires": [ - "text-field", - "text-translate" - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "paint_raster": { - "raster-opacity": { - "type": "number", - "doc": "The opacity at which the image will be drawn.", - "default": 1, - "minimum": 0, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-hue-rotate": { - "type": "number", - "default": 0, - "period": 360, - "function": "interpolated", - "zoom-function": true, - "transition": true, - "units": "degrees", - "doc": "Rotates hues around the color wheel.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-brightness-min": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "doc": "Increase or reduce the brightness of the image. The value is the minimum brightness.", - "default": 0, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-brightness-max": { - "type": "number", - "function": "interpolated", - "zoom-function": true, - "doc": "Increase or reduce the brightness of the image. The value is the maximum brightness.", - "default": 1, - "minimum": 0, - "maximum": 1, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-saturation": { - "type": "number", - "doc": "Increase or reduce the saturation of the image.", - "default": 0, - "minimum": -1, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-contrast": { - "type": "number", - "doc": "Increase or reduce the contrast of the image.", - "default": 0, - "minimum": -1, - "maximum": 1, - "function": "interpolated", - "zoom-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "raster-fade-duration": { - "type": "number", - "default": 300, - "minimum": 0, - "function": "interpolated", - "zoom-function": true, - "transition": true, - "units": "milliseconds", - "doc": "Fade duration when a new tile is added.", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "paint_background": { - "background-color": { - "type": "color", - "default": "#000000", - "doc": "The color with which the background will be drawn.", - "function": "interpolated", - "zoom-function": true, - "transition": true, - "requires": [ - { - "!": "background-pattern" - } - ], - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "background-pattern": { - "type": "string", - "function": "piecewise-constant", - "zoom-function": true, - "transition": true, - "doc": "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).", - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - }, - "background-opacity": { - "type": "number", - "default": 1, - "minimum": 0, - "maximum": 1, - "doc": "The opacity at which the background will be drawn.", - "function": "interpolated", - "zoom-function": true, - "transition": true, - "sdk-support": { - "basic functionality": { - "js": "0.10.0", - "ios": "2.0.0", - "android": "2.0.1" - } - } - } - }, - "transition": { - "duration": { - "type": "number", - "default": 300, - "minimum": 0, - "units": "milliseconds", - "doc": "Time allotted for transitions to complete." - }, - "delay": { - "type": "number", - "default": 0, - "minimum": 0, - "units": "milliseconds", - "doc": "Length of time before a transition begins." - } - } -} From e79482d1d5ddb7ad7c9d2a5471335dba29ca49d7 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Thu, 17 Nov 2016 14:28:45 -0800 Subject: [PATCH 10/10] Address review comments --- API.md | 2 +- docs/_generate/index.html | 2 -- lib/group_by_layout.js | 6 ++++-- migrations/v9.js | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/API.md b/API.md index 0eda3a7..d538a66 100644 --- a/API.md +++ b/API.md @@ -107,7 +107,7 @@ fs.writeFileSync('./dest.min.json', format(style, 0)); **Returns** `string`, stringified formatted JSON -### `exports(layers)` +### `groupByLayout(layers)` Given an array of layers, return an array of arrays of layers where all layers in each group have identical layout-affecting properties. These diff --git a/docs/_generate/index.html b/docs/_generate/index.html index 2997e3b..b763f7a 100755 --- a/docs/_generate/index.html +++ b/docs/_generate/index.html @@ -628,8 +628,6 @@

Layers

Paint properties are applied later in the rendering process. A layer that shares layout properties with another layer can have independent paint properties. Paint properties appear in the layer's "paint" object. - Layers can also have class-specific paint properties, defined with a property like "paint.night" and applied only when the map has a certain class - name set. However, note that this feature is deprecated, and will be removed from the next version of the specification. The declassStyle utility provides a way to apply class-specific properties by preprocessing a style in which they're defined.

Key: supports interpolated functions diff --git a/lib/group_by_layout.js b/lib/group_by_layout.js index 4774263..84c36e1 100644 --- a/lib/group_by_layout.js +++ b/lib/group_by_layout.js @@ -9,6 +9,8 @@ function key(layer) { })); } +module.exports = groupByLayout; + /** * Given an array of layers, return an array of arrays of layers where all * layers in each group have identical layout-affecting properties. These @@ -22,7 +24,7 @@ function key(layer) { * @param {Array} layers * @returns {Array>} */ -module.exports = function (layers) { +function groupByLayout(layers) { var groups = {}, i, k; for (i = 0; i < layers.length; i++) { @@ -41,4 +43,4 @@ module.exports = function (layers) { } return result; -}; +} diff --git a/migrations/v9.js b/migrations/v9.js index e4e7d27..b146fad 100644 --- a/migrations/v9.js +++ b/migrations/v9.js @@ -5,7 +5,6 @@ var deref = require('../lib/deref'); function eachLayer(style, callback) { for (var k in style.layers) { callback(style.layers[k]); - eachLayer(style.layers[k], callback); } }