GeolocationPosition.coords
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
GeolocationPosition.coords は読み取り専用のプロパティで、地理的な位置を表す GeolocationCoordinates オブジェクトを返します。このオブジェクトには、地球上の位置(経度、緯度)、高度、速度が含まれ、グループ化して返されます。また、これらの値に関する精度情報も含まれます。
構文
js
let coord = geolocationPositionInstance.coords
値
GeolocationCoordinates のオブジェクトインスタンスです。
仕様書
| Specification |
|---|
| Geolocation API # coords-attribute |
ブラウザーの互換性
BCD tables only load in the browser