Upgraded custom-webpack and typescript.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -9,14 +9,14 @@ import { Observer, Observable,BehaviorSubject } from 'rxjs';
|
||||
@Injectable()
|
||||
export class GeolocationService {
|
||||
|
||||
private positionObserver$:BehaviorSubject<Position> = new BehaviorSubject<Position>(null);
|
||||
private positionObserver$:BehaviorSubject<GeolocationPosition> = new BehaviorSubject<GeolocationPosition>(null);
|
||||
|
||||
constructor() {
|
||||
navigator.geolocation.watchPosition(
|
||||
(position: Position) => {
|
||||
(position: GeolocationPosition) => {
|
||||
this.positionObserver$.next(position);
|
||||
},
|
||||
(error: PositionError) => {
|
||||
(error: GeolocationPositionError) => {
|
||||
console.debug('Geolocation service: ' + error.message);
|
||||
},
|
||||
{
|
||||
@@ -28,7 +28,7 @@ export class GeolocationService {
|
||||
}
|
||||
|
||||
|
||||
getCurrentPosition(): Observable<Position> {
|
||||
getCurrentPosition(): Observable<GeolocationPosition> {
|
||||
return this.positionObserver$;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user