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 GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
geolocation
Secure context required

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

関連情報