aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/geolocationposition
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/geolocationposition
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/geolocationposition')
-rw-r--r--files/zh-cn/web/api/geolocationposition/coords/index.html52
-rw-r--r--files/zh-cn/web/api/geolocationposition/index.html108
-rw-r--r--files/zh-cn/web/api/geolocationposition/获取该位置时的时间戳/index.html49
3 files changed, 209 insertions, 0 deletions
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
+---
+<div>{{APIRef("Geolocation API")}}</div>
+
+<p><code><strong>Position.coords</strong></code> 是一个{{domxref("Coordinates")}} 对象的只读属性 , 表示地理状态:它包括位置,地球上的经度和纬度,相关的海拔和速度,可以重新组合内部返回的这些值,它还包含有关这些值的准确信息。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><em>coord</em> = <code><em>position</em><code>.coords</code></code>
+</pre>
+
+<h2 id="标准">标准</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Geolocation', '#coords', 'Position.coords')}}</td>
+ <td>{{Spec2('Geolocation')}}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p> </p>
+
+<div id="compat-mobile">
+<p>{{Compat("api.Position.coords")}}</p>
+</div>
+
+<h2 id="请参见">请参见</h2>
+
+<ul>
+ <li><a href="/en-US/docs/WebAPI/Using_geolocation" title="/en-US/docs/WebAPI/Using_geolocation">Using geolocation</a></li>
+ <li>The {{domxref("Position")}} interface it belongs to.</li>
+</ul>
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
+---
+<div>{{APIRef("Geolocation API")}}</div>
+
+<p><strong><code>Position</code></strong>  接口表示在给定的时间的相关设备的位置。这个位置,用一个{{domxref("Coordinates")}}对象表示,包括设备在地球上的二维位置, 但也可以包括设备的海拔和速度。      </p>
+
+<h2 id="属性">属性</h2>
+
+<p><em><code>Position</code>接口没有继承任何属性。</em></p>
+
+<dl>
+ <dt>{{domxref("Position.coords")}} {{readonlyInline}}</dt>
+ <dd>返回一个定义了当前位置的{{domxref("Coordinates")}} 对象.</dd>
+ <dt>{{domxref("Position.timestamp")}} {{readonlyInline}}</dt>
+ <dd>返回一个时间戳{{domxref("DOMTimeStamp")}}, 这个时间戳表示获取到的位置的时间。</dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<p><em><em><code>Position</code> 接口没有实现也没有<em>继承任何方法。</em></em></em></p>
+
+<h2 id="标准">标准</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Geolocation', '#position', 'Position')}}</td>
+ <td>{{Spec2('Geolocation')}}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>特性</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>基础支持</td>
+ <td>5</td>
+ <td>{{CompatGeckoDesktop("1.9.1")}}</td>
+ <td>9</td>
+ <td>
+ <p>10.60<br>
+ 15.0取消支持16.0重新支持</p>
+ </td>
+ <td>5</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>特性</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基础支持</td>
+ <td>{{CompatUnknown()}}</td>
+ <td>{{CompatUnknown()}}</td>
+ <td>{{CompatGeckoMobile("4")}}</td>
+ <td>{{CompatUnknown()}}</td>
+ <td>10.60</td>
+ <td>{{CompatUnknown()}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="参阅">参阅</h2>
+
+<ul>
+ <li><a href="/zh-CN/docs/Web/API/Geolocation/Using_geolocation" title="/en-US/docs/WebAPI/Using_geolocation">使用地理位置定位</a></li>
+ <li>使用它的{{domxref("Geolocation")}}接口。</li>
+</ul>
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..e4c731f868
--- /dev/null
+++ b/files/zh-cn/web/api/geolocationposition/获取该位置时的时间戳/index.html
@@ -0,0 +1,49 @@
+---
+title: GeolocationPosition.timestamp
+slug: Web/API/GeolocationPosition/获取该位置时的时间戳
+translation_of: Web/API/GeolocationPosition/timestamp
+---
+<div>{{securecontext_header}}{{APIRef("Geolocation API")}}</div>
+
+<p>The <code><strong>GeolocationPosition.timestamp</strong></code> 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.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="notranslate">var timestamp = geolocationPositionInstance.timestamp
+</pre>
+
+<h3 id="Value">Value</h3>
+
+<p>A {{domxref("DOMTimeStamp")}} object instance.</p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Geolocation', '#dom-geolocationposition-timestamp', 'GeolocationPosition.timestamp')}}</td>
+ <td>{{Spec2('Geolocation')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.GeolocationPosition.timestamp")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/API/Geolocation_API/Using">Using the Geolocation API</a></li>
+ <li>{{domxref("GeolocationPosition")}}</li>
+</ul>