From 485dca828dcd39fcfe2388117b0fffffa8f1010a Mon Sep 17 00:00:00 2001 From: Pavel Chuchuva Date: Sun, 30 Jun 2024 05:51:16 +1000 Subject: [PATCH] refactor!:use LocationPuck instead of deprecated NativeUserLocation (#3497) * refactor!:use LocationPuck instead of deprecated NativeUserLocation Follow-up for https://github.com/rnmapbox/maps/pull/3222 * refactor!:use LocationPuck instead of deprecated NativeUserLocation --- docs/UserLocation.md | 2 +- docs/docs.json | 2 +- src/components/UserLocation.tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/UserLocation.md b/docs/UserLocation.md index b9075fa79..a5f07085c 100644 --- a/docs/UserLocation.md +++ b/docs/UserLocation.md @@ -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` diff --git a/docs/docs.json b/docs/docs.json index 8336eee07..2d53c931f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -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", diff --git a/src/components/UserLocation.tsx b/src/components/UserLocation.tsx index f2ec77d69..d45fb5778 100644 --- a/src/components/UserLocation.tsx +++ b/src/components/UserLocation.tsx @@ -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)'; @@ -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; @@ -258,7 +258,7 @@ class UserLocation extends React.Component { androidRenderMode, iosShowsUserHeadingIndicator: showsUserHeadingIndicator, }; - return ; + return ; } render() {