Optional
objInvoked to pass the Mapbox control to the function provider, typically the parent React component.
An instance of the type of the Mapbox control that backs the React component.
Optional
onA collection of handlers for events with names defined by the EventTypes
generic.
on: {
click: evt => console.log(evt),
drag: evt => console.log(evt)
};
Optional
error?: ((evt) => void) | ((evt) => any)Optional
geolocate?: ((evt) => void) | ((evt) => any)Optional
outofmaxbounds?: ((evt) => void) | ((evt) => any)Optional
trackuserlocationend?: ((evt) => void) | ((evt) => any)Optional
trackuserlocationstart?: ((evt) => void) | ((evt) => any)Optional
optionsOptional
fitDetermines the map appearance as it pans / zooms to the user's location.
Optional
positionOptional
showDisplay a circle on the map indicating the user's location with 95% confidence.
Optional
showOptional
trackGenerated using TypeDoc
Components that implement this interface will allow the user to focus the map on their current location.
See
Mapbox GeoLocateControl