From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../positionoptions/enablehighaccuracy/index.html | 93 ++++++++++++++++++ files/zh-tw/web/api/positionoptions/index.html | 105 +++++++++++++++++++++ .../web/api/positionoptions/maximumage/index.html | 93 ++++++++++++++++++ .../web/api/positionoptions/timeout/index.html | 93 ++++++++++++++++++ 4 files changed, 384 insertions(+) create mode 100644 files/zh-tw/web/api/positionoptions/enablehighaccuracy/index.html create mode 100644 files/zh-tw/web/api/positionoptions/index.html create mode 100644 files/zh-tw/web/api/positionoptions/maximumage/index.html create mode 100644 files/zh-tw/web/api/positionoptions/timeout/index.html (limited to 'files/zh-tw/web/api/positionoptions') diff --git a/files/zh-tw/web/api/positionoptions/enablehighaccuracy/index.html b/files/zh-tw/web/api/positionoptions/enablehighaccuracy/index.html new file mode 100644 index 0000000000..8437f37fe6 --- /dev/null +++ b/files/zh-tw/web/api/positionoptions/enablehighaccuracy/index.html @@ -0,0 +1,93 @@ +--- +title: PositionOptions.enableHighAccuracy +slug: Web/API/PositionOptions/enableHighAccuracy +translation_of: Web/API/PositionOptions/enableHighAccuracy +--- +
{{APIRef("Geolocation API")}}
+ +

PositionOptions.enableHighAccuracy 是一個 {{domxref("Boolean")}} 的值。此值指出方法是否需要回傳最佳的結果。如果值為真且該裝置是具備提供精準位置的能力,則方法會回傳最佳結果。必須注意的是最佳結果會導致較長的回應時間或者需要更多的電力耗損 (舉例來說擁有GPS晶片的手機)。相反來說,如果值為偽,機器會因為回應時間較短以及消耗較少的電力達到資源節省。預設值:偽。

+ +

語法

+ +
positionOptions.enableHighAccuracy = booleanValue
+
+ +

規格

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#enablehighaccuracy', 'PositionOptions.enableHighAccuracy')}}{{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}}
+
+ +

請參考

+ + diff --git a/files/zh-tw/web/api/positionoptions/index.html b/files/zh-tw/web/api/positionoptions/index.html new file mode 100644 index 0000000000..fc27485e65 --- /dev/null +++ b/files/zh-tw/web/api/positionoptions/index.html @@ -0,0 +1,105 @@ +--- +title: PositionOptions +slug: Web/API/PositionOptions +translation_of: Web/API/PositionOptions +--- +
{{APIRef("Geolocation API")}}
+ +

PositionOptions 是一個當作 {{domxref("Geolocation.getCurrentPosition()")}} 以及 {{domxref("Geolocation.watchPosition()")}} 參數的物件,此物件含有幾種可以設定的屬性。

+ +

屬性

+ +

PositionOptions 介面沒有繼承任何屬性

+ +
+
{{domxref("PositionOptions.enableHighAccuracy")}}
+
是一個 {{domxref("Boolean")}} 的值。此值指出方法是否需要回傳最佳的結果。如果值為真且該裝置具備提供精準位置的能力,則方法會回傳最佳結果。必須注意的是最佳結果會導致較長的回應時間或者需要更多的電力耗損 (舉例來說擁有GPS晶片的手機)。相反來說,如果值為偽,機器會因為回應時間較短以及消耗較少的電力達到資源節省。預設值:偽。
+
{{domxref("PositionOptions.timeout")}}
+
這是一個正值,它代表機器能夠等待方法回傳位置的最長時間(單位是毫秒)。預設值是 Infinity,代表 getCurrentPosition() 此方法在沒有可用的位置前不會有任何回覆。
+
{{domxref("PositionOptions.maximumAge")}}
+
這是一個正值,它代表可以接受暫存位置的最長時限(單位是毫秒)。如果設定為 0,代表機器必須回傳實際的當前位置而不能使用暫存位置。如果設定為 Infinity,機器必定會回傳暫存位置而不考慮他的時限。預設值:0。
+
+ +

方法

+ +

PositionOptions 介面沒有實現也沒有繼承任何方法。

+ +

規格

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{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}}
+
+ +

請參考

+ + diff --git a/files/zh-tw/web/api/positionoptions/maximumage/index.html b/files/zh-tw/web/api/positionoptions/maximumage/index.html new file mode 100644 index 0000000000..2f9d1cf48e --- /dev/null +++ b/files/zh-tw/web/api/positionoptions/maximumage/index.html @@ -0,0 +1,93 @@ +--- +title: PositionOptions.maximumAge +slug: Web/API/PositionOptions/maximumAge +translation_of: Web/API/PositionOptions/maximumAge +--- +
{{APIRef("Geolocation API")}}
+ +

PositionOptions.maximumAge 是一個正值,它代表可以接受暫存位置的最長期限(單位是毫秒)。如果設定為 0,代表機器必須回傳實際的當前位置而不能使用暫存位置。如果設定為 Infinity, 機器必定會回傳暫存位置而不考慮他的期限。預設值:0。

+ +

語法

+ +
positionOptions.maximumAge = timeLength
+
+ +

規格

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#maximumage', 'PositionOptions.maximumAge')}}{{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}}
+
+ +

請參考

+ + diff --git a/files/zh-tw/web/api/positionoptions/timeout/index.html b/files/zh-tw/web/api/positionoptions/timeout/index.html new file mode 100644 index 0000000000..f963a28764 --- /dev/null +++ b/files/zh-tw/web/api/positionoptions/timeout/index.html @@ -0,0 +1,93 @@ +--- +title: PositionOptions.timeout +slug: Web/API/PositionOptions/timeout +translation_of: Web/API/PositionOptions/timeout +--- +
{{APIRef("Geolocation API")}}
+ +

是一個正值,它代表機器能夠等待方法回傳位置的最長時間(單位是毫秒)。預設值是Infinity,代表 getCurrentPosition() 此方法在沒有可用的位置前不會有任何回覆。

+ +

語法

+ +
positionOptions.timeout = timeLength
+
+ +

規格

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#timeout', 'PositionOptions.timeout')}}{{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}}
+
+ +

請參考

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