Since this specification become a W3C Recommendation on 01 September
- 2022, the following substantive additions and/or corrections have been
- proposed:
+ 2022, the following substantive additions and/or corrections were made:
A more detailed list of changes can be found in section
- [[[#changelog]]]. Reviewers of the document can identify candidate
- additions and/or corrections by their distinctive styling in the
- document.
+ [[[#changelog]]].
@@ -580,16 +577,8 @@
method steps are:
-
- If the [=current settings object=]'s
- [=relevant global object=]'s [=associated `Document`=] is not
- [=Document/fully active=]: If [=this=]'s
- [=relevant global object=]'s [=associated `Document`=] is not
- [=Document/fully active=]:
+
If [=this=]'s [=relevant global object=]'s [=associated
+ `Document`=] is not [=Document/fully active=]:
[=Call back with error=] |errorCallback| and
{{GeolocationPositionError/POSITION_UNAVAILABLE}}.
@@ -614,16 +603,8 @@
method steps are:
-
- If the [=current settings object=]'s
- [=relevant global object=]'s [=associated `Document`=] is not
- [=Document/fully active=]: If [=this=]'s
- [=relevant global object=]'s [=associated `Document`=] is not
- [=Document/fully active=]:
+
If [=this=]'s [=relevant global object=]'s [=associated
+ `Document`=] is not [=Document/fully active=]:
[=Call back with error=] passing |errorCallback| and
{{GeolocationPositionError/POSITION_UNAVAILABLE}}.
@@ -689,12 +670,8 @@
-
- If |geolocation|'s [=environment settings
- object=] is a [=non-secure context=]:
+
If |geolocation|'s [=environment settings object=] is a
+ [=non-secure context=]:
If |watchId| was passed, [=List/remove=] |watchId| from
|watchIDs|.
@@ -704,7 +681,7 @@
Terminate this algorithm.
-
+
If |document:Document|'s [=Document/visibility state=] is
"hidden", wait for the following [=page visibility change steps=] to
@@ -832,28 +809,20 @@
value of the |options|.{{PositionOptions/maximumAge}}
member.
-
- If |cachedPosition|'s
- {{GeolocationPosition/timestamp}}'s value is greater
- than |cacheTime|, and
- |cachedPosition|.{{GeolocationPosition/[[isHighAccuracy]]}}
- equals
- |options|.{{PositionOptions/enableHighAccuracy}},
- set |position| to |cachedPosition|. :
+
If |cachedPosition|'s
+ {{GeolocationPosition/timestamp}}'s value is greater than
+ |cacheTime|, and
+ |cachedPosition|.{{GeolocationPosition/[[isHighAccuracy]]}}
+ equals |options|.{{PositionOptions/enableHighAccuracy}}:
[=Queue a task=] on the [=geolocation task
source=] with a step that [=invokes=]
- |successCallback| with « |cachedPosition| » and "`report`".
+ |successCallback| with « |cachedPosition| » and
+ "`report`".
Terminate this algorithm.
-
+
@@ -877,16 +846,6 @@
If acquiring the position data from the
system succeeds:
-
Let |positionData| be a [=map=] with the following
name/value pairs based on the acquired position data:
@@ -956,16 +915,7 @@
Set [=this=]'s {{Geolocation/[[cachedPosition]]}} to
|position|.
-
-
-
Set |position| to [=a new `GeolocationPosition`=]
- passing |acquisitionTime| and
- |options|.{{PositionOptions/enableHighAccuracy}}.
-
-
Set [=this=]'s {{Geolocation/[[cachedPosition]]}} to
- |position|.
-
-
+
Stop the |timeout|.
@@ -1147,15 +1097,9 @@
`toJSON()` method
-
- The toJSON() method returns a JSON
- representation of the {{GeolocationPosition}} object.
+ The toJSON() method returns a JSON representation of the
+ {{GeolocationPosition}} object.
@@ -1227,26 +1171,11 @@
`latitude`, `longitude`, and `accuracy` attributes
-
-
- The latitude and
- longitude attributes are geographic coordinates
- specified in decimal degrees. The
- latitude and longitude attributes denote the
- position, specified as a real number of degrees, in the [[WGS84]]
- coordinate system. The accuracy
- attribute denotes the position accuracy radius in meters.
+ The latitude and longitude attributes denote
+ the position, specified as a real number of degrees, in the [[WGS84]]
+ coordinate system. The accuracy attribute denotes the
+ position accuracy radius in meters.
@@ -1286,27 +1215,15 @@
`toJSON()` method
-
- The toJSON() method returns a JSON
- representation of the {{GeolocationCoordinates}} object.
+ The toJSON() method returns a JSON representation of the
+ {{GeolocationCoordinates}} object.
Constructing a `GeolocationPosition`
-
A new `GeolocationPosition` is constructed with [=map=]
|positionData|, {{EpochTimeStamp}} |timestamp:EpochTimeStamp| and
@@ -1328,58 +1245,7 @@
|timestamp|, and its {{GeolocationPosition/[[isHighAccuracy]]}}
internal slot set to |isHighAccuracy|.
-
-
- A new `GeolocationPosition` is constructed with
- {{EpochTimeStamp}} |timestamp:EpochTimeStamp| and boolean
- |isHighAccuracy| by performing the following steps:
-
-
-
Let |coords:GeolocationCoordinates| be a newly created
- {{GeolocationCoordinates}} instance:
-
-
Initialize |coord|'s {{GeolocationCoordinates/latitude}}
- attribute to a geographic coordinate in decimal degrees.
-
-
Initialize |coord|'s {{GeolocationCoordinates/longitude}}
- attribute to a geographic coordinate in decimal degrees.
-
-
Initialize |coord|'s {{GeolocationCoordinates/accuracy}}
- attribute to a non-negative real number. The value SHOULD
- correspond to a 95% confidence level with respect to the
- longitude and latitude values.
-
-
Initialize |coord|'s {{GeolocationCoordinates/altitude}}
- attribute in meters above the [[WGS84]] ellipsoid, or `null` if
- the implementation cannot provide altitude information.
-
-
Initialize |coord|'s
- {{GeolocationCoordinates/altitudeAccuracy}} attribute as
- non-negative real number, or to `null` if the implementation
- cannot provide altitude information. If the altitude accuracy
- information is provided, it SHOULD correspond to a 95% confidence
- level.
-
-
Initialize |coord|'s {{GeolocationCoordinates/speed}}
- attribute to a non-negative real number, or as `null` if the
- implementation cannot provide speed information.
-
-
Initialize |coord|'s {{GeolocationCoordinates/heading}}
- attribute in degrees, or `null` if the implementation cannot
- provide heading information. If the hosting device is stationary
- (i.e., the value of the {{GeolocationCoordinates/speed}}
- attribute is 0), then initialize the
- {{GeolocationCoordinates/heading}} to `NaN`.
-
-
-
-
Return a newly created {{GeolocationPosition}} instance with its
- {{GeolocationPosition/coords}} attribute initialized to |coords| and
- {{GeolocationPosition/timestamp}} attribute initialized to
- |timestamp|, and its {{GeolocationPosition/[[isHighAccuracy]]}}
- internal slot set to |isHighAccuracy|.
-
-
+
PERMISSION_DENIED (numeric value 1)
- [=Request a position=] failed because the user denied
- permission to use the API or the request was made
- from an [=non-secure context=].
+ [=Request a position=] failed because the user denied permission to
+ use the API or the request was made from an [=non-secure context=].
POSITION_UNAVAILABLE (numeric value 2)
@@ -1500,10 +1360,6 @@
Change log
-
- Since First Public Working Draft in 2021, Geolocation has
- received the following normative changes:
-
+
+ Since the previous publication of this specification as a Recommendation
+ in 2022, the following changes have been made:
+
+
+
+ Since First Public Working Draft in 2021, Geolocation has
+ received the following normative changes:
+
+
Since publication of the Second Edition in 2016, this specification