GeolocationPosition
Baseline 广泛可用 *
GeolocationPosition 接口代表了设备在某个给定时间的地理位置。该位置由一个 GeolocationCoordinates 对象表示,它包含设备在代表地球的球体上的二维位置,以及它的海拔高度和速度。
实例属性
GeolocationPosition 接口没有继承任何属性。
GeolocationPosition.coords只读-
返回一个定义当前位置的
GeolocationCoordinates对象。 GeolocationPosition.timestamp只读-
返回一个时间戳,以毫秒为单位的 Unix 时间表示,代表获取位置的时间。
实例方法
GeolocationPosition 接口没有继承任何方法。
GeolocationPosition.toJSON()-
返回
GeolocationPosition对象的 JSON 表示,并支持使用JSON.stringify()进行序列化。
规范
| 规范 |
|---|
| Geolocation # position_interface |
浏览器兼容性
加载中…