|
|
@@ -5,6 +5,7 @@ import {Subject} from 'rxjs';
|
|
|
import {catchError} from 'rxjs/operators';
|
|
|
|
|
|
import {
|
|
|
+ HsCompositionsParserService,
|
|
|
HsConfig,
|
|
|
HsEventBusService,
|
|
|
HsLanguageService,
|
|
|
@@ -51,6 +52,7 @@ export class CalculatorService {
|
|
|
|
|
|
constructor(
|
|
|
private fieldService: FieldService,
|
|
|
+ private hsCompositionsParserService: HsCompositionsParserService,
|
|
|
private hsConfig: HsConfig,
|
|
|
private hsEventBus: HsEventBusService,
|
|
|
private hsLanguageService: HsLanguageService,
|
|
|
@@ -209,6 +211,20 @@ export class CalculatorService {
|
|
|
imageWmsTLayer.setVisible(true);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Adds all layers from a provided composition to the map, optionally into a provided folder
|
|
|
+ * @param compositionLink - URL of the composition record
|
|
|
+ * @param path - Folder name
|
|
|
+ */
|
|
|
+ addLayersFromComposition(compositionLink: string, {path}) {
|
|
|
+ const composition = []; //TODO: get composition object from compositionLink URL
|
|
|
+ if (path) {
|
|
|
+ for (const layer of composition) {
|
|
|
+ //TODO: add path
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private proxyEnabled(): boolean {
|
|
|
return (
|
|
|
this.hsConfig.apps.default.useProxy === undefined ||
|