React
Mapbox
The props available for MapWeave when used with the Mapbox adapter.
Parameters
object
children
optionalReactNodeDefines the MapWeave layers to be rendered. The layers available are:
Fires when the user clicks or taps on the map.
Parameters
Returns any
Fires when the drag is finished and pointer is released, or when the drag is canceled.
Parameters
Returns any
Fires continuously as the cursor moves during a drag.
Parameters
Returns any
Fires when a drag is started. Default action: Creates a dragger.
Parameters
Returns any
Fires when the user hovers over the map.
Parameters
Returns any
Fires when the initial loading completes in MapWeave.
Returns any
Fires continuously when the MapWeave view changes, e.g. during zooming or panning.
Parameters
Returns any
options
optionalThe MapWeave options to set.
ref
optionalRefObject<MapWeaveRef>Returns ReactNode
accessToken
optionalstringThe Mapbox access token. See the Mapbox Access Tokens docs for more information.
fitOnFirstLoad
optionalbooleandefault: trueFits the map to the bounds of all visible layers when MapWeave first loads and the view prop is not set.
maxZoom
optionalnumberdefault: 20Sets the maximum zoom level, which controls how far the map can zoom in.
pickingRadius
optionalnumberdefault: 0The radius of a circle around the pointer used to detect interactions in pixels.
style
optionalstringdefault: 'mapbox://styles/mapbox/dark-v11'The Mapbox style URL. See the Mapbox Styles API for more information.
viewRotation
optionalbooleandefault: falseEnables view rotation if set to true.
Fits the map to the bounds of all visible layers or to the options specified.
Parameters
Returns Promise<void>
Animates a transition to a defined point on the map. Retains the current values for any options not specified.
Parameters
Returns Promise<void>