blob: a2629b1e7c28ac637a8ed8ecb719bb40080f441f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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>
|