|
|
@@ -7,6 +7,8 @@ import {Tile, Vector as VectorLayer} from 'ol/layer';
|
|
|
|
|
|
import {HsConfig, HsEventBusService, HsToastService} from 'hslayers-ng';
|
|
|
|
|
|
+import {SdmDihService} from './graphs/sdm-dih.service';
|
|
|
+
|
|
|
@Component({
|
|
|
selector: 'application-root',
|
|
|
templateUrl: './app.component.html',
|
|
|
@@ -15,12 +17,17 @@ import {HsConfig, HsEventBusService, HsToastService} from 'hslayers-ng';
|
|
|
export class HslayersAppComponent {
|
|
|
/* You can name your app as you like or not at all */
|
|
|
title = 'hslayers-application';
|
|
|
+ selectedRegion: string;
|
|
|
constructor(
|
|
|
/* Inject here all modules from HSLayers-NG which you intend to use */
|
|
|
public hsConfig: HsConfig /* public properties are visible in the template */,
|
|
|
private hsEventBusService: HsEventBusService /* private properties are only visible from within this component class */,
|
|
|
- private hsToastService: HsToastService
|
|
|
+ private hsToastService: HsToastService,
|
|
|
+ public sdmDihService: SdmDihService
|
|
|
) {
|
|
|
+ sdmDihService.dataLoads.subscribe(
|
|
|
+ () => (this.selectedRegion = this.sdmDihService.regions[0])
|
|
|
+ );
|
|
|
/* Define and update the HsConfig configuration object */
|
|
|
this.hsConfig.update({
|
|
|
datasources: [
|