mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:24:56 -06:00
be more forgiving while getting location
This commit is contained in:
parent
fdf82443ce
commit
861920096c
1 changed files with 10 additions and 1 deletions
|
|
@ -2,5 +2,14 @@
|
|||
import { Observable, type Observer } from 'rxjs';
|
||||
|
||||
export default Observable.create((obs: Observer<Position>): Observable<Position> => {
|
||||
navigator.geolocation.getCurrentPosition((pos: Position) => obs.next(pos));
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(pos: Position) => obs.next(pos),
|
||||
err => {
|
||||
throw err;
|
||||
},
|
||||
{
|
||||
enableHighAccuracy: false,
|
||||
timeout: 1000,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue