@mapbox/react-native-mapbox-gl
Version:
A Mapbox GL react native module for creating custom maps
1,496 lines • 82.7 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",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": []
},
{
"name": "backgroundColor",
"type": "color",
"description": "The color with which the background will be drawn.",
"requires": [],
"disabledBy": [
"backgroundPattern"
]
},
{
"name": "backgroundPattern",
"type": "string",
"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": []
},
{
"name": "backgroundOpacity",
"type": "number",
"description": "The opacity at which the background will be drawn.",
"requires": [],
"disabledBy": []
}
]
},
"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",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": []
},
{
"name": "circleRadius",
"type": "number",
"description": "Circle radius.",
"requires": [],
"disabledBy": []
},
{
"name": "circleColor",
"type": "color",
"description": "The fill color of the circle.",
"requires": [],
"disabledBy": []
},
{
"name": "circleBlur",
"type": "number",
"description": "Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",
"requires": [],
"disabledBy": []
},
{
"name": "circleOpacity",
"type": "number",
"description": "The opacity at which the circle will be drawn.",
"requires": [],
"disabledBy": []
},
{
"name": "circleTranslate",
"type": "array",
"description": "The geometry's offset. Values are `{ x: number, y: number }` where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": []
},
{
"name": "circleTranslateAnchor",
"type": "enum",
"description": "Controls the translation reference point.",
"requires": [
"circleTranslate"
],
"disabledBy": []
},
{
"name": "circlePitchScale",
"type": "enum",
"description": "Controls the scaling behavior of the circle when the map is pitched.",
"requires": [],
"disabledBy": []
},
{
"name": "circleStrokeWidth",
"type": "number",
"description": "The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.",
"requires": [],
"disabledBy": []
},
{
"name": "circleStrokeColor",
"type": "color",
"description": "The stroke color of the circle.",
"requires": [],
"disabledBy": []
},
{
"name": "circleStrokeOpacity",
"type": "number",
"description": "The opacity of the circle's stroke.",
"requires": [],
"disabledBy": []
}
]
},
"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",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": []
},
{
"name": "fillExtrusionOpacity",
"type": "number",
"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": []
},
{
"name": "fillExtrusionColor",
"type": "color",
"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"
]
},
{
"name": "fillExtrusionTranslate",
"type": "array",
"description": "The geometry's offset. Values are `{ x: number, y: number }` where negatives indicate left and up (on the flat plane), respectively.",
"requires": [],
"disabledBy": []
},
{
"name": "fillExtrusionTranslateAnchor",
"type": "enum",
"description": "Controls the translation reference point.",
"requires": [
"fillExtrusionTranslate"
],
"disabledBy": []
},
{
"name": "fillExtrusionPattern",
"type": "string",
"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": []
},
{
"name": "fillExtrusionHeight",
"type": "number",
"description": "The height with which to extrude this layer.",
"requires": [],
"disabledBy": []
},
{
"name": "fillExtrusionBase",
"type": "number",
"description": "The height with which to extrude the base of this layer. Must be less than or equal to `fillExtrusionHeight`.",
"requires": [
"fillExtrusionHeight"
],
"disabledBy": []
}
]
},
"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",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": []
},
{
"name": "fillAntialias",
"type": "boolean",
"description": "Whether or not the fill should be antialiased.",
"requires": [],
"disabledBy": []
},
{
"name": "fillOpacity",
"type": "number",
"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": []
},
{
"name": "fillColor",
"type": "color",
"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"
]
},
{
"name": "fillOutlineColor",
"type": "color",
"description": "The outline color of the fill. Matches the value of `fillColor` if unspecified.",
"requires": [],
"disabledBy": [
"fillPattern"
]
},
{
"name": "fillTranslate",
"type": "array",
"description": "The geometry's offset. Values are `{ x: number, y: number }` where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": []
},
{
"name": "fillTranslateAnchor",
"type": "enum",
"description": "Controls the translation reference point.",
"requires": [
"fillTranslate"
],
"disabledBy": []
},
{
"name": "fillPattern",
"type": "string",
"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": []
}
]
},
"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",
"description": "Whether extruded geometries are lit relative to the map or viewport.",
"requires": [],
"disabledBy": []
},
{
"name": "position",
"type": "array",
"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": []
},
{
"name": "color",
"type": "color",
"description": "Color tint for lighting extruded geometries.",
"requires": [],
"disabledBy": []
},
{
"name": "intensity",
"type": "number",
"description": "Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.",
"requires": [],
"disabledBy": []
}
]
},
"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",
"description": "The display of line endings.",
"requires": [],
"disabledBy": []
},
{
"name": "lineJoin",
"type": "enum",
"description": "The display of lines when joining.",
"requires": [],
"disabledBy": []
},
{
"name": "lineMiterLimit",
"type": "number",
"description": "Used to automatically convert miter joins to bevel joins for sharp angles.",
"requires": [],
"disabledBy": []
},
{
"name": "lineRoundLimit",
"type": "number",
"description": "Used to automatically convert round joins to miter joins for shallow angles.",
"requires": [],
"disabledBy": []
},
{
"name": "visibility",
"type": "enum",
"description": "Whether this layer is displayed.",
"requires": [],
"disabledBy": []
},
{
"name": "lineOpacity",
"type": "number",
"description": "The opacity at which the line will be drawn.",
"requires": [],
"disabledBy": []
},
{
"name": "lineColor",
"type": "color",
"description": "The color with which the line will be drawn.",
"requires": [],
"disabledBy": [
"linePattern"
]
},
{
"name": "lineTranslate",
"type": "array",
"description": "The geometry's offset. Values are `{ x: number, y: number }` where negatives indicate left and up, respectively.",
"requires": [],
"disabledBy": []
},
{
"name": "lineTranslateAnchor",
"type": "enum",
"description": "Controls the translation reference point.",
"requires": [
"lineTranslate"
],
"disabledBy": []
},
{
"name": "lineWidth",
"type": "number",
"description": "Stroke thickness.",
"requires": [],
"disabledBy": []
},
{
"name": "lineGapWidth",
"type": "number",
"description": "Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",
"requires": [],
"disabledBy": []
},
{
"name": "lineOffset",
"type": "number",
"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": []
},
{
"name": "lineBlur",
"type": "number",
"description": "Blur applied to the line, in pixels.",
"requires": [],
"disabledBy": []
},
{
"name": "lineDasharray",
"type": "array",
"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"
]
},
{
"name": "linePattern",
"type": "string",
"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": []
}
]
},
"MapView": {
"description": "MapView backed by Mapbox Native GL",
"methods": [
{
"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 {void}",
"modifiers": [],
"params": [
{
"name": "zoomLevel",
"description": "Zoom level that the map camera will animate too",
"type": {
"name": "Number"
}
},
{
"name": "duration",
"description": "Duration of camera animation",
"type": {
"name": "Number"
},
"optional": true
}
],
"returns": {
"description": null,
"type": {
"name": "void"
}
},
"description": "Map camera will zoom to specified level",
"examples": [
"\nthis.map.zoomTo(16)\nthis.map.zoomTo(16, 100)\n\n"
]
},
{
"name": "setCamera",
"docblock": "Map camera will perform updates based on provided config. Advanced use only!\n\n@example\nthis.map.setCamera({\n centerCoordinate: [lng, lat],\n zoomLevel: 16,\n duration: 2000,\n})\n\nthis.map.setCamera({\n stops: [\n { pitch: 45, duration: 200 },\n { heading: 180, duration: 300 },\n ]\n})\n\n @param {Object} config - Camera configuration",
"modifiers": [],
"params": [
{
"name": "config",
"description": "Camera configuration",
"type": {
"name": "Object"
}
}
],
"returns": null,
"description": "Map camera will perform updates based on provided config. Advanced use only!",
"examples": [
"\nthis.map.setCamera({\n centerCoordinate: [lng, lat],\n zoomLevel: 16,\n duration: 2000,\n})\n\nthis.map.setCamera({\n stops: [\n { pitch: 45, duration: 200 },\n { heading: 180, duration: 300 },\n ]\n})\n\n "
]
}
],
"props": [
{
"name": "animated",
"required": false,
"type": "bool",
"default": "false",
"description": "Animates changes between pitch and bearing"
},
{
"name": "centerCoordinate",
"required": false,
"type": "arrayOf",
"default": "none",
"description": "Initial center coordinate on map [lng, lat]"
},
{
"name": "showUserLocation",
"required": false,
"type": "bool",
"default": "none",
"description": "Shows the users location on the map"
},
{
"name": "userTrackingMode",
"required": false,
"type": "number",
"default": "MapboxGL.UserTrackingModes.None",
"description": "The mode used to track the user location on the map"
},
{
"name": "contentInset",
"required": false,
"type": "union",
"default": "none",
"description": "The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport."
},
{
"name": "heading",
"required": false,
"type": "number",
"default": "0",
"description": "Initial heading on map"
},
{
"name": "pitch",
"required": false,
"type": "number",
"default": "0",
"description": "Initial pitch on map"
},
{
"name": "style",
"required": false,
"type": "any",
"default": "none",
"description": "Style for wrapping React Native View"
},
{
"name": "styleURL",
"required": false,
"type": "string",
"default": "MapboxGL.StyleURL.Street",
"description": "Style URL for map"
},
{
"name": "zoomLevel",
"required": false,
"type": "number",
"default": "16",
"description": "Initial zoom level of map"
},
{
"name": "minZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "Min zoom level of map"
},
{
"name": "maxZoomLevel",
"required": false,
"type": "number",
"default": "none",
"description": "Max zoom level of map"
},
{
"name": "zoomEnabled",
"required": false,
"type": "bool",
"default": "none",
"description": "Enable/Disable zoom on the map"
},
{
"name": "scrollEnabled",
"required": false,
"type": "bool",
"default": "true",
"description": "Enable/Disable scroll on the map"
},
{
"name": "pitchEnabled",
"required": false,
"type": "bool",
"default": "true",
"description": "Enable/Disable pitch on map"
},
{
"name": "rotateEnabled",
"required": false,
"type": "bool",
"default": "true",
"description": "Enable/Disable rotation on map"
},
{
"name": "attributionEnabled",
"required": false,
"type": "bool",
"default": "true",
"description": "Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabledSettingShownInApp=YES\nto your Info.plist"
},
{
"name": "logoEnabled",
"required": false,
"type": "bool",
"default": "true",
"description": "Enable/Disable the logo on the map."
},
{
"name": "compassEnabled",
"required": false,
"type": "bool",
"default": "none",
"description": "Enable/Disable the compass from appearing on the map"
},
{
"name": "onPress",
"required": false,
"type": "func",
"default": "none",
"description": "Map press listener, gets called when a user presses the map"
},
{
"name": "onLongPress",
"required": false,
"type": "func",
"default": "none",
"description": "Map long press listener, gets called when a user long presses the map"
},
{
"name": "onRegionWillChange",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region is about to change."
},
{
"name": "onRegionIsChanging",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region is changing."
},
{
"name": "onRegionDidChange",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region finished changing"
},
{
"name": "onWillStartLoadingMap",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map is about to start loading a new map style."
},
{
"name": "onDidFinishLoadingMap",
"required": false,
"type": "func",
"default": "none",
"description": "This is triggered when the map has successfully loaded a new map style."
},
{
"name": "onDidFailLoadingMap",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map has failed to load a new map style."
},
{
"name": "onWillStartRenderingFrame",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map will start rendering a frame."
},
{
"name": "onDidFinishRenderingFrame",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map finished rendering a frame."
},
{
"name": "onDidFinishRenderingFrameFully",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map fully finished rendering a frame."
},
{
"name": "onWillStartRenderingMap",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map will start rendering the map."
},
{
"name": "onDidFinishRenderingMap",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map finished rendering the map."
},
{
"name": "onDidFinishRenderingMapFully",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when the map fully finished rendering the map."
},
{
"name": "onDidFinishLoadingStyle",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when a style has finished loading."
},
{
"name": "onFlyToComplete",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered when a fly to animation is cancelled or completed after calling flyTo"
},
{
"name": "onSetCameraComplete",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered once the camera is finished after calling setCamera"
}
],
"composes": [
"../utils"
],
"name": "MapView"
},
"PointAnnotation": {
"description": "PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.",
"methods": [],
"props": [
{
"name": "id",
"required": true,
"type": "string",
"default": "none",
"description": "A string that uniquely identifies the annotation"
},
{
"name": "title",
"required": false,
"type": "string",
"default": "none",
"description": "The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS."
},
{
"name": "snippet",
"required": false,
"type": "string",
"default": "none",
"description": "The string containing the annotation’s snippet(subtitle). Not displayed in the default callout."
},
{
"name": "selected",
"required": false,
"type": "bool",
"default": "none",
"description": "Manually selects/deselects annotation\n@type {[type]}"
},
{
"name": "coordinate",
"required": true,
"type": "arrayOf",
"default": "none",
"description": "The center point (specified as a map coordinate) of the annotation."
},
{
"name": "anchor",
"required": false,
"type": "shape",
"default": "{ x: 0.5, y: 0.5 }",
"description": "Specifies the anchor being set on a particular point of the annotation.\nThe anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],\nwhere (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.\nNote this is only for custom annotations not the default pin view.\nDefaults to the center of the view."
},
{
"name": "onSelected",
"required": false,
"type": "func",
"default": "none",
"description": "This callback is fired once this annotation is selected. Returns a Feature as the first param."
},
{
"name": "onDeselected",
"required": false,
"type": "func",
"default": "none",
"description": "This callback is fired once this annotation is deselected."
}
],
"composes": [
"../utils"
],
"name": "PointAnnotation"
},
"RasterLayer": {
"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",
"re