Skip to content

Compositions panel

Filip Leitner edited this page Apr 30, 2024 · 5 revisions

Composition catalogue

Compositions catalogue is used for listing all available map compositions from different data sources, that were added to HsConfig object inside the initial Angular app component. If 'Filter by map extent' is enabled, compositions will be filtered and displayed inside the list based on the view borders (extent) of the map. For additional filter options a small drop down window is available after pressing the toggle 'More'.

Config parameters

List of useful config parameters for the compositions panel can be found here:

status_manager_url

datasources

dspaging

social_hashtag

open_lm_after_comp_loaded

saveMapStateOnReload

permalinkLocation

project_name

Enable/disable

import {HsConfig} from 'hslayers-ng/config';
@Component({
  selector: 'your-app-component',
  templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
  constructor(hsConfig: HsConfig) {
    this.HsConfig.update({
      panelsEnabled: {
        composition_browser: true //(true by default)
      }
    });
  }
}

If not using HslayersModule containing all components

Add HsCompositionsModule import:

import {HsCompositionsModule} from 'hslayers-ng/components/compositions';
@NgModule({
  imports: [HsCompositionsModule],
})
export class YourAppModule {}

Add HsCompositionsComponent component:

import {HsLayoutService} from 'hslayers-ng/core';
import {HsCompositionsModule} from 'hslayers-ng/components/compositions';
@Component({
  selector: 'your-app-component',
  templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
  constructor(hsLayoutService: HsLayoutService) {
    hsLayoutService.createPanel(HsCompositionsComponent, {});
  }
}
Clone this wiki locally