parent
074d16605d
commit
1b161d8c9e
@ -154,7 +154,7 @@ export class Geolocation {
|
|||||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||||
return new Observable<Geoposition>(
|
return new Observable<Geoposition>(
|
||||||
(observer: any) => {
|
(observer: any) => {
|
||||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), options);
|
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.error.bind(observer), options);
|
||||||
return () => navigator.geolocation.clearWatch(watchId);
|
return () => navigator.geolocation.clearWatch(watchId);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user