Navigator: geolocation プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
Navigator.geolocation
は読み取り専用のプロパティで、ウェブコンテンツが端末の位置情報にアクセスするための Geolocation
オブジェクトを返します。これにより、ウェブサイトやアプリがユーザーの現在の位置に応じた結果を提供できるようになります。
メモ: セキュリティ上の理由により、ウェブページが位置情報にアクセスしようとする時、ユーザーにアクセス許可が求められます。その方法やポリシーはブラウザーによって異なることに注意してください。
値
Geolocation
オブジェクトです。
仕様書
Specification |
---|
Geolocation # dom-navigator-geolocation |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
geolocation | ||||||||||||||
Secure context required |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.