Toolbar component - hslayers/hslayers-ng GitHub Wiki

Toolbar

Toolbar component

Config parameters

List of useful config parameters for the toolbar component can be found here:

componentsEnabled

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({
      componentsEnabled: {
        toolbar: true, //(true by default)
        guiOverlay: true //(true by default)
      }
      panelsEnabled: {
        toolbar: true //(true by default)
      }
    });
  }
}

If not using HslayersModule containing all components

Add HsToolbarModule import:

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

Add HsToolbarComponent component:

import {HsToolbarModule} from 'hslayers-ng/components/toolbar';
import {HsLayoutService } from 'hslayers-ng/core';
@Component({
  selector: 'your-app-component',
  templateUrl: 'your-app-component.html',
})
export class YourAppComponent {
  constructor(hsLayoutService: HsLayoutService) {
    hsLayoutService.createOverlay(HsToolbarComponent, {});
  }
}