Skip to content

Info component

Dailis edited this page Oct 8, 2021 · 3 revisions

Info

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: {
        compositionLoadingProgress: true //(false by default)
      }
    });
  }
}

If not using HslayersModule containing all components

Add HsInfoModule import:

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

Add HsInfoComponent component:

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