|
@@ -7,6 +7,7 @@ import {HsConfig} from 'hslayers-ng';
|
|
|
import {HsEventBusService} from 'hslayers-ng';
|
|
import {HsEventBusService} from 'hslayers-ng';
|
|
|
//import {HsLayerManagerMetadataService} from 'hslayers-ng/components/layermanager/layermanager-metadata.service';
|
|
//import {HsLayerManagerMetadataService} from 'hslayers-ng/components/layermanager/layermanager-metadata.service';
|
|
|
import {HsLayerManagerService} from 'hslayers-ng';
|
|
import {HsLayerManagerService} from 'hslayers-ng';
|
|
|
|
|
+import {HsToastService} from 'hslayers-ng';
|
|
|
import {HsUtilsService} from 'hslayers-ng';
|
|
import {HsUtilsService} from 'hslayers-ng';
|
|
|
|
|
|
|
|
import attractivenessConfig from '../attractiveness.config.json';
|
|
import attractivenessConfig from '../attractiveness.config.json';
|
|
@@ -45,6 +46,7 @@ export class AdjusterService {
|
|
|
public hsEventBus: HsEventBusService,
|
|
public hsEventBus: HsEventBusService,
|
|
|
//public hsLayerMetadataService: HsLayerManagerMetadataService,
|
|
//public hsLayerMetadataService: HsLayerManagerMetadataService,
|
|
|
public hsLayerManagerService: HsLayerManagerService,
|
|
public hsLayerManagerService: HsLayerManagerService,
|
|
|
|
|
+ public hsToastService: HsToastService,
|
|
|
public hsUtilsService: HsUtilsService,
|
|
public hsUtilsService: HsUtilsService,
|
|
|
public $http: HttpClient
|
|
public $http: HttpClient
|
|
|
) {
|
|
) {
|
|
@@ -140,6 +142,7 @@ export class AdjusterService {
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
|
|
|
+ this.hsToastService.createToastPopupMessage('Error loading data', `Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
|
console.warn(`Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
console.warn(`Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
this._raiInProcess = false;
|
|
this._raiInProcess = false;
|
|
@@ -254,6 +257,7 @@ export class AdjusterService {
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
|
|
|
+ this.hsToastService.createToastPopupMessage('Error loading data', `Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
|
console.warn(`Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
console.warn(`Error obtaining data from ${this.serviceBaseUrl}.`);
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
this._clusteringInProcess = false;
|
|
this._clusteringInProcess = false;
|
|
@@ -299,6 +303,7 @@ export class AdjusterService {
|
|
|
//this.hsLayerManagerService.setGreyscale(osmLayer);
|
|
//this.hsLayerManagerService.setGreyscale(osmLayer);
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
|
|
|
+ this.hsToastService.createToastPopupMessage('Error loading data', `Web service at ${this.serviceBaseUrl} unavailable!`);
|
|
|
console.warn(`Web service at ${this.serviceBaseUrl} unavailable!`);
|
|
console.warn(`Web service at ${this.serviceBaseUrl} unavailable!`);
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
this._loadInProcess = false;
|
|
this._loadInProcess = false;
|