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:
@@ -13,7 +13,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
||||
|
||||
@Input() enable:boolean;
|
||||
public instance: Overlay;
|
||||
@Input() position: Position;
|
||||
@Input() position: GeolocationPosition;
|
||||
@Input() location: number[]=[0,0];
|
||||
@Input() locationTolerance: number = 0;
|
||||
@Input() showHeading: boolean = false;
|
||||
@@ -61,7 +61,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (changes.position && this.instance) {
|
||||
var p = changes.position.currentValue as Position;
|
||||
var p = changes.position.currentValue as GeolocationPosition;
|
||||
if(p && this.initialized) {
|
||||
this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
|
||||
this.locationTolerance = p.coords.accuracy;
|
||||
|
@@ -14,7 +14,7 @@ export class PanToLocation implements OnInit,OnChanges{
|
||||
|
||||
view: View;
|
||||
map: MapComponent;
|
||||
@Input() position: Position;
|
||||
@Input() position: GeolocationPosition;
|
||||
@Input() mapState: IMapState;
|
||||
@Input() animate: boolean;
|
||||
|
||||
|
@@ -74,7 +74,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public searchMinified$: Observable<boolean> = this.store.select(mapReducers.selectGetSearchMinified);
|
||||
public menuVisible$: Observable<boolean>;
|
||||
public query$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQuery);
|
||||
public position$: Observable<Position> = this.geolocationService.getCurrentPosition();
|
||||
public position$: Observable<GeolocationPosition> = this.geolocationService.getCurrentPosition();
|
||||
public compassHeading$: Observable<number> = this.deviceorientationService.getCurrentCompassHeading();
|
||||
public baseLayersCollapsed:boolean = true;
|
||||
public overlayLayersCollapsed: boolean = true;
|
||||
|
@@ -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$;
|
||||
}
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ export class ItemTypeService {
|
||||
})
|
||||
.catch(error => this.itemTypes = null);
|
||||
} else {
|
||||
return new Promise((resolve) => {resolve()});
|
||||
return new Promise<void>((resolve) => {resolve()});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ import { IAuthconfigFactory } from './authconfigFactory';
|
||||
|
||||
export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthService: OAuthService, authconfigFactory:IAuthconfigFactory,authStorage:OAuthStorage,itemtypeService:ItemTypeService): () => Promise<any> {
|
||||
return (): Promise<any> => {
|
||||
return new Promise((resolve,reject) => {
|
||||
return new Promise<void>((resolve,reject) => {
|
||||
appConfig.load().then(() => {
|
||||
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
||||
oauthService.setStorage(authStorage);
|
||||
|
Reference in New Issue
Block a user