Skip to content

Commit

Permalink
refactor!:use LocationPuck instead of deprecated NativeUserLocation (#…
Browse files Browse the repository at this point in the history
…3497)

* refactor!:use LocationPuck instead of deprecated NativeUserLocation

Follow-up for #3222

* refactor!:use LocationPuck instead of deprecated NativeUserLocation
  • Loading branch information
chuchuva authored Jun 29, 2024
1 parent dbe96aa commit 485dca8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/UserLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Callback that is triggered on location update
```tsx
UserLocationRenderMode
```
@deprecated use NativeUserLocation component instead of UserLocationRenderMode.Native
@deprecated use LocationPuck component instead of UserLocationRenderMode.Native
Which render mode to use.

_defaults to:_ `UserLocationRenderMode.Normal`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7603,7 +7603,7 @@
"required": false,
"type": "UserLocationRenderMode",
"default": "UserLocationRenderMode.Normal",
"description": "@deprecated use NativeUserLocation component instead of UserLocationRenderMode.Native\nWhich render mode to use."
"description": "@deprecated use LocationPuck component instead of UserLocationRenderMode.Native\nWhich render mode to use."
},
{
"name": "requestsAlwaysUse",
Expand Down
6 changes: 3 additions & 3 deletions src/components/UserLocation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CircleLayerStyle } from '../Mapbox';
import Annotation from './Annotation';
import CircleLayer from './CircleLayer';
import HeadingIndicator from './HeadingIndicator';
import NativeUserLocation from './LocationPuck';
import LocationPuck from './LocationPuck';

const mapboxBlue = 'rgba(51, 181, 229, 100)';

Expand Down Expand Up @@ -100,7 +100,7 @@ type Props = {
onUpdate?: (location: Location) => void;

/**
* @deprecated use NativeUserLocation component instead of UserLocationRenderMode.Native
* @deprecated use LocationPuck component instead of UserLocationRenderMode.Native
* Which render mode to use.
*/
renderMode?: UserLocationRenderMode;
Expand Down Expand Up @@ -258,7 +258,7 @@ class UserLocation extends React.Component<Props, UserLocationState> {
androidRenderMode,
iosShowsUserHeadingIndicator: showsUserHeadingIndicator,
};
return <NativeUserLocation {...props} />;
return <LocationPuck {...props} />;
}

render() {
Expand Down

0 comments on commit 485dca8

Please sign in to comment.