Coordinates - Web API 接口参考 编辑

Coordinates (坐标)接口表示设备在地球上的位置和海拔,以及计算这些属性的精确度。

属性

The Coordinates interface doesn't inherit any property.

Coordinates.latitude 只读
Returns a double representing the position's latitude in decimal degrees.
Coordinates.longitude 只读
Returns a double representing the position's longitude in decimal degrees.
Coordinates.altitude 只读
Returns a double representing the position's altitude in metres, relative to sea level. This value can be null if the implementation cannot provide the data.
Coordinates.accuracy 只读
Returns a double representing the accuracy of the latitude and longitude properties, expressed in meters.
Coordinates.altitudeAccuracy 只读
Returns a double representing the accuracy of the altitude expressed in meters. This value can be null.
Coordinates.heading 只读
Returns a double representing the direction in which the device is traveling. This value, specified in degrees, indicates how far off from heading due north the device is. 0 degrees represents true true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). If speed is 0, heading is NaN. If the device is unable to provide heading information, this value is null.
Coordinates.speed 只读
Returns a double representing the velocity of the device in meters per second. This value can be null.

方法

The Coordinates interface neither implements, nor inherits any method.

规范

SpecificationStatusComment
Geolocation API
Coordinates
RecommendationInitial specification.

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support53.5 (1.9.1)910.60
Removed in 15.0
Reintroduced in 16.0
5
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support??4.0 (4)?10.60?

请参见

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:120 次

字数:5644

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文