Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年7月.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
GeolocationPositionError インターフェイスは位置情報の取得時に発生したエラーの理由を表します。
GeolocationPositionError インターフェイスが継承するプロパティはありません。
GeolocationPositionError.code 読取専用unsigned short でエラーコードを表します。以下の値になる可能性があります。
| 1 | PERMISSION_DENIED | ページに必要な権限がないため、位置情報の取得に失敗しました。例えば、権限ポリシーによってブロックされたなどです。 |
| 2 | POSITION_UNAVAILABLE | 1 つ以上の位置の内部ソースが内部エラーを返したために、位置情報の取得に失敗しました。 |
| 3 | TIMEOUT | 位置情報を取得するための制限時間が情報を取得する前に終了しました。 |
エラーの詳細を説明する、人間が読める文字列返します。仕様書の注では、主にデバッグ用途を想定しており、ユーザーインターフェイスに直接表示するものではないとしています。
GeolocationPositionError インターフェイスが実装・継承しているメソッドはありません。
| Geolocation # position_error_interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年12月17日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.