From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/geolocationposition/coords/index.html | 52 ++++++++++ files/zh-cn/web/api/geolocationposition/index.html | 108 +++++++++++++++++++++ .../index.html" | 49 ++++++++++ 3 files changed, 209 insertions(+) create mode 100644 files/zh-cn/web/api/geolocationposition/coords/index.html create mode 100644 files/zh-cn/web/api/geolocationposition/index.html create mode 100644 "files/zh-cn/web/api/geolocationposition/\350\216\267\345\217\226\350\257\245\344\275\215\347\275\256\346\227\266\347\232\204\346\227\266\351\227\264\346\210\263/index.html" (limited to 'files/zh-cn/web/api/geolocationposition') diff --git a/files/zh-cn/web/api/geolocationposition/coords/index.html b/files/zh-cn/web/api/geolocationposition/coords/index.html new file mode 100644 index 0000000000..a2629b1e7c --- /dev/null +++ b/files/zh-cn/web/api/geolocationposition/coords/index.html @@ -0,0 +1,52 @@ +--- +title: Position.coords +slug: Web/API/GeolocationPosition/coords +tags: + - API + - Geolocation API + - Position + - Property +translation_of: Web/API/GeolocationPosition/coords +--- +
{{APIRef("Geolocation API")}}
+ +

Position.coords 是一个{{domxref("Coordinates")}} 对象的只读属性 , 表示地理状态:它包括位置,地球上的经度和纬度,相关的海拔和速度,可以重新组合内部返回的这些值,它还包含有关这些值的准确信息。

+ +

语法

+ +
coord = position.coords
+
+ +

标准

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#coords', 'Position.coords')}}{{Spec2('Geolocation')}}Initial specification.
+ +

浏览器兼容性

+ +

 

+ +
+

{{Compat("api.Position.coords")}}

+
+ +

请参见

+ + diff --git a/files/zh-cn/web/api/geolocationposition/index.html b/files/zh-cn/web/api/geolocationposition/index.html new file mode 100644 index 0000000000..6cc0e57712 --- /dev/null +++ b/files/zh-cn/web/api/geolocationposition/index.html @@ -0,0 +1,108 @@ +--- +title: Position +slug: Web/API/GeolocationPosition +tags: + - API + - 位置 + - 地理位置API +translation_of: Web/API/GeolocationPosition +--- +
{{APIRef("Geolocation API")}}
+ +

Position  接口表示在给定的时间的相关设备的位置。这个位置,用一个{{domxref("Coordinates")}}对象表示,包括设备在地球上的二维位置, 但也可以包括设备的海拔和速度。      

+ +

属性

+ +

Position接口没有继承任何属性。

+ +
+
{{domxref("Position.coords")}} {{readonlyInline}}
+
返回一个定义了当前位置的{{domxref("Coordinates")}} 对象.
+
{{domxref("Position.timestamp")}} {{readonlyInline}}
+
返回一个时间戳{{domxref("DOMTimeStamp")}}, 这个时间戳表示获取到的位置的时间。
+
+ +

方法

+ +

Position 接口没有实现也没有继承任何方法。

+ +

标准

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#position', 'Position')}}{{Spec2('Geolocation')}}Initial specification.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
特性ChromeFirefox (Gecko)Internet ExplorerOperaSafari
基础支持5{{CompatGeckoDesktop("1.9.1")}}9 +

10.60
+ 15.0取消支持16.0重新支持

+
5
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
特性AndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
基础支持{{CompatUnknown()}}{{CompatUnknown()}}{{CompatGeckoMobile("4")}}{{CompatUnknown()}}10.60{{CompatUnknown()}}
+
+ +

参阅

+ + diff --git "a/files/zh-cn/web/api/geolocationposition/\350\216\267\345\217\226\350\257\245\344\275\215\347\275\256\346\227\266\347\232\204\346\227\266\351\227\264\346\210\263/index.html" "b/files/zh-cn/web/api/geolocationposition/\350\216\267\345\217\226\350\257\245\344\275\215\347\275\256\346\227\266\347\232\204\346\227\266\351\227\264\346\210\263/index.html" new file mode 100644 index 0000000000..e4c731f868 --- /dev/null +++ "b/files/zh-cn/web/api/geolocationposition/\350\216\267\345\217\226\350\257\245\344\275\215\347\275\256\346\227\266\347\232\204\346\227\266\351\227\264\346\210\263/index.html" @@ -0,0 +1,49 @@ +--- +title: GeolocationPosition.timestamp +slug: Web/API/GeolocationPosition/获取该位置时的时间戳 +translation_of: Web/API/GeolocationPosition/timestamp +--- +
{{securecontext_header}}{{APIRef("Geolocation API")}}
+ +

The GeolocationPosition.timestamp read-only property returns a {{domxref("DOMTimeStamp")}} object, represents the date and the time of the creation of the {{domxref("GeolocationPosition")}} object it belongs to. The precision is to the millisecond.

+ +

Syntax

+ +
var timestamp = geolocationPositionInstance.timestamp
+
+ +

Value

+ +

A {{domxref("DOMTimeStamp")}} object instance.

+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#dom-geolocationposition-timestamp', 'GeolocationPosition.timestamp')}}{{Spec2('Geolocation')}}Initial definition
+ +

Browser compatibility

+ + + +

{{Compat("api.GeolocationPosition.timestamp")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf