此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in English Always switch to English

GeolocationPosition:coords 屬性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年7月.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

GeolocationPosition 介面的 coords 唯讀屬性會回傳一個代表地理位置的 GeolocationCoordinates 物件。該物件包含了位置(即地球上的經度與緯度)、高度以及相關物件的速度,並重新分組於回傳值之中。它也包含了關於這些數值的準確度訊息。