mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
parent
c98b4f4c85
commit
d5310b0f73
@ -174,7 +174,7 @@ export class Geolocation {
|
||||
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
|
||||
* @return Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
|
||||
*/
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition & PositionError> {
|
||||
return new Observable<Geoposition>(
|
||||
(observer: any) => {
|
||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
|
||||
|
Loading…
Reference in New Issue
Block a user