react-native-mapmagic-gl
Version:
Mapmagic GL is a react-native interactive maps library
1,748 lines (1,747 loc) • 114 kB
JSON
{
"$version": 8,
"$root": {
"version": {
"required": true,
"type": "enum",
"values": [8],
"doc": "Style specification version number. Must be 8.",
"example": 8
},
"name": {
"type": "string",
"doc": "A human-readable name for the style.",
"example": "Bright"
},
"metadata": {
"type": "*",
"doc": "Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like '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_vector",
"source_raster",
"source_geojson",
"source_video",
"source_image",
"source_canvas"
],
"source_vector": {
"type": {
"required": true,
"type": "enum",
"values": {
"vector": {
"doc": "A vector tile source."
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [-180, -85.0511, 180, 85.0511],
"doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"*": {
"type": "*",
"doc": "Other keys to configure the data source."
}
},
"source_raster": {
"type": {
"required": true,
"type": "enum",
"values": {
"raster": {
"doc": "A raster tile source."
}
},
"doc": "The type of the source."
},
"url": {
"type": "string",
"doc": "A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<mapid>`."
},
"tiles": {
"type": "array",
"value": "string",
"doc": "An array of one or more tile source URLs, as in the TileJSON spec."
},
"bounds": {
"type": "array",
"value": "number",
"length": 4,
"default": [-180, -85.0511, 180, 85.0511],
"doc": "An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."
},
"minzoom": {
"type": "number",
"default": 0,
"doc": "Minimum zoom level for which tiles are available, as in the TileJSON spec."
},
"maxzoom": {
"type": "number",
"default": 22,
"doc": "Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."
},
"tileSize": {
"type": "number",
"default": 512,
"units": "pixels",
"doc": "The minimum visual size to display tiles for this layer. Only configurable for raster layers."
},
"scheme": {
"type": "enum",
"values": {
"xyz": {
"doc": "Slippy map tilenames scheme."
},
"tms": {
"doc": "OSGeo spec scheme."
}
},
"default": "xyz",
"doc": "Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."
},
"attribution": {
"type": "string",
"doc": "Contains an attribution to be displayed when the map is shown to a user."
},
"*": {
"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."
}
}
},
"source_canvas": {
"type": {
"required": true,
"type": "enum",
"values": {
"canvas": {
"doc": "A canvas data source."
}
},
"doc": "The data type of the canvas source."
},
"coordinates": {
"required": true,
"doc": "Corners of canvas specified in longitude, latitude pairs.",
"type": "array",
"length": 4,
"value": {
"type": "array",
"length": 2,
"value": "number",
"doc": "A single longitude, latitude pair."
}
},
"animate": {
"type": "boolean",
"default": "true",
"doc": "Whether the canvas source is animated. If the canvas is static, `animate` should be set to `false` to improve performance."
},
"canvas": {
"type": "string",
"required": true,
"doc": "HTML ID of the canvas from which to read pixels."
}
},
"layer": {
"id": {
"type": "string",
"doc": "Unique layer name.",
"required": true
},
"type": {
"type": "enum",
"values": {
"fill": {
"doc": "A filled polygon with an optional stroked border.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
},
"line": {
"doc": "A stroked line.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
},
"symbol": {
"doc": "An icon or a text label.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
},
"circle": {
"doc": "A filled circle.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
},
"heatmap": {
"doc": "A heatmap.",
"sdk-support": {
"basic functionality": {
"js": "0.41.0"
}
}
},
"fill-extrusion": {
"doc": "An extruded (3D) polygon.",
"sdk-support": {
"basic functionality": {
"js": "0.27.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"raster": {
"doc": "Raster map textures such as satellite imagery.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
},
"background": {
"doc": "The background color or pattern of the map.",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
}
},
"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:'."
},
"source": {
"type": "string",
"doc": "Name of a source description to be used for this layer. Required for all layer types except `background`."
},
"source-layer": {
"type": "string",
"doc": "Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."
},
"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_heatmap",
"layout_fill-extrusion",
"layout_symbol",
"layout_raster",
"layout_background"
],
"layout_background": {
"visibility": {
"type": "enum",
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
}
},
"layout_fill": {
"visibility": {
"type": "enum",
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
}
},
"layout_circle": {
"visibility": {
"type": "enum",
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
}
}
}
},
"layout_heatmap": {
"visibility": {
"type": "enum",
"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.41.0"
}
}
}
},
"layout_fill-extrusion": {
"visibility": {
"type": "enum",
"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",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
}
},
"layout_line": {
"line-cap": {
"type": "enum",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"line-miter-limit": {
"type": "number",
"default": 2,
"function": "interpolated",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"line-round-limit": {
"type": "number",
"default": 1.05,
"function": "interpolated",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"visibility": {
"type": "enum",
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
}
},
"layout_symbol": {
"symbol-placement": {
"type": "enum",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"symbol-spacing": {
"type": "number",
"default": 250,
"minimum": 1,
"function": "interpolated",
"zoom-function": true,
"units": "pixels",
"doc": "Distance between two symbol anchors.",
"requires": [
{
"symbol-placement": "line"
}
],
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"symbol-avoid-edges": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-allow-overlap": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-ignore-placement": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-optional": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-rotation-alignment": {
"type": "enum",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.3.0"
},
"data-driven styling": {}
}
},
"icon-size": {
"type": "number",
"default": 1,
"minimum": 0,
"function": "interpolated",
"zoom-function": true,
"property-function": true,
"units": "factor of the original icon size",
"doc": "Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",
"requires": [
"icon-image"
],
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"icon-text-fit": {
"type": "enum",
"function": "piecewise-constant",
"zoom-function": true,
"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",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.2.1"
},
"data-driven styling": {}
}
},
"icon-text-fit-padding": {
"type": "array",
"value": "number",
"length": 4,
"default": [
0,
0,
0,
0
],
"units": "pixels",
"function": "interpolated",
"zoom-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",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.2.1"
},
"data-driven styling": {}
}
},
"icon-image": {
"type": "string",
"function": "piecewise-constant",
"zoom-function": true,
"property-function": true,
"doc": "Name of image in sprite to use for drawing an image background. A string with `{tokens}` replaced, referencing the data property to pull from. (`{token}` replacement is only supported for literal `icon-image` values; not for property functions.)",
"tokens": true,
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.21.0",
"android": "5.0.0",
"ios": "3.5.0",
"macos": "0.4.0"
}
}
},
"icon-padding": {
"type": "number",
"default": 2,
"minimum": 0,
"function": "interpolated",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-keep-upright": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"icon-offset": {
"type": "array",
"value": "number",
"units": "pixels multiplied by the value of \"icon-size\"",
"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. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",
"requires": [
"icon-image"
],
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.29.0",
"android": "5.0.0",
"ios": "3.5.0",
"macos": "0.4.0"
}
}
},
"icon-anchor": {
"type": "enum",
"function": "piecewise-constant",
"zoom-function": true,
"property-function": true,
"values": {
"center": {
"doc": "The center of the icon is placed closest to the anchor."
},
"left": {
"doc": "The left side of the icon is placed closest to the anchor."
},
"right": {
"doc": "The right side of the icon is placed closest to the anchor."
},
"top": {
"doc": "The top of the icon is placed closest to the anchor."
},
"bottom": {
"doc": "The bottom of the icon is placed closest to the anchor."
},
"top-left": {
"doc": "The top left corner of the icon is placed closest to the anchor."
},
"top-right": {
"doc": "The top right corner of the icon is placed closest to the anchor."
},
"bottom-left": {
"doc": "The bottom left corner of the icon is placed closest to the anchor."
},
"bottom-right": {
"doc": "The bottom right corner of the icon is placed closest to the anchor."
}
},
"default": "center",
"doc": "Part of the icon placed closest to the anchor.",
"requires": [
"icon-image"
],
"sdk-support": {
"basic functionality": {
"js": "0.40.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"icon-pitch-alignment": {
"type": "enum",
"function": "piecewise-constant",
"zoom-function": true,
"values": {
"map": {
"doc": "The icon is aligned to the plane of the map."
},
"viewport": {
"doc": "The icon is aligned to the plane of the viewport."
},
"auto": {
"doc": "Automatically matches the value of `icon-rotation-alignment`."
}
},
"default": "auto",
"doc": "Orientation of icon when map is pitched.",
"requires": [
"icon-image"
],
"sdk-support": {
"basic functionality": {
"js": "0.39.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
},
"data-driven styling": {}
}
},
"text-pitch-alignment": {
"type": "enum",
"function": "piecewise-constant",
"zoom-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",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.2.1"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.3.0"
},
"data-driven styling": {}
}
},
"text-rotation-alignment": {
"type": "enum",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"`auto` value": {
"js": "0.25.0",
"android": "4.2.0",
"ios": "3.4.0",
"macos": "0.3.0"
},
"data-driven styling": {}
}
},
"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}`. (`{token}` replacement is only supported for literal `text-field` values; not for property functions.)",
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
"ios": "3.5.0",
"macos": "0.4.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"text-line-height": {
"type": "number",
"default": 1.2,
"units": "ems",
"function": "interpolated",
"zoom-function": true,
"doc": "Text leading value for multi-line text.",
"requires": [
"text-field"
],
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.40.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.39.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.39.0",
"android": "5.2.0",
"ios": "3.7.0",
"macos": "0.6.0"
}
}
},
"text-max-angle": {
"type": "number",
"default": 45,
"units": "degrees",
"function": "interpolated",
"zoom-function": true,
"doc": "Maximum angle change between adjacent characters.",
"requires": [
"text-field",
{
"symbol-placement": "line"
}
],
"sdk-support": {
"basic functionality": {
"js": "0.10.0",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"text-padding": {
"type": "number",
"default": 2,
"minimum": 0,
"units": "pixels",
"function": "interpolated",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"text-keep-upright": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.33.0",
"android": "5.0.0",
"ios": "3.5.0",
"macos": "0.4.0"
}
}
},
"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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {
"js": "0.35.0",
"android": "5.1.0",
"ios": "3.6.0",
"macos": "0.5.0"
}
}
},
"text-allow-overlap": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"text-ignore-placement": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"text-optional": {
"type": "boolean",
"function": "piecewise-constant",
"zoom-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",
"android": "2.0.1",
"ios": "2.0.0",
"macos": "0.1.0"
},
"data-driven styling": {}
}
},
"visibility": {
"type": "enum",
"values": {
"visible": {
"doc": "The layer is shown."
},
"none": {