From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- .../web/api/geolocationcoordinates/index.html | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 files/zh-tw/web/api/geolocationcoordinates/index.html (limited to 'files/zh-tw/web/api/geolocationcoordinates/index.html') diff --git a/files/zh-tw/web/api/geolocationcoordinates/index.html b/files/zh-tw/web/api/geolocationcoordinates/index.html new file mode 100644 index 0000000000..08be554dff --- /dev/null +++ b/files/zh-tw/web/api/geolocationcoordinates/index.html @@ -0,0 +1,113 @@ +--- +title: Coordinates +slug: Web/API/GeolocationCoordinates +translation_of: Web/API/GeolocationCoordinates +--- +
{{APIRef("Geolocation API")}}
+ +

Coordinates 這個介面用來存取裝置的經緯度,速度以及這些數值的準確度。

+ +

屬性

+ +

Coordinates 這個介面沒有繼承任何屬性

+ +
+
{{domxref("Coordinates.latitude")}} {{readonlyInline}}
+
回傳一個十進位的 double 代表緯度。
+
{{domxref("Coordinates.longitude")}} {{readonlyInline}}
+
回傳一個十進位的 double 代表經度。
+
{{domxref("Coordinates.altitude")}} {{readonlyInline}}
+
回傳一個 double 代表距離海平面的高度,單位為公尺。如果無法提供這個值則回傳 null。
+
{{domxref("Coordinates.accuracy")}} {{readonlyInline}}
+
回傳一個 double 代表經緯度的精準值,單位為公尺。
+
{{domxref("Coordinates.altitudeAccuracy")}} {{readonlyInline}}
+
回傳一個 double 代表高度的精準度,單位為公尺。如果無法提供這個值則回傳 null。
+
{{domxref("Coordinates.heading")}} {{readonlyInline}}
+
回傳一個 double 代表裝置前進的方向,這個數值代表你偏離北方多少度,0度代表你向著正北方,照著順時針的方向遞增(90度代表正東方,270度代表正西方) 。如果速度值為0度,則此值為 NaN。如果無法提供這個值則回傳 null。
+
{{domxref("Coordinates.speed")}} {{readonlyInline}}
+
回傳一個 double 代表速度,單位為公尺/秒。如果無法提供這個值則回傳 null。
+
+ +

方法

+ +

Coordinates 這個介面,沒有實作也沒有繼承自任何的方法。

+ +

規格

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Geolocation', '#coordinates', 'Coordinates')}}{{Spec2('Geolocation')}}Initial specification.
+ +

瀏覽器的相容性

+ +

{{ 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