mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-31 04:51:15 +00:00
384 lines
12 KiB
JSON
384 lines
12 KiB
JSON
{
|
|
"MapView": {
|
|
"description": "MapView backed by Mapbox Native GL",
|
|
"methods": [
|
|
{
|
|
"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)\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)\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": "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": {
|
|
"animated": {
|
|
"type": {
|
|
"name": "bool"
|
|
},
|
|
"required": false,
|
|
"description": "Animates changes between pitch and bearing",
|
|
"defaultValue": {
|
|
"value": "false",
|
|
"computed": false
|
|
}
|
|
},
|
|
"centerCoordinate": {
|
|
"type": {
|
|
"name": "arrayOf",
|
|
"value": {
|
|
"name": "number"
|
|
}
|
|
},
|
|
"required": false,
|
|
"description": "Initial center coordinate on map [lng, lat]"
|
|
},
|
|
"showUserLocation": {
|
|
"type": {
|
|
"name": "bool"
|
|
},
|
|
"required": false,
|
|
"description": "Shows the users location on the map"
|
|
},
|
|
"userTrackingMode": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "The mode used to track the user location on the map",
|
|
"defaultValue": {
|
|
"value": "MapboxGL.UserTrackingModes.None",
|
|
"computed": true
|
|
}
|
|
},
|
|
"heading": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "Initial heading on map",
|
|
"defaultValue": {
|
|
"value": "0",
|
|
"computed": false
|
|
}
|
|
},
|
|
"pitch": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "Initial pitch on map",
|
|
"defaultValue": {
|
|
"value": "0",
|
|
"computed": false
|
|
}
|
|
},
|
|
"style": {
|
|
"type": {
|
|
"name": "any"
|
|
},
|
|
"required": false,
|
|
"description": "Style for wrapping React Native View"
|
|
},
|
|
"styleURL": {
|
|
"type": {
|
|
"name": "string"
|
|
},
|
|
"required": false,
|
|
"description": "Style URL for map",
|
|
"defaultValue": {
|
|
"value": "MapboxGL.StyleURL.Street",
|
|
"computed": true
|
|
}
|
|
},
|
|
"zoomLevel": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "Initial zoom level of map",
|
|
"defaultValue": {
|
|
"value": "16",
|
|
"computed": false
|
|
}
|
|
},
|
|
"minZoomLevel": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "Min zoom level of map"
|
|
},
|
|
"maxZoomLevel": {
|
|
"type": {
|
|
"name": "number"
|
|
},
|
|
"required": false,
|
|
"description": "Max zoom level of map"
|
|
},
|
|
"scrollEnabled": {
|
|
"type": {
|
|
"name": "bool"
|
|
},
|
|
"required": false,
|
|
"description": "Enable/Disable scroll on the map",
|
|
"defaultValue": {
|
|
"value": "true",
|
|
"computed": false
|
|
}
|
|
},
|
|
"pitchEnabled": {
|
|
"type": {
|
|
"name": "bool"
|
|
},
|
|
"required": false,
|
|
"description": "Enable/Disable pitch on map",
|
|
"defaultValue": {
|
|
"value": "true",
|
|
"computed": false
|
|
}
|
|
},
|
|
"onPress": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "Map press listener, gets called when a user presses the map"
|
|
},
|
|
"onLongPress": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "Map long press listener, gets called when a user long presses the map"
|
|
},
|
|
"onRegionWillChange": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered whenever the currently displayed map region is about to change."
|
|
},
|
|
"onRegionIsChanging": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered whenever the currently displayed map region is changing."
|
|
},
|
|
"onRegionDidChange": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered whenever the currently displayed map region finished changing"
|
|
},
|
|
"onWillStartLoadingMap": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map is about to start loading a new map style."
|
|
},
|
|
"onDidFinishLoadingMap": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This is triggered when the map has successfully loaded a new map style."
|
|
},
|
|
"onDidFailLoadingMap": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map has failed to load a new map style."
|
|
},
|
|
"onWillStartRenderingFrame": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map will start rendering a frame."
|
|
},
|
|
"onDidFinishRenderingFrame": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map finished rendering a frame."
|
|
},
|
|
"onDidFinishRenderingFrameFully": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map fully finished rendering a frame."
|
|
},
|
|
"onWillStartRenderingMap": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map will start rendering the map."
|
|
},
|
|
"onDidFinishRenderingMap": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map finished rendering the map."
|
|
},
|
|
"onDidFinishRenderingMapFully": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when the map fully finished rendering the map."
|
|
},
|
|
"onDidFinishLoadingStyle": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when a style has finished loading."
|
|
},
|
|
"onFlyToComplete": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered when a fly to animation is cancelled or completed after calling flyTo"
|
|
},
|
|
"onSetCameraComplete": {
|
|
"type": {
|
|
"name": "func"
|
|
},
|
|
"required": false,
|
|
"description": "This event is triggered once the camera is finished after calling setCamera"
|
|
}
|
|
}
|
|
}
|
|
} |