安全上下文
此特征只可用于
安全上下文
(HTTPS),在某些或所有
支持浏览器
.
GeolocationCoordinates
interface represents the position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated.
GeolocationCoordinates
interface
doesn't inherit any properties
.
GeolocationCoordinates.latitude
只读
安全上下文
double
representing the position's latitude in decimal degrees.
GeolocationCoordinates.longitude
只读
安全上下文
double
representing the position's longitude in decimal degrees.
GeolocationCoordinates.altitude
只读
安全上下文
double
representing the position's altitude in meters, relative to sea level. This value can be
null
if the implementation cannot provide the data.
GeolocationCoordinates.accuracy
只读
安全上下文
double
representing the accuracy of the
latitude
and
longitude
properties, expressed in meters.
GeolocationCoordinates.altitudeAccuracy
只读
安全上下文
double
representing the accuracy of the
altitude
expressed in meters. This value can be
null
.
GeolocationCoordinates.heading
只读
安全上下文
double
representing the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is.
0
degrees represents true north, and the direction is determined clockwise (which means that east is
90
degrees and west is
270
degrees). If
speed
is
0
,
heading
is
NaN
. If the device is unable to provide
heading
information, this value is
null
.
GeolocationCoordinates.speed
只读
安全上下文
double
representing the velocity of the device in meters per second. This value can be
null
.
GeolocationCoordinates
interface
neither implements, nor inherits any method.
| 规范 | 状态 | 注释 |
|---|---|---|
|
地理位置 API
The definition of 'GeolocationCoordinates' in that specification. |
推荐 | 最初的规范。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
GeolocationCoordinates
|
Chrome
79
|
Edge
79
|
Firefox
72
|
IE
9
Alternate Name
|
Opera
16
Alternate Name
|
Safari
5
Alternate Name
|
WebView Android
79
|
Chrome Android
79
|
Firefox Android
4
Alternate Name
|
Opera Android
16
|
Safari iOS
4.2
Alternate Name
|
Samsung Internet Android
1.0
Alternate Name
|
accuracy
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
altitude
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
altitudeAccuracy
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
heading
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
latitude
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
longitude
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
| Secure context required | Chrome 47 | Edge ≤79 | Firefox 55 | IE No | Opera Yes | Safari Yes | WebView Android No | Chrome Android 47 | Firefox Android 55 | Opera Android Yes | Safari iOS Yes | Samsung Internet Android 5.0 |
speed
|
Chrome 5 | Edge 12 | Firefox 3.5 | IE 9 |
Opera
16
|
Safari 5 | WebView Android 37 | Chrome Android 18 | Firefox Android 4 |
Opera Android
16
|
Safari iOS ? | Samsung Internet Android 1.0 |
完整支持
不支持
兼容性未知
使用非标名称。
GeolocationCoordinates