2 * Copyright 2009 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @fileoverview Definitions for W3C's Geolocation specification
19 * http://www.w3.org/TR/geolocation-API/
25 * @see http://www.w3.org/TR/geolocation-API/#geolocation
27 function Geolocation() {}
30 * @param {function(GeolocationPosition)} successCallback
31 * @param {(function(GeolocationPositionError)|null)=} opt_errorCallback
32 * @param {GeolocationPositionOptions=} opt_options
34 Geolocation.prototype.getCurrentPosition = function(successCallback,
39 * @param {function(GeolocationPosition)} successCallback
40 * @param {(function(GeolocationPositionError)|null)=} opt_errorCallback
41 * @param {GeolocationPositionOptions=} opt_options
44 Geolocation.prototype.watchPosition = function(successCallback,
48 /** @param {number} watchId */
49 Geolocation.prototype.clearWatch = function(watchId) {};
54 * @see http://www.w3.org/TR/geolocation-API/#coordinates
56 function GeolocationCoordinates() {}
57 /** @type {number} */ GeolocationCoordinates.prototype.latitude;
58 /** @type {number} */ GeolocationCoordinates.prototype.longitude;
59 /** @type {number} */ GeolocationCoordinates.prototype.accuracy;
60 /** @type {number} */ GeolocationCoordinates.prototype.altitude;
61 /** @type {number} */ GeolocationCoordinates.prototype.altitudeAccuracy;
62 /** @type {number} */ GeolocationCoordinates.prototype.heading;
63 /** @type {number} */ GeolocationCoordinates.prototype.speed;
68 * @see http://www.w3.org/TR/geolocation-API/#position
70 function GeolocationPosition() {}
71 /** @type {GeolocationCoordinates} */
72 GeolocationPosition.prototype.coords;
73 /** @type {Date} */ GeolocationPosition.prototype.timestamp;
78 * @see http://www.w3.org/TR/geolocation-API/#position-options
80 function GeolocationPositionOptions() {}
81 /** @type {boolean} */
82 GeolocationPositionOptions.prototype.enableHighAccuracy;
83 /** @type {number} */ GeolocationPositionOptions.prototype.maximumAge;
84 /** @type {number} */ GeolocationPositionOptions.prototype.timeout;
89 * @see http://www.w3.org/TR/geolocation-API/#position-error
91 function GeolocationPositionError() {}
92 /** @type {number} */ GeolocationPositionError.prototype.code;
93 /** @type {string} */ GeolocationPositionError.prototype.message;
94 /** @type {number} */ GeolocationPositionError.prototype.UNKNOWN_ERROR;
95 /** @type {number} */ GeolocationPositionError.prototype.PERMISSION_DENIED;
97 GeolocationPositionError.prototype.POSITION_UNAVAILABLE;
98 /** @type {number} */ GeolocationPositionError.prototype.TIMEOUT;
100 /** @type {Geolocation} */
101 Navigator.prototype.geolocation;