安全なコンテキスト用
この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
GeolocationCoordinates (座標) インターフェイスは地球上におけるデバイスの位置と高度、およびそれぞれの測位精度を表します。
プロパティ
GeolocationCoordinates
インターフェイスが継承するプロパティはありません。
GeolocationCoordinates.latitude
読取専用 安全なコンテキスト用- このオブジェクトが示す緯度を十進度で表す、
double
型の値を返します。 GeolocationCoordinates.longitude
読取専用 安全なコンテキスト用- このオブジェクトが示す経度を十進度で表す、
double
型の値で返します。 GeolocationCoordinates.altitude
読取専用 安全なコンテキスト用- このオブジェクトが示す高度 (海面からの距離) をメートル単位で表す、
double
型の値を返します。この情報を取得できない場合はnull
が返ります。 GeolocationCoordinates.accuracy
読取専用 安全なコンテキスト用latitude
およびlongitude
プロパティの精度をメートル単位で表す、double
型の値を返します。GeolocationCoordinates.altitudeAccuracy
読取専用 安全なコンテキスト用altitude
プロパティの精度をメートル単位で表す、double
型の値を返します。このプロパティはnull
になることがあります。GeolocationCoordinates.heading
読取専用 安全なコンテキスト用- デバイスの移動方向を真北から何度離れているかで表す、
double
型の値を返します。真北を指す0
度から時計回りに、東が90
度、西は270
度となります。speed
プロパティの値が0
の時、heading
は常にNaN
になります。もしheading
の情報を取得できない場合はnull
が返ります。 GeolocationCoordinates.speed
読取専用 安全なコンテキスト用- デバイスの移動速度をメートル毎秒で表す、
double
型の値を返します。このプロパティはnull
になることがあります。
メソッド
GeolocationCoordinates
インターフェイスが実装・継承するメソッドはありません。
仕様
仕様書 | 策定状況 | コメント |
---|---|---|
Geolocation API GeolocationCoordinates の定義 |
勧告 | 初期定義 |
ブラウザー実装状況
BCD tables only load in the browser
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.
関連情報
- Geolocation API の利用
Geolocation
インターフェイス