Fix routes
	
		
			
	
		
	
	
		
	
		
			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:
		@@ -4,30 +4,18 @@ import { MapComponent } from './components/map/map.component';
 | 
			
		||||
import { AuthGuard } from '@farmmaps/common';
 | 
			
		||||
 | 
			
		||||
const routes = [
 | 
			
		||||
    {
 | 
			
		||||
    path: '', children: [
 | 
			
		||||
    {
 | 
			
		||||
        path: '',
 | 
			
		||||
        component: MapComponent   
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', children: [
 | 
			
		||||
            {
 | 
			
		||||
                path: '',
 | 
			
		||||
       path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
 | 
			
		||||
       component: MapComponent
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
       path: ':queryState', children: [
 | 
			
		||||
            {
 | 
			
		||||
                path: '',
 | 
			
		||||
       path: ':queryState', 
 | 
			
		||||
       component: MapComponent
 | 
			
		||||
    }
 | 
			
		||||
        ]
 | 
			
		||||
    }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@NgModule({
 | 
			
		||||
 
 | 
			
		||||
@@ -251,14 +251,7 @@ export {
 | 
			
		||||
       FeatureListCropfieldComponent,
 | 
			
		||||
       FeatureListFeatureContainerComponent,
 | 
			
		||||
       ZoomToExtentComponent
 | 
			
		||||
  ]
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export class AppCommonMapModule {
 | 
			
		||||
  static forRoot(): ModuleWithProviders<AppCommonMapModule> {
 | 
			
		||||
    return {
 | 
			
		||||
      ngModule: AppCommonMapModule,
 | 
			
		||||
  ],
 | 
			
		||||
  providers: [
 | 
			
		||||
    FeatureIconService,
 | 
			
		||||
    GeolocationService,
 | 
			
		||||
@@ -276,6 +269,8 @@ export class AppCommonMapModule {
 | 
			
		||||
    { provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
 | 
			
		||||
    { provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
 | 
			
		||||
  ]
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export class AppCommonMapModule {  
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -81,7 +81,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
 | 
			
		||||
  public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
 | 
			
		||||
  private lastUrl = "";
 | 
			
		||||
  private initialized: boolean = false;
 | 
			
		||||
  private rootItems: Observable<IListItem[]> = this.store.select(commonReducers.getRootItems);
 | 
			
		||||
 | 
			
		||||
  @ViewChild('map') map;
 | 
			
		||||
 | 
			
		||||
@@ -123,11 +122,12 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      this.rootItems.subscribe((l) => {
 | 
			
		||||
         if(l && l.length>0) {
 | 
			
		||||
      this.store.dispatch(new mapActions.Init());
 | 
			
		||||
         }
 | 
			
		||||
      });
 | 
			
		||||
      // this.store.select(commonReducers.getRootItems).subscribe((l) => {
 | 
			
		||||
      //    if(l && l.length>0) {
 | 
			
		||||
      //      this.store.dispatch(new mapActions.Init());
 | 
			
		||||
      //    }
 | 
			
		||||
      // });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @HostListener('document:keyup', ['$event'])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user