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/geolocationpositionerror/index.html | 135 +++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 files/zh-cn/web/api/geolocationpositionerror/index.html (limited to 'files/zh-cn/web/api/geolocationpositionerror/index.html') diff --git a/files/zh-cn/web/api/geolocationpositionerror/index.html b/files/zh-cn/web/api/geolocationpositionerror/index.html new file mode 100644 index 0000000000..ce69f4eb77 --- /dev/null +++ b/files/zh-cn/web/api/geolocationpositionerror/index.html @@ -0,0 +1,135 @@ +--- +title: PositionError +slug: Web/API/GeolocationPositionError +tags: + - API + - Geolocation API +translation_of: Web/API/GeolocationPositionError +--- +

{{APIRef("Geolocation API")}}

+ +

PositionError 接口表示当定位设备位置时发生错误的原因。

+ +

属性

+ +

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

+ +
+
{{domxref("PositionError.code")}} {{readonlyInline}}
+
返回无符号的、简短的错误码。下列值是可能的: + + + + + + + + + + + + + + + + + + + + + + + +
相关联的常量描述
1PERMISSION_DENIED地理位置信息的获取失败,因为该页面没有获取地理位置信息的权限。
2POSITION_UNAVAILABLE +

地理位置获取失败,因为至少有一个内部位置源返回一个内部错误。

+
3TIMEOUT +

获取地理位置超时,通过定义{{domxref("PositionOptions.timeout")}} 来设置获取地理位置的超时时长。

+
+
+
{{domxref("PositionError.message")}} {{readonlyInline}}
+
返回一个开发者可以理解的 {{domxref("DOMString")}} 来描述错误的详细信息。
+
+ +

方法

+ +

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

+ +

标准

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#positionerror', 'PositionError')}}{{Spec2('Geolocation')}}Initial specification.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support5{{CompatGeckoDesktop("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{{CompatUnknown()}}{{CompatUnknown()}}{{CompatGeckoMobile("4")}}{{CompatUnknown()}}10.60{{CompatUnknown()}}
+
+ +

请参见

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