blob: 50eceef351db2925f19f24bb9a72b571bc8ba378 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
---
title: GeolocationPositionError.code
slug: Web/API/GeolocationPositionError/code
tags:
- API
- Code
- 位置情報 API
- GeolocationPositionError
- プロパティ
- 安全なコンテキスト
browser-compat: api.GeolocationPositionError.code
translation_of: Web/API/GeolocationPositionError/code
---
{{securecontext_header}}{{APIRef("Geolocation API")}}
**`GeolocationPositionError.code`** は読み取り専用プロパティで、 `unsigned short` でエラーコードを表します。
以下の値になる可能性があります。
<table class="no-markdown">
<thead>
<tr>
<th scope="col">値</th>
<th scope="col">関連づけられた定数</th>
<th scope="col">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>1</code></td>
<td><code>PERMISSION_DENIED</code></td>
<td>
ページが許可を得ていないために、位置情報の取得に失敗しました。
</td>
</tr>
<tr>
<td><code>2</code></td>
<td><code>POSITION_UNAVAILABLE</code></td>
<td>
1 つまたは複数の位置の内部ソースが内部エラーを返したために、位置情報の取得に失敗しました。
</td>
</tr>
<tr>
<td><code>3</code></td>
<td><code>TIMEOUT</code></td>
<td>位置情報が制限時間内に取得できませんでした。</td>
</tr>
</tbody>
</table>
## 仕様書
{{Specifications}}
## ブラウザーの互換性
{{Compat}}
## 関連情報
- [位置情報の使用](/ja/docs/Web/API/Geolocation_API/Using_the_Geolocation_API)
- {{domxref("GeolocationPositionError")}}
|