import { UserLocation } from '@rnmapbox/maps';
UserLocation
'normal' | 'compass' | 'gps'
native/android only render mode
- normal: just a circle
- compass: triangle with heading
- gps: large arrow
@platform android
boolean
Whether location icon is animated between updates
defaults to: true
ReactElement | ReactElement[]
Custom location icon of type mapbox-gl-native components
number
Minimum amount of movement before GPS location is updated in meters
defaults to: 0
Set Displacement
func
Callback that is triggered on location icon press
signature:() => void
func
Callback that is triggered on location update
signature:(location:Location) => void
UserLocationRenderMode
@deprecated use LocationPuck component instead of UserLocationRenderMode.Native Which render mode to use.
defaults to: UserLocationRenderMode.Normal
User Location Render Mode
boolean
Request the always location permission, and listen to the location even when the app is in background
@platform ios
defaults to: false
boolean
Show or hide small arrow which indicates direction the device is pointing relative to north.
defaults to: false
boolean
Whether location icon is visible
defaults to: true
User Location Render Mode
Whether to start or stop listening to the locationManager
Notice, that listening will start automatically when
either onUpdate
or visible
are set
Name | Type | Required | Description |
---|---|---|---|
{ running }: { running?: boolean } |
{running?:boolean} |
Yes |
undefined |
If locationManager should be running
Name | Type | Required | Description |
---|