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.
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)on: {
click: evt => console.log(evt),
drag: evt => console.log(evt)
};
Optional
optionsConfiguration for how geolocation appears and operates.
Optional
fitDetermines the map appearance as it pans / zooms to the user's location.
Optional
positionConfigure how the user's location is determined.
Optional
showDisplay a circle on the map indicating the user's location with 95% confidence.
Optional
showShow a dot on the map to indicate the user's location.
Optional
trackContinuously update the user's current location.
Components that implement this interface will allow the user to focus the map on their current location.
See
Mapbox GeoLocateControl