diff --git a/index.html b/index.html index 5befb48..612174a 100644 --- a/index.html +++ b/index.html @@ -349,7 +349,7 @@
partial interface Navigator { - readonly attribute Geolocation geolocation; + readonly attribute NavigatorGeolocation geolocation; };
The geolocation attribute gives access to location information associated @@ -359,18 +359,17 @@
The Geolocation object is +
The NavigatorGeolocation object is used by scripts to programmatically determine the location information associated with the hosting device. The location information is acquired - by applying a user-agent specific algorithm, creating a Position object, and populating that object + by applying a user-agent specific algorithm, creating a NavigatorGeolocationPosition object, and populating that object with appropriate data accordingly.
- [NoInterfaceObject] - interface Geolocation { + interface NavigatorGeolocation { void getCurrentPosition(PositionCallback successCallback, optional PositionErrorCallback errorCallback, optional PositionOptions options); @@ -382,9 +381,9 @@Geolocation interface
void clearWatch(long watchId); }; - callback PositionCallback = void (Position position); + callback PositionCallback = void (NavigatorGeolocationPosition position); - callback PositionErrorCallback = void (PositionError positionError); + callback PositionErrorCallback = void (PositionErrorPositionError positionError);
The getCurrentPosition() @@ -393,23 +392,23 @@
handleEvent
operation MUST be called on the
- callback object) with a new Position object,
+ callback object) with a new NavigatorGeolocationPosition object,
reflecting the current location of the device. If the attempt
fails, the errorCallback MUST be invoked with a
- new PositionError object, reflecting the reason for the failure.
+ new NavigatorGeolocationPositionError object, reflecting the reason for the failure.
- The implementation of the getCurrentPosition method +
The implementation of the getCurrentPosition method MUST execute the following set of steps:
The watchPosition() @@ -439,10 +438,10 @@
handleEvent
operation MUST be called on the
- callback object) with a new Position object,
+ callback object) with a new NavigatorGeolocationPosition object,
reflecting the current location of the device. If the attempt
fails, the errorCallback MUST be invoked with a
- new PositionError object, reflecting the reason for
+ new NavigatorGeolocationPositionError object, reflecting the reason for
the failure. The watch process then MUST continue
to monitor the position of the device and invoke the appropriate
callback every time this position changes. The watch process
@@ -450,21 +449,21 @@ The PositionCallBack callback is invoked when a Position object is available, resulting +
The PositionCallBack callback is invoked when a NavigatorGeolocationPosition object is available, resulting from a cached object or the acquisition operation. The PositionCallBack callback gets set using the successCallback parameter.
-The PositionErrorCallBack callback is invoked when a Position object is not available, resulting +
The PositionErrorCallBack callback is invoked when a NavigatorGeolocationPosition object is not available, resulting from a timeout, a permission denied, or an unability to determine the position of the device. The PositionErrorCallBack callback gets set using the errorCallback parameter.
The implementation of the watch process MUST execute the following set of steps:
The getCurrentPosition() and watchPosition() methods +
The getCurrentPosition() and watchPosition() methods accept PositionOptions objects as their third argument. @@ -582,52 +581,51 @@
The timeout attribute denotes the maximum length of time (expressed in milliseconds) that is allowed - to pass from the call to getCurrentPosition or watchPosition + to pass from the call to getCurrentPosition or watchPosition until the corresponding successCallback is invoked. If the implementation is unable to successfully acquire a - new Position before the given timeout elapses, and no other errors have occurred in this interval, then - the corresponding errorCallback MUST be invoked with a PositionError object whose code attribute - is set to TIMEOUT. Note that the time that is spent obtaining the user permission is + new NavigatorGeolocationPosition before the given timeout elapses, and no other errors have occurred in this interval, then + the corresponding errorCallback MUST be invoked with a NavigatorGeolocationPositionError object whose code attribute + is set to TIMEOUT. Note that the time that is spent obtaining the user permission is not included in the period covered by the timeout attribute. The timeout attribute only applies to the location acquisition operation. -
In case of a getCurrentPosition() call, the +
In case of a getCurrentPosition() call, the errorCallback would be invoked at most once.
In case of - a watchPosition(), + a watchPosition(), the errorCallback could be invoked repeatedly: the first timeout is relative to the - moment watchPosition() + moment watchPosition() was called or the moment the user's permission was obtained, if that was necessary. Subsequent timeouts are relative to the moment when the implementation determines that the position of the hosting device has changed and a new - Position object MUST be acquired. + NavigatorGeolocationPosition object MUST be acquired.
The maximumAge attribute indicates that the application is willing to accept a cached
position whose age is no greater than the specified time in milliseconds.
If maximumAge is set to 0, the implementation MUST immediately attempt to acquire a new position object. Setting
the maximumAge to Infinity
MUST determine the implementation to return a cached position regardless of its age. If
an implementation does not have a cached position available whose age is no greater than the specified maximumAge,
- then it MUST acquire a new Position object. In case of a watchPosition(),
- the maximumAge refers to the first Position object returned by the implementation.
+ then it MUST acquire a new NavigatorGeolocationPosition object. In case of a watchPosition(),
+ the maximumAge refers to the first NavigatorGeolocationPosition object returned by the implementation.
The Position interface is the +
The NavigatorGeolocationPosition interface is the container for the geolocation information returned by this API. This - version of the specification allows one attribute of type Coordinates and a + version of the specification allows one attribute of type NavigatorGeolocationCoordinates and a timestamp. Future versions of the API MAY allow additional attributes that provide other information about this position (e.g. street addresses).
- [NoInterfaceObject] - interface Position { - readonly attribute Coordinates coords; + interface NavigatorGeolocationPosition { + readonly attribute NavigatorGeolocationCoordinates coords; readonly attribute DOMTimeStamp timestamp; };@@ -637,15 +635,14 @@
The timestamp attribute represents
- the time when the Position object was
+ the time when the NavigatorGeolocationPosition object was
acquired and is represented as a DOMTimeStamp
.
- [NoInterfaceObject] - interface Coordinates { + interface NavigatorGeolocationCoordinates { readonly attribute double latitude; readonly attribute double longitude; readonly attribute double? altitude; @@ -697,12 +694,11 @@Coordinates interface
- [NoInterfaceObject] - interface PositionError { + interface NavigatorGeolocationPositionError { const unsigned short PERMISSION_DENIED = 1; const unsigned short POSITION_UNAVAILABLE = 2; const unsigned short TIMEOUT = 3; @@ -732,7 +728,7 @@PositionError interface