From ac5efdb40fa57b836d75cec5500d22b05d5ff8bc Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Fri, 27 Dec 2019 13:26:39 +0100 Subject: [PATCH] Mark for check on navigation --- .../src/fm-map/components/map/map.component.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/projects/common-map/src/fm-map/components/map/map.component.ts b/projects/common-map/src/fm-map/components/map/map.component.ts index f84dbe4..278eb71 100644 --- a/projects/common-map/src/fm-map/components/map/map.component.ts +++ b/projects/common-map/src/fm-map/components/map/map.component.ts @@ -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 { Observable, Subject, Subscription,combineLatest, from } from 'rxjs'; import { debounce, withLatestFrom, first, combineAll } from 'rxjs/operators'; @@ -74,7 +74,15 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit { public extent: Observable; @ViewChild('map', { static: true }) map; - constructor(private store: Store, 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, + 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']) @@ -237,6 +245,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit { parts.push(mapState.baseLayerCode); parts.push( this.serializeService.serialize(queryState)); this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent }); + this._ref.markForCheck(); } }