| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| androidRenderMode | 'normal' | 'compass' | 'gps' |
none |
false |
native/android only render mode - normal: just a circle - compass: triangle with heading - gps: large arrow @platform android |
| animated | boolean |
true |
false |
Whether location icon is animated between updates |
| children | ReactElement | ReactElement[] |
none |
false |
Custom location icon of type mapbox-gl-native components |
| minDisplacement | number |
0 |
false |
Minimum amount of movement before GPS location is updated in meters |
| onPress | func |
none |
false |
Callback that is triggered on location icon press signature: () => void |
| onUpdate | func |
none |
false |
Callback that is triggered on location update signature: (location:Location) => void |
| renderMode | UserLocationRenderMode |
UserLocationRenderMode.Normal |
false |
Which render mode to use. |
| requestsAlwaysUse | boolean |
false |
false |
Request the always location permission, and listen to the location even when the app is in background @platform ios |
| showsUserHeadingIndicator | boolean |
false |
false |
Show or hide small arrow which indicates direction the device is pointing relative to north. |
| visible | boolean |
true |
false |
Whether location icon is visible |
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 |
|---|