Skip to content

Styler panel

Dailis edited this page Oct 7, 2021 · 3 revisions

Layer styler

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

If not using HslayersModule containing all components

Add HsStylerModule import:

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

Add HsStylerComponent component:

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