此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

GeolocationCoordinates:speed 属性

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月.

安全上下文: 此特性仅在一些支持的浏览器安全上下文(HTTPS)中可用。

GeolocationCoordinates 接口的 speed 只读属性是表示设备的速度的 double 类型值(单位为米每秒)。如果实现无法测量该值,则返回 null

表示设备的速度的 double 类型值(单位为米每秒)。

规范

Specification
Geolocation
# speed-attribute

浏览器兼容性

参见