安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

GeolocationPosition interface represents the position of the concerned device at a given time. The position, represented by a GeolocationCoordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed.

特性

GeolocationPosition interface doesn't inherit any properties .

GeolocationPosition.coords 只读 安全上下文
返回 GeolocationCoordinates object defining the current location.
GeolocationPosition.timestamp 只读 安全上下文
返回 DOMTimeStamp representing the time at which the location was retrieved.

方法

GeolocationPosition interface neither implements, nor inherits any methods.

规范

规范 状态 注释
地理位置 API
The definition of 'GeolocationPosition' in that specification.
推荐 最初的规范。

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
GeolocationPosition Chrome 79
79
不支持 5 — 78 Alternate Name
Alternate Name Uses the non-standard name: 位置
Edge 79
79
不支持 12 — 79 Alternate Name
Alternate Name Uses the non-standard name: 位置
Firefox 72
72
不支持 3.5 — 71 Alternate Name
Alternate Name Uses the non-standard name: 位置
IE 9 Alternate Name
9 Alternate Name
Alternate Name Uses the non-standard name: 位置
Opera 16 Alternate Name
16 Alternate Name
Alternate Name Uses the non-standard name: 位置
Safari 5 Alternate Name
5 Alternate Name
Alternate Name Uses the non-standard name: 位置
WebView Android 79
79
不支持 ? — 78 Alternate Name
Alternate Name Uses the non-standard name: 位置
Chrome Android 79
79
不支持 18 — 78 Alternate Name
Alternate Name Uses the non-standard name: 位置
Firefox Android 4 Alternate Name
4 Alternate Name
Alternate Name Uses the non-standard name: 位置
Opera Android 16 Alternate Name
16 Alternate Name
Alternate Name Uses the non-standard name: 位置
Safari iOS Yes Alternate Name
Yes Alternate Name
Alternate Name Uses the non-standard name: 位置
Samsung Internet Android 12.0
12.0
不支持 1.0 — 12.0 Alternate Name
Alternate Name Uses the non-standard name: 位置
coords Chrome 5 Edge 12 Firefox 3.5 IE 9 Opera 16 Safari 5 WebView Android Yes Chrome Android 18 Firefox Android 4 Opera Android 16 Safari iOS Yes Samsung Internet Android 1.0
Secure context required Chrome 47 Edge ≤18 Firefox 55 IE No Opera Yes Safari Yes WebView Android 47 Chrome Android 47 Firefox Android 55 Opera Android Yes Safari iOS Yes Samsung Internet Android 5.0
timestamp Chrome 5 Edge 12 Firefox 3.5 IE 9 Opera 16 Safari 5 WebView Android Yes Chrome Android 18 Firefox Android 4 Opera Android 16 Safari iOS Yes Samsung Internet Android 1.0

图例

完整支持

完整支持

不支持

不支持

使用非标名称。

另请参阅

元数据

  • 最后修改:
  1. 地理位置 API
  2. GeolocationPosition
  3. 特性
    1. coords
    2. timestamp
  4. Related pages for Geolocation API
    1. Geolocation
    2. GeolocationCoordinates
    3. GeolocationPositionError
    4. Navigator.geolocation

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1