|
|
@@ -8,13 +8,14 @@ import {Vector as VectorSource} from 'ol/source';
|
|
|
|
|
|
import {HsConfig} from 'hslayers-ng/config.service';
|
|
|
import {HsLayoutService} from 'hslayers-ng/components/layout/layout.service';
|
|
|
-import {HsMapService} from 'hslayers-ng/components/map/map.service';
|
|
|
+//import {HsMapService} from 'hslayers-ng/components/map/map.service';
|
|
|
import {HsPanelContainerService} from 'hslayers-ng/components/layout/panels/panel-container.service';
|
|
|
import {HsSidebarService} from 'hslayers-ng/components/sidebar/sidebar.service';
|
|
|
|
|
|
import {AdjusterComponent} from './adjuster/adjuster.component';
|
|
|
import {AdjusterEventService} from './adjuster/adjuster-event.service';
|
|
|
import {AdjusterService} from './adjuster/adjuster.service';
|
|
|
+import {HsEventBusService} from 'hslayers-ng/components/core/event-bus.service';
|
|
|
import {nuts} from './nuts';
|
|
|
|
|
|
@Injectable({providedIn: 'root'})
|
|
|
@@ -75,13 +76,14 @@ export class AppService {
|
|
|
});
|
|
|
serviceUrl: string;
|
|
|
constructor(
|
|
|
- private adjusterService: AdjusterService,
|
|
|
- private adjusterEventService: AdjusterEventService,
|
|
|
- private hsConfig: HsConfig,
|
|
|
- private hsLayoutService: HsLayoutService,
|
|
|
- private hsMapService: HsMapService,
|
|
|
- private hsSidebarService: HsSidebarService,
|
|
|
- private hsPanelContainerService: HsPanelContainerService
|
|
|
+ public adjusterService: AdjusterService,
|
|
|
+ public adjusterEventService: AdjusterEventService,
|
|
|
+ public hsConfig: HsConfig,
|
|
|
+ public hsEventBus: HsEventBusService,
|
|
|
+ public hsLayoutService: HsLayoutService,
|
|
|
+ //public hsMapService: HsMapService,
|
|
|
+ public hsSidebarService: HsSidebarService,
|
|
|
+ public hsPanelContainerService: HsPanelContainerService
|
|
|
) {
|
|
|
this.serviceUrl = this.adjusterService.serviceBaseUrl + 'georeport/';
|
|
|
this.nuts3Layer.set('popUp', {
|
|
|
@@ -132,7 +134,9 @@ export class AppService {
|
|
|
/*this.hsMapService
|
|
|
.loaded()
|
|
|
.then((map) => this.hsMapService.repopulateLayers([]));*/
|
|
|
- this.init();
|
|
|
+ this.hsEventBus.layerLoads.subscribe(() => {
|
|
|
+ this.init();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
init(): void {
|