Compositions panel - hslayers/hslayers-ng GitHub Wiki
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:
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, {});
}
}