react-native-mapmagic-gl
Version:
Mapmagic GL is a react-native interactive maps library
1,589 lines • 118 kB
JSON
{
"BackgroundLayer": {
"description": "",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source in the style to which it is added."
},
{
"name": "sourceID",
"required": false,
"type": "string",
"default": "MapboxGL.StyleSource.DefaultSourceID",
"description": "The source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined."
},
{
"name": "sourceLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style."
},
{
"name": "aboveLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer above aboveLayerID."
},
{
"name": "belowLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer below belowLayerID"
},
{
"name": "layerIndex",
"required": false,
"type": "number",
"default": "none",
"description": "Inserts a layer at a specified index"
},
{
"name": "filter",
"required": false,
"type": "array",
"default": "none",
"description": "Filter only the features in the source layer that satisfy a condition that you define"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The minimum zoom level at which the layer gets parsed and appears."
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The maximum zoom level at which the layer gets parsed and appears."
},
{
"name": "style",
"required": false,
"type": "union",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "BackgroundLayer",
"styles": [
{
"name": "visibility",
"type": "enum",
"values": [
{
"value": "visible",
"doc": "The layer is shown."
},
{
"value": "none",
"doc": "The layer is not shown."
}
],
"default": "visible",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "backgroundColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "The color with which the background will be drawn.",
"requires": [],
"disabledBy": [
"backgroundPattern"
],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "backgroundPattern",
"type": "string",
"values": [],
"description": "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).",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "backgroundOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity at which the background will be drawn.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
}
]
},
"Callout": {
"description": "Callout that displays information about a selected annotation near the annotation.",
"methods": [],
"props": [
{
"name": "title",
"required": false,
"type": "string",
"default": "none",
"description": "String that get's displayed in the default callout."
},
{
"name": "style",
"required": false,
"type": "any",
"default": "none",
"description": "Style property for the Animated.View wrapper, apply animations to this"
},
{
"name": "containerStyle",
"required": false,
"type": "any",
"default": "none",
"description": "Style property for the native RCTMGLCallout container, set at your own risk."
},
{
"name": "contentStyle",
"required": false,
"type": "any",
"default": "none",
"description": "Style property for the content bubble."
},
{
"name": "tipStyle",
"required": false,
"type": "any",
"default": "none",
"description": "Style property for the triangle tip under the content."
},
{
"name": "textStyle",
"required": false,
"type": "any",
"default": "none",
"description": "Style property for the title in the content bubble."
}
],
"composes": [
"../utils"
],
"name": "Callout"
},
"CircleLayer": {
"description": "CircleLayer is a style layer that renders one or more filled circles on the map.",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source in the style to which it is added."
},
{
"name": "sourceID",
"required": false,
"type": "string",
"default": "MapboxGL.StyleSource.DefaultSourceID",
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined."
},
{
"name": "sourceLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Identifier of the layer within the source identified by the sourceID property\nfrom which the receiver obtains the data to style."
},
{
"name": "aboveLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer above aboveLayerID."
},
{
"name": "belowLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer below belowLayerID"
},
{
"name": "layerIndex",
"required": false,
"type": "number",
"default": "none",
"description": "Inserts a layer at a specified index"
},
{
"name": "filter",
"required": false,
"type": "array",
"default": "none",
"description": "Filter only the features in the source layer that satisfy a condition that you define"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The minimum zoom level at which the layer gets parsed and appears."
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The maximum zoom level at which the layer gets parsed and appears."
},
{
"name": "style",
"required": false,
"type": "union",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "CircleLayer",
"styles": [
{
"name": "visibility",
"type": "enum",
"values": [
{
"value": "visible",
"doc": "The layer is shown."
},
{
"value": "none",
"doc": "The layer is not shown."
}
],
"default": "visible",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "circleRadius",
"type": "number",
"values": [],
"minimum": 0,
"units": "pixels",
"default": 5,
"description": "Circle radius.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "The fill color of the circle.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleBlur",
"type": "number",
"values": [],
"default": 0,
"description": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity at which the circle will be drawn.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleTranslate",
"type": "array<number>",
"values": [],
"units": "pixels",
"default": [
0,
0
],
"description": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "circleTranslateAnchor",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The circle is translated relative to the map."
},
{
"value": "viewport",
"doc": "The circle is translated relative to the viewport."
}
],
"default": "map",
"description": "Controls the frame of reference for `circleTranslate`.",
"requires": [
"circleTranslate"
],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "circlePitchScale",
"type": "enum",
"values": [
{
"value": "map",
"doc": "Circles are scaled according to their apparent distance to the camera."
},
{
"value": "viewport",
"doc": "Circles are not scaled."
}
],
"default": "map",
"description": "Controls the scaling behavior of the circle when the map is pitched.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "circlePitchAlignment",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The circle is aligned to the plane of the map."
},
{
"value": "viewport",
"doc": "The circle is aligned to the plane of the viewport."
}
],
"default": "viewport",
"description": "Orientation of circle when map is pitched.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "circleStrokeWidth",
"type": "number",
"values": [],
"minimum": 0,
"units": "pixels",
"default": 0,
"description": "The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleStrokeColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "The stroke color of the circle.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "circleStrokeOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity of the circle's stroke.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
}
]
},
"FillExtrusionLayer": {
"description": "FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source in the style to which it is added."
},
{
"name": "sourceID",
"required": false,
"type": "string",
"default": "MapboxGL.StyleSource.DefaultSourceID",
"description": "The source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined."
},
{
"name": "sourceLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style."
},
{
"name": "aboveLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer above aboveLayerID."
},
{
"name": "belowLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer below belowLayerID"
},
{
"name": "layerIndex",
"required": false,
"type": "number",
"default": "none",
"description": "Inserts a layer at a specified index"
},
{
"name": "filter",
"required": false,
"type": "array",
"default": "none",
"description": "Filter only the features in the source layer that satisfy a condition that you define"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The minimum zoom level at which the layer gets parsed and appears."
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The maximum zoom level at which the layer gets parsed and appears."
},
{
"name": "style",
"required": false,
"type": "union",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "FillExtrusionLayer",
"styles": [
{
"name": "visibility",
"type": "enum",
"values": [
{
"value": "visible",
"doc": "The layer is shown."
},
{
"value": "none",
"doc": "The layer is not shown."
}
],
"default": "visible",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "fillExtrusionOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillExtrusionColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "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 `fillExtrusionOpacity` to set layer opacity.",
"requires": [],
"disabledBy": [
"fillExtrusionPattern"
],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "fillExtrusionTranslate",
"type": "array<number>",
"values": [],
"units": "pixels",
"default": [
0,
0
],
"description": "The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillExtrusionTranslateAnchor",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The fill extrusion is translated relative to the map."
},
{
"value": "viewport",
"doc": "The fill extrusion is translated relative to the viewport."
}
],
"default": "map",
"description": "Controls the frame of reference for `fillExtrusionTranslate`.",
"requires": [
"fillExtrusionTranslate"
],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillExtrusionPattern",
"type": "string",
"values": [],
"description": "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).",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillExtrusionHeight",
"type": "number",
"values": [],
"minimum": 0,
"units": "meters",
"default": 0,
"description": "The height with which to extrude this layer.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "fillExtrusionBase",
"type": "number",
"values": [],
"minimum": 0,
"units": "meters",
"default": 0,
"description": "The height with which to extrude the base of this layer. Must be less than or equal to `fillExtrusionHeight`.",
"requires": [
"fillExtrusionHeight"
],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
}
]
},
"FillLayer": {
"description": "FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source in the style to which it is added."
},
{
"name": "sourceID",
"required": false,
"type": "string",
"default": "MapboxGL.StyleSource.DefaultSourceID",
"description": "The source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined."
},
{
"name": "sourceLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style."
},
{
"name": "aboveLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer above aboveLayerID."
},
{
"name": "belowLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer below belowLayerID"
},
{
"name": "layerIndex",
"required": false,
"type": "number",
"default": "none",
"description": "Inserts a layer at a specified index"
},
{
"name": "filter",
"required": false,
"type": "array",
"default": "none",
"description": "Filter only the features in the source layer that satisfy a condition that you define"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The minimum zoom level at which the layer gets parsed and appears."
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The maximum zoom level at which the layer gets parsed and appears."
},
{
"name": "style",
"required": false,
"type": "union",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "FillLayer",
"styles": [
{
"name": "visibility",
"type": "enum",
"values": [
{
"value": "visible",
"doc": "The layer is shown."
},
{
"value": "none",
"doc": "The layer is not shown."
}
],
"default": "visible",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "fillAntialias",
"type": "boolean",
"values": [],
"default": true,
"description": "Whether or not the fill should be antialiased.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1px stroke around the fill, if the stroke is used.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "fillColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "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.",
"requires": [],
"disabledBy": [
"fillPattern"
],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "fillOutlineColor",
"type": "color",
"values": [],
"description": "The outline color of the fill. Matches the value of `fillColor` if unspecified.",
"requires": [],
"disabledBy": [
"fillPattern"
],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "fillTranslate",
"type": "array<number>",
"values": [],
"units": "pixels",
"default": [
0,
0
],
"description": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillTranslateAnchor",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The fill is translated relative to the map."
},
{
"value": "viewport",
"doc": "The fill is translated relative to the viewport."
}
],
"default": "map",
"description": "Controls the frame of reference for `fillTranslate`.",
"requires": [
"fillTranslate"
],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "fillPattern",
"type": "string",
"values": [],
"description": "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).",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
}
]
},
"ImageSource": {
"description": "ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.\nThe georeferenced image scales and rotates as the user zooms and rotates the map",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source."
},
{
"name": "url",
"required": false,
"type": "union",
"default": "none",
"description": "An HTTP(S) URL, absolute file URL, or local file URL to the source image.\nGifs are currently not supported."
},
{
"name": "coordinates",
"required": true,
"type": "arrayOf",
"default": "none",
"description": "The top left, top right, bottom right, and bottom left coordinates for the image."
}
],
"composes": [
"../utils"
],
"name": "ImageSource"
},
"Light": {
"description": "Light represents the light source for extruded geometries",
"methods": [],
"props": [
{
"name": "style",
"required": false,
"type": "custom",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "Light",
"styles": [
{
"name": "anchor",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The position of the light source is aligned to the rotation of the map."
},
{
"value": "viewport",
"doc": "The position of the light source is aligned to the rotation of the viewport."
}
],
"default": "viewport",
"description": "Whether extruded geometries are lit relative to the map or viewport.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "position",
"type": "array<number>",
"values": [],
"default": [
1.15,
210,
30
],
"description": "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).",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "color",
"type": "color",
"values": [],
"default": "#ffffff",
"description": "Color tint for lighting extruded geometries.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "intensity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 0.5,
"description": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
}
]
},
"LineLayer": {
"description": "LineLayer is a style layer that renders one or more stroked polylines on the map.",
"methods": [],
"props": [
{
"name": "id",
"required": false,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the source in the style to which it is added."
},
{
"name": "sourceID",
"required": false,
"type": "string",
"default": "MapboxGL.StyleSource.DefaultSourceID",
"description": "The source from which to obtain the data to style.\nIf the source has not yet been added to the current style, the behavior is undefined."
},
{
"name": "sourceLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style."
},
{
"name": "aboveLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer above aboveLayerID."
},
{
"name": "belowLayerID",
"required": false,
"type": "string",
"default": "none",
"description": "Inserts a layer below belowLayerID"
},
{
"name": "layerIndex",
"required": false,
"type": "number",
"default": "none",
"description": "Inserts a layer at a specified index"
},
{
"name": "filter",
"required": false,
"type": "array",
"default": "none",
"description": "Filter only the features in the source layer that satisfy a condition that you define"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The minimum zoom level at which the layer gets parsed and appears."
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "The maximum zoom level at which the layer gets parsed and appears."
},
{
"name": "style",
"required": false,
"type": "union",
"default": "none",
"description": "Customizable style attributes"
}
],
"composes": [
"../utils"
],
"name": "LineLayer",
"styles": [
{
"name": "lineCap",
"type": "enum",
"values": [
{
"value": "butt",
"doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line."
},
{
"value": "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."
},
{
"value": "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",
"description": "The display of line endings.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineJoin",
"type": "enum",
"values": [
{
"value": "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."
},
{
"value": "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."
},
{
"value": "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",
"description": "The display of lines when joining.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineMiterLimit",
"type": "number",
"values": [],
"default": 2,
"description": "Used to automatically convert miter joins to bevel joins for sharp angles.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineRoundLimit",
"type": "number",
"values": [],
"default": 1.05,
"description": "Used to automatically convert round joins to miter joins for shallow angles.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "visibility",
"type": "enum",
"values": [
{
"value": "visible",
"doc": "The layer is shown."
},
{
"value": "none",
"doc": "The layer is not shown."
}
],
"default": "visible",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": []
},
{
"name": "lineOpacity",
"type": "number",
"values": [],
"minimum": 0,
"maximum": 1,
"default": 1,
"description": "The opacity at which the line will be drawn.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "lineColor",
"type": "color",
"values": [],
"default": "#000000",
"description": "The color with which the line will be drawn.",
"requires": [],
"disabledBy": [
"linePattern"
],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "lineTranslate",
"type": "array<number>",
"values": [],
"units": "pixels",
"default": [
0,
0
],
"description": "The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineTranslateAnchor",
"type": "enum",
"values": [
{
"value": "map",
"doc": "The line is translated relative to the map."
},
{
"value": "viewport",
"doc": "The line is translated relative to the viewport."
}
],
"default": "map",
"description": "Controls the frame of reference for `lineTranslate`.",
"requires": [
"lineTranslate"
],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineWidth",
"type": "number",
"values": [],
"minimum": 0,
"units": "pixels",
"default": 1,
"description": "Stroke thickness.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "lineGapWidth",
"type": "number",
"values": [],
"minimum": 0,
"units": "pixels",
"default": 0,
"description": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "lineOffset",
"type": "number",
"values": [],
"units": "pixels",
"default": 0,
"description": "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.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "lineBlur",
"type": "number",
"values": [],
"minimum": 0,
"units": "pixels",
"default": 0,
"description": "Blur applied to the line, in pixels.",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera",
"source",
"composite"
]
},
{
"name": "lineDasharray",
"type": "array<number>",
"values": [],
"minimum": 0,
"units": "line widths",
"description": "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.",
"requires": [],
"disabledBy": [
"linePattern"
],
"allowedFunctionTypes": [
"camera"
]
},
{
"name": "linePattern",
"type": "string",
"values": [],
"description": "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).",
"requires": [],
"disabledBy": [],
"allowedFunctionTypes": [
"camera"
]
}
]
},
"MapView": {
"description": "MapView backed by Mapbox Native GL",
"methods": [
{
"name": "getPointInView",
"docblock": "Converts a geographic coordinate to a point in the given view’s coordinate system.\n\n@example\nconst pointInView = await this._map.getPointInView([-37.817070, 144.949901]);\n\n@param {Array<Number>} coordinate - A point expressed in the map view's coordinate system.\n@return {Array}",
"modifiers": [
"async"
],
"params": [
{
"name": "coordinate",
"description": "A point expressed in the map view's coordinate system.",
"type": {
"name": "Array"
}
}
],
"returns": {
"description": null,
"type": {
"name": "Array"
}
},
"description": "Converts a geographic coordinate to a point in the given view’s coordinate system.",
"examples": [
"\nconst pointInView = await this._map.getPointInView([-37.817070, 144.949901]);\n\n"
]
},
{
"name": "getVisibleBounds",
"docblock": "The coordinate bounds(ne, sw) visible in the users’s viewport.\n\n@example\nconst visibleBounds = await this._map.getVisibleBounds();\n\n@return {Array}",
"modifiers": [
"async"
],
"params": [],
"returns": {
"description": null,
"type": {
"name": "Array"
}
},
"description": "The coordinate bounds(ne, sw) visible in the users’s viewport.",
"examples": [
"\nconst visibleBounds = await this._map.getVisibleBounds();\n\n"
]
},
{
"name": "queryRenderedFeaturesAtPoint",
"docblock": "Returns an array of rendered map features that intersect with a given point.\n\n@example\nthis._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2'])\n\n@param {Array<Number>} coordinate - A point expressed in the map view’s coordinate system.\n@param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.\n@param {Array=} layerIDs - A array of layer id's to filter the features by\n@return {FeatureCollection}",
"modifiers": [
"async"
],
"params": [
{
"name": "coordinate",
"description": "A point expressed in the map view’s coordinate system.",
"type": {
"name": "Array"
}
},
{
"name": "filter",
"description": "A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.",
"type": {
"name": "Array"
},
"optional": true
},
{
"name": "layerIDs",
"description": "A array of layer id's to filter the features by",
"type": {
"name": "Array"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "FeatureCollection"
}
},
"description": "Returns an array of rendered map features that intersect with a given point.",
"examples": [
"\nthis._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2'])\n\n"
]
},
{
"name": "queryRenderedFeaturesInRect",
"docblock": "Returns an array of rendered map features that intersect with the given rectangle,\nrestricted to the given style layers and filtered by the given predicate.\n\n@example\nthis._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2'])\n\n@param {Array<Number>} bbox - A rectangle expressed in the map view’s coordinate system.\n@param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.\n@param {Array=} layerIDs - A array of layer id's to filter the features by\n@return {FeatureCollection}",
"modifiers": [
"async"
],
"params": [
{
"name": "bbox",
"description": "A rectangle expressed in the map view’s coordinate system.",
"type": {
"name": "Array"
}
},
{
"name": "filter",
"description": "A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.",
"type": {
"name": "Array"
},
"optional": true
},
{
"name": "layerIDs",
"description": " A array of layer id's to filter the features by",
"type": {
"name": "Array"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "FeatureCollection"
}
},
"description": "Returns an array of rendered map features that intersect with the given rectangle,\nrestricted to the given style layers and filtered by the given predicate.",
"examples": [
"\nthis._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2'])\n\n"
]
},
{
"name": "fitBounds",
"docblock": "Map camera transitions to fit provided bounds\n\n@example\nthis.map.fitBounds([lng, lat], [lng, lat])\nthis.map.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides\nthis.map.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000)\nthis.map.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000)\n\n@param {Array<Number>} northEastCoordinates - North east coordinate of bound\n@param {Array<Number>} southWestCoordinates - South west coordinate of bound\n@param {Number=} padding - Camera padding for bound\n@param {Number=} duration - Duration of camera animation\n@return {void}",
"modifiers": [],
"params": [
{
"name": "northEastCoordinates",
"description": "North east coordinate of bound",
"type": {
"name": "Array"
}
},
{
"name": "southWestCoordinates",
"description": "South west coordinate of bound",
"type": {
"name": "Array"
}
},
{
"name": "padding",
"description": "Camera padding for bound",
"type": {
"name": "Number"
},
"optional": true
},
{
"name": "duration",
"description": "Duration of camera animation",
"type": {
"name": "Number"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "void"
}
},
"description": "Map camera transitions to fit provided bounds",
"examples": [
"\nthis.map.fitBounds([lng, lat], [lng, lat])\nthis.map.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides\nthis.map.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000)\nthis.map.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000)\n\n"
]
},
{
"name": "flyTo",
"docblock": "Map camera will fly to new coordinate\n\n@example\nthis.map.flyTo([lng, lat])\nthis.map.flyTo([lng, lat], 12000)\n\n @param {Array<Number>} coordinates - Coordinates that map camera will jump too\n @param {Number=} duration - Duration of camera animation\n @return {void}",
"modifiers": [],
"params": [
{
"name": "coordinates",
"description": "Coordinates that map camera will jump too",
"type": {
"name": "Array"
}
},
{
"name": "duration",
"description": "Duration of camera animation",
"type": {
"name": "Number"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "void"
}
},
"description": "Map camera will fly to new coordinate",
"examples": [
"\nthis.map.flyTo([lng, lat])\nthis.map.flyTo([lng, lat], 12000)\n\n "
]
},
{
"name": "moveTo",
"docblock": "Map camera will move to new coordinate at the same zoom level\n\n@example\nthis.map.moveTo([lng, lat], 200) // eases camera to new location based on duration\nthis.map.moveTo([lng, lat]) // snaps camera to new location without any easing\n\n @param {Array<Number>} coordinates - Coordinates that map camera will move too\n @param {Number=} duration - Duration of camera animation\n @return {void}",
"modifiers": [],
"params": [
{
"name": "coordinates",
"description": "Coordinates that map camera will move too",
"type": {
"name": "Array"
}
},
{
"name": "duration",
"description": "Duration of camera animation",
"type": {
"name": "Number"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "void"
}
},
"description": "Map camera will move to new coordinate at the same zoom level",
"examples": [
"\nthis.map.moveTo([lng, lat], 200) // eases camera to new location based on duration\nthis.map.moveTo([lng, lat]) // snaps camera to new location without any easing\n\n "
]
},
{
"name": "zoomTo",
"docblock": "Map camera will zoom to specified level\n\n@example\nthis.map.zoomTo(16)\nthis.map.zoomTo(16, 100)\n\n@param {Number} zoomLevel - Zoom level that the map camera will animate too\n@param {Number=} duration - Duration of camera animation\n@return {