Mark for check on navigation
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2019-12-27 13:26:39 +01:00
parent 4b232cc0e4
commit ac5efdb40f

View File

@ -1,4 +1,4 @@
import { Component, OnInit, OnDestroy, HostListener, Inject, ViewChild, AfterViewInit } from '@angular/core'; import { Component, OnInit, OnDestroy, HostListener, Inject, ViewChild, AfterViewInit,ChangeDetectorRef } from '@angular/core';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { Observable, Subject, Subscription,combineLatest, from } from 'rxjs'; import { Observable, Subject, Subscription,combineLatest, from } from 'rxjs';
import { debounce, withLatestFrom, first, combineAll } from 'rxjs/operators'; import { debounce, withLatestFrom, first, combineAll } from 'rxjs/operators';
@ -74,7 +74,15 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public extent: Observable<Extent>; public extent: Observable<Extent>;
@ViewChild('map', { static: true }) map; @ViewChild('map', { static: true }) map;
constructor(private store: Store<mapReducers.State | commonReducers.State>, private route: ActivatedRoute, private router: Router, private uploadService: ResumableFileUploadService, private serializeService: StateSerializerService, public itemTypeService: ItemTypeService, private location: Location, private geolocationService: GeolocationService ) { constructor(private store: Store<mapReducers.State | commonReducers.State>,
private route: ActivatedRoute,
private router: Router,
private uploadService: ResumableFileUploadService,
private serializeService: StateSerializerService,
public itemTypeService: ItemTypeService,
private location: Location,
private geolocationService: GeolocationService,
private _ref: ChangeDetectorRef ) {
} }
@HostListener('document:keyup', ['$event']) @HostListener('document:keyup', ['$event'])
@ -237,6 +245,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
parts.push(mapState.baseLayerCode); parts.push(mapState.baseLayerCode);
parts.push( this.serializeService.serialize(queryState)); parts.push( this.serializeService.serialize(queryState));
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent }); this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
this._ref.markForCheck();
} }
} }