You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @returns {[Object, () => void]} A tuple containing:
140
+
* - obj `Object` - An object containing:
141
+
* : label `string` - The label of the input.
142
+
* : value `string` - The value of the input.
137
143
* - onChange `() =>void` - A function to update the value.
138
144
*/
139
145
```
@@ -147,9 +153,9 @@ JSDoc comments must include `@description` and `@example`, and if there are para
147
153
description="A tuple containing:"
148
154
:nested="[
149
155
{
150
-
name: 'value',
151
-
type: 'string',
152
-
description: 'The value of the input.',
156
+
name: 'obj',
157
+
type: 'Object',
158
+
description: 'The value of the input. <br /> : label <code>string</code> - The label of the input. <br /> : value <code>string</code> - The value of the input.',
`useGeolocation`는 사용자의 지리적 위치를 검색하고 추적하는 리액트 훅이에요. 브라우저의 `Geolocation API`를 사용하여 단회 위치 검색과 지속적인 위치 추적을 모두 지원해요.
4
+
5
+
## Interface
6
+
7
+
```ts
8
+
function useGeolocation(options:GeolocationOptions):Object;
9
+
```
10
+
11
+
### 파라미터
12
+
13
+
<Interface
14
+
name="options"
15
+
type="GeolocationOptions"
16
+
description="지리적 위치 옵션 설정이에요"
17
+
:nested="[
18
+
{
19
+
name: 'options.mountBehavior',
20
+
type: 'GeolocationMountBehaviorType',
21
+
required: false,
22
+
description:
23
+
'훅이 마운트 시 어떻게 동작하는지: <br />- 제공되지 않으면 자동으로 위치를 가져오지 않아요 <br />- \u0027get\u0027: 컴포넌트가 마운트될 때 위치를 자동으로 한 번 가져와요 <br />- \u0027watch\u0027: 컴포넌트가 마운트될 때 위치 변경 추적을 자동으로 시작해요',
24
+
},
25
+
{
26
+
name: 'options.enableHighAccuracy',
27
+
type: 'boolean',
28
+
required: false,
29
+
defaultValue: 'false',
30
+
description:
31
+
'만약 참이라면, 더 정확한 위치 정보를 제공해요 (배터리 소비 증가)',
32
+
},
33
+
{
34
+
name: 'options.maximumAge',
35
+
type: 'number',
36
+
required: false,
37
+
defaultValue: '0',
38
+
description:
39
+
'반환이 허용되는 캐시된 위치의 최대 나이(밀리초)예요',
40
+
},
41
+
{
42
+
name: 'options.timeout',
43
+
type: 'number',
44
+
required: false,
45
+
defaultValue: 'Infinity',
46
+
description:
47
+
'위치를 요청할 때 허용되는 최대 시간(밀리초)예요',
48
+
},
49
+
]"
50
+
/>
51
+
52
+
### 반환 값
53
+
54
+
<Interface
55
+
name=""
56
+
type="Object"
57
+
description="위치 데이터와 관련된 함수들을 포함하고 있어요"
58
+
:nested="[
59
+
{
60
+
name: 'loading',
61
+
type: 'boolean',
62
+
required: false,
63
+
description: '현재 위치 데이터를 가져오는 중인지 여부를 나타내요.',
64
+
},
65
+
{
66
+
name: 'error',
67
+
type: 'CustomGeoLocationError|null',
68
+
required: false,
69
+
description:
70
+
'오류가 발생했을 때의 오류 객체이거나 null이에요. 이 훅은 표준 Geolocation API 오류 코드(<code>1-3</code>)와 사용자 정의 코드(<code>0</code>)를 사용해요 <br /> : <code>0</code> - 이 환경에서는 지리적 위치가 지원되지 않아요 <br /> : <code>1</code> - 사용자가 지리적 위치 접근 허용을 거부했어요 <br /> : <code>2</code> - 위치를 사용할 수 없어요 <br /> : <code>3</code> - 시간 초과 - 지리적 위치 요청이 너무 오래 걸렸어요.',
71
+
},
72
+
{
73
+
name: 'data',
74
+
type: 'GeolocationData|null',
75
+
required: false,
76
+
description:
77
+
'위치 데이터 객체 또는 null이에요 <br /> : 위도 <code>number</code> - 십진수로 표현된 위도예요 <br /> : 경도 <code>number</code> - 십진수로 표현된 경도예요 <br /> : 정확도 <code>number</code> - 위치의 정확도(미터)예요 <br /> : 고도 <code>number|null</code> - WGS84 타원체 기준의 고도(미터)예요 <br /> : 고도 정확도 <code>number|null</code> - 고도의 정확도(미터)예요 <br /> : 방위 <code>number|null</code> - 진북에서 시계방향으로의 방위(도)예요 <br /> : 속도 <code>number|null</code> - 속도(미터/초)예요 <br /> : 타임스탬프 <code>number</code> - 위치가 검색된 시간이에요.',
0 commit comments