|
|
@@ -20,6 +20,7 @@ import {
|
|
|
} from 'hslayers-ng';
|
|
|
|
|
|
import i18n from './translations.json';
|
|
|
+import {CalculatorService} from './calculator/calculator.service';
|
|
|
|
|
|
proj4.defs(
|
|
|
'EPSG:3045',
|
|
|
@@ -35,6 +36,7 @@ register(proj4);
|
|
|
export class AppService {
|
|
|
sjtskProjection = getProjection('EPSG:5514');
|
|
|
constructor(
|
|
|
+ public calcService: CalculatorService,
|
|
|
public hsConfig: HsConfig,
|
|
|
public hsEventBus: HsEventBusService,
|
|
|
public hsLanguageService: HsLanguageService,
|
|
|
@@ -102,6 +104,19 @@ export class AppService {
|
|
|
},
|
|
|
strategy: bboxStrategy,
|
|
|
});
|
|
|
+ lpisSource.on(
|
|
|
+ 'featuresloadstart',
|
|
|
+ () => (this.calcService.lpisLoading = true)
|
|
|
+ );
|
|
|
+ lpisSource.on(
|
|
|
+ 'featuresloadend',
|
|
|
+ () => (this.calcService.lpisLoading = false)
|
|
|
+ );
|
|
|
+ lpisSource.on('featuresloaderror', (evt) => {
|
|
|
+ this.calcService.lpisLoading = false;
|
|
|
+ console.warn('error when loading LPIS layer');
|
|
|
+ console.log(evt);
|
|
|
+ });
|
|
|
/* Define and update the HsConfig configuration object */
|
|
|
this.hsConfig.update({
|
|
|
datasources: [
|