Skip to content

Compositions panel

Dailis edited this page Oct 19, 2021 · 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'.

Enable/disable

import {HsConfig} from 'hslayers-ng';
@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';
@NgModule({
  imports: [HsCompositionsModule],
})
export class YourAppModule {}

Add HsCompositionsComponent component:

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