From 8e0c424f8197682cf1ef89aca1b183c5e09c8c93 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Thu, 16 Apr 2020 17:32:02 +0200 Subject: [PATCH] Try to fix navigation issue --- .../common-map/src/fm-map/components/map/map.component.ts | 2 +- projects/common-map/src/fm-map/effects/map.effects.ts | 4 +--- 2 files changed, 2 insertions(+), 4 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 799c1c5..316c1b6 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 @@ -131,7 +131,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit { this.selectedFeatures$.next({x:0,y:0,features:[]}); this.selectedFeatures$.next(null); this.query$.pipe(withLatestFrom(this.mapState$),withLatestFrom(this.setStateCount$)).subscribe(([[queryState,mapState],setStateCount]) =>{ - if(setStateCount>0) { + if(setStateCount>1) { let newQueryState = tassign(mapReducers.initialQueryState); let urlparts=[]; if (queryState.itemCode && queryState.itemCode != "") { diff --git a/projects/common-map/src/fm-map/effects/map.effects.ts b/projects/common-map/src/fm-map/effects/map.effects.ts index 54b6dd7..596f5f4 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -27,8 +27,6 @@ import {FeatureIconService} from '../services/feature-icon.service'; import * as style from 'ol/style'; import { ItemTypeService } from '@farmmaps/common'; -import { Router } from '@angular/router'; - @Injectable() @@ -277,7 +275,7 @@ export class MapEffects { return of(newAction); })); - constructor(private actions$: Actions, private store$: Store, private folderService$: FolderService, private itemService$: ItemService,private featureIconService$:FeatureIconService,private itemTypeService$:ItemTypeService,private router$:Router) { + constructor(private actions$: Actions, private store$: Store, private folderService$: FolderService, private itemService$: ItemService,private featureIconService$:FeatureIconService,private itemTypeService$:ItemTypeService) { this._geojsonFormat = new GeoJSON(); this._wktFormat = new WKT(); }