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:
parent
cd10165510
commit
ab835e904e
@ -5,28 +5,16 @@ import { AuthGuard } from '@farmmaps/common';
|
|||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '', children: [
|
path: '',
|
||||||
{
|
component: MapComponent
|
||||||
path: '',
|
|
||||||
component: MapComponent
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', children: [
|
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
|
||||||
{
|
component: MapComponent
|
||||||
path: '',
|
|
||||||
component: MapComponent
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':queryState', children: [
|
path: ':queryState',
|
||||||
{
|
component: MapComponent
|
||||||
path: '',
|
|
||||||
component: MapComponent
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -251,31 +251,26 @@ export {
|
|||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
ZoomToExtentComponent
|
ZoomToExtentComponent
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
FeatureIconService,
|
||||||
|
GeolocationService,
|
||||||
|
DeviceOrientationService,
|
||||||
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
||||||
|
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
||||||
|
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
export class AppCommonMapModule {
|
export class AppCommonMapModule {
|
||||||
static forRoot(): ModuleWithProviders<AppCommonMapModule> {
|
|
||||||
return {
|
|
||||||
ngModule: AppCommonMapModule,
|
|
||||||
providers: [
|
|
||||||
FeatureIconService,
|
|
||||||
GeolocationService,
|
|
||||||
DeviceOrientationService,
|
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
|
||||||
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
|
||||||
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
|
public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
|
||||||
private lastUrl = "";
|
private lastUrl = "";
|
||||||
private initialized: boolean = false;
|
private initialized: boolean = false;
|
||||||
private rootItems: Observable<IListItem[]> = this.store.select(commonReducers.getRootItems);
|
|
||||||
|
|
||||||
@ViewChild('map') map;
|
@ViewChild('map') map;
|
||||||
|
|
||||||
@ -123,11 +122,12 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.rootItems.subscribe((l) => {
|
this.store.dispatch(new mapActions.Init());
|
||||||
if(l && l.length>0) {
|
// this.store.select(commonReducers.getRootItems).subscribe((l) => {
|
||||||
this.store.dispatch(new mapActions.Init());
|
// if(l && l.length>0) {
|
||||||
}
|
// this.store.dispatch(new mapActions.Init());
|
||||||
});
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keyup', ['$event'])
|
@HostListener('document:keyup', ['$event'])
|
||||||
|
Loading…
Reference in New Issue
Block a user