From a101c2f3857be9d799b0ee5b2c7d04b61f9e2f18 Mon Sep 17 00:00:00 2001 From: MDN Date: Mon, 11 Oct 2021 00:51:25 +0000 Subject: [CRON] sync translated content --- files/zh-cn/web/api/positionoptions/index.html | 112 ------------------------- 1 file changed, 112 deletions(-) delete mode 100644 files/zh-cn/web/api/positionoptions/index.html (limited to 'files/zh-cn/web/api/positionoptions/index.html') diff --git a/files/zh-cn/web/api/positionoptions/index.html b/files/zh-cn/web/api/positionoptions/index.html deleted file mode 100644 index 43932e7322..0000000000 --- a/files/zh-cn/web/api/positionoptions/index.html +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: PositionOptions -slug: Web/API/PositionOptions -tags: - - API - - Geolocation API - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/PositionOptions ---- -
{{APIRef("Geolocation API")}}
- -

PositionOptions 是一个作为 Geolocation.getCurrentPosition()方法 以及 Geolocation.watchPosition() 方法参数的选项,此选项含有3种可以设置的属性。

- -

属性

- -

PositionOptions 接口不继承任何属性。

- -
-
{{domxref("PositionOptions.enableHighAccuracy")}}
-
是一个 {{domxref("Boolean")}} 值。这个布尔值用来表明应用是否使用其最高精度来表示结果。如果值为 true ,同时设备能够提供一个更精确的位置,那么设备就会使用这个位置。注意,这会导致较慢的响应时间或者增加电量消耗(比如对于支持gps的移动设备来说)。如果值为false ,设备会通过更快响应以及/或者使用更少的电量等方法来尽可能的节约资源。默认值: false
-
{{domxref("PositionOptions.timeout")}}
-
的值是一个正的 long 值。它表明的是设备必须在多长时间(单位毫秒)内返回一个位置。默认值是 Infinity,意思是获取到一个位置之后, getCurrentPosition() 才会返回一个值。
-
{{domxref("PositionOptions.maximumAge")}}
-
是一个正的 long 值。它表明可以返回多长时间(即最长年龄,单位毫秒)内的可获取的缓存位置。如果设置为 0, 说明设备不能使用一个缓存位置,而且必须去获取一个真实的当前位置。如果设置为 Infinity ,那么不管设置的最长年龄是多少,设备都必须返回一个缓存位置。默认值:0。
-
- -

方法

- -

PositionOptions 接口既不实现,也不继承任何方法。

- -

规范

- - - - - - - - - - - - - - - - -
规范状态Commet
{{SpecName('Geolocation', '#positionoptions', 'PositionOptions')}}{{Spec2('Geolocation')}}Initial definition
- -

浏览器兼容性

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support5{{CompatGeckoDesktop("1.9.1")}}910.60
- {{CompatNo}} 15.0
- 16.0
5
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("4")}}{{CompatUnknown}}10.60{{CompatUnknown}}
-
- -

See also

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