Skip to content

Query panel

DailisLangovskis edited this page Oct 7, 2021 · 5 revisions

Info about features selected

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

If not using HslayersModule containing all components

Add HsQueryModule import:

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

Add HsQueryComponent component:

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